Unused slabs which get recycled are no longer reinitialized from scratch if their chunk size matches what the allocator needed. If the chunk size matches, the list of available chunks is left unchanged, and just the various counters are reset.
Added __get_slab_stats() function.
Added support for global __slab_purge_threshold tuning variable.
Added a short test program for the slab allocator.
The malloc-test program was linked against the wrong object file in GNUmakefile.68k. Fixed.
If the first slab in the list of slabs which share the same chunk size has no more room, it means that all other slabs following it have no room either. This speeds up the test to find a slab with free space, which can now abort and directly proceed to allocate memory for a new slab.
If an empty slab's decay count hits zero, it is moved to the front of the empty slab list to be reclaimed more quickly.
Allocations made from the slab now carry a pointer back to the slab which they are a part of. This speeds up deallocation but has the downside of making the smallest usable slab chunk size 64 bytes, which is double what used to be the minimum before.
The maximum slab size is now 2^17 bytes (= 131072). If you request a slab size larger than this, you will get slab sizes of 131072 bytes instead.
Enabling the memory management debugging code no longer produces compiler errors.