_elmpool Struct Reference

Small fixed size data elements management. More...

List of all members.

Public Attributes

int elm_sz
int inc_num
void * frees
void * blks


Detailed Description

Small fixed size data elements management.

It is used to management a large number of data elements they with the same memory size, a fixed size. It allocate a large block for a lot of elements a time for more efficiency utilization of memory.

Elements with the size and in a large number usually be accessed very close in time. Allocate a large block for elements also increase cache hit rate.

Blocks are keep track as a linking list. They are freed when the elmpool_t is freed. It costs overhead of size of a element for each block. We use memory of first element of blocks to be next pointer of linking list. So, it can not be used by user code.

Definition at line 22 of file tools.c.


Member Data Documentation

Definition at line 23 of file tools.c.

Definition at line 24 of file tools.c.

Definition at line 25 of file tools.c.

Definition at line 26 of file tools.c.


The documentation for this struct was generated from the following file:
SourceForge.net Logo