author | Jonas Fonseca <fonseca@diku.dk> | |
Wed, 18 Feb 2009 10:47:58 +0000 (11:47 +0100) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Wed, 18 Feb 2009 10:47:58 +0000 (11:47 +0100) | ||
commit | b2ff9a4ff12328580ae7402c1c09a0814c1b4c60 | |
tree | 04102785b7f1b7132bb7c0906fb3b303b7b3bb3a | tree | snapshot |
parent | b2d7778afb70e1d2493a66b71e4838ca91644743 | commit | diff |
Make the granular allocators more customizable using macros
Add a DEFINE_ALLOCATOR macro which can be used to define a custom
allocator which is more type safe than the current realloc_items and
which removed the need for using temporary variables for holding the
newly allocated chunk. The custom allocator also allows the allocation
granularity to be tweaked to the need of the user instead of being
hardcoded to 256 chunks for all.
Add a DEFINE_ALLOCATOR macro which can be used to define a custom
allocator which is more type safe than the current realloc_items and
which removed the need for using temporary variables for holding the
newly allocated chunk. The custom allocator also allows the allocation
granularity to be tweaked to the need of the user instead of being
hardcoded to 256 chunks for all.
tig.c | diff | blob | history |