|
|
Index Data > YAZ > YAZ User's Guide and Reference > Nibble Memory
Sometimes when you need to allocate and construct a large,
interconnected complex of structures, it can be a bit of a pain to
release the associated memory again. For the structures describing the
Z39.50 PDUs and related structures, it is convenient to use the
memory-management system of the ODR subsystem (see
the section called “Using ODR”). However, in some circumstances
where you might otherwise benefit from using a simple nibble memory
management system, it may be impractical to use
The following prototypes are given:
NMEM nmem_create(void);
void nmem_destroy(NMEM n);
void *nmem_malloc(NMEM n, int size);
void nmem_reset(NMEM n);
int nmem_total(NMEM n);
void nmem_init(void);
void nmem_exit(void);
The
The nibble memory pool is shared amongst threads. POSIX
mutex'es and WIN32 Critical sections are introduced to keep the
module thread safe. Function |
|||
|
|
||||
| Copyright Index Data ApS 2008 | ||||