You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
766 B
25 lines
766 B
3 months ago
|
Generic allocators
|
||
|
==================
|
||
|
|
||
|
Sometimes, we want to define data structures, whose memory allocation can be
|
||
|
parametrized. If we wish to squeeze out the last bit of performance, we
|
||
|
tie the structure to a certain allocator in compile time (as we do for
|
||
|
<<hashtable:,hash tables>>). If performance is not so critical, allocators
|
||
|
can be swapped in run time.
|
||
|
|
||
|
This module defines a generic interface to memory allocators. You can use
|
||
|
the following pre-defined allocators, or define some of your own.
|
||
|
|
||
|
* <<std,Standard malloc-based allocator>>
|
||
|
* <<zeroing,Zeroing malloc-based allocator>>
|
||
|
* <<mempool:fun_mp_get_allocator,Memory pools>>
|
||
|
|
||
|
These data structures accept an allocator (more will come later):
|
||
|
|
||
|
* Growing arrays
|
||
|
|
||
|
ucw/alloc.h
|
||
|
-----------
|
||
|
|
||
|
!!ucw/alloc.h
|