ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: [Wireshark-dev] RFD: Slab allocator (sl_alloc()) related to r37112

From: Jakub Zawadzki <darkjames-ws@xxxxxxxxxxxx>
Date: Fri, 13 May 2011 12:00:03 +0200
Hi,

In r37027 I've commited basic slab allocator (based on macros from slab.h)

It's NOT thread safe allocator, but it should be good replacement for g_mem_chunk_alloc_*().
It might be also used as replacement for g_slice_*()

It has simillar function like g_mem_chunk to free all used memory (sl_free_all()).

I wanted to cleanup code like:
#if GLIB_CHECK_VERSION(2,10,0)
	ptr  = g_slice_new(...);
#else
	ptr = g_mem_chunk_alloc(...);
#endif
with single:
    ptr = sl_alloc(...);
sl_ allocator already passed multiple fuzz testing so it should be stable.

I know about near 1.6 release (and it looks like bigger change).
And maybe in 1.[78] we finally drop older glib release which would 
remove all g_mem_chunk_alloc().

Comments?