|
0 A.D. | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
allocator design goals: - either fixed- or variable-sized blocks; - allow freeing individual blocks if they are all fixed-size; - never relocates; - no fixed limit. note: this type of allocator is called "region-based" in the literature. see "Reconsidering Custom Memory Allocation" (Berger, Zorn, McKinley). if individual variable-size elements must be freeable, consider "reaps": basically a combination of region and heap, where frees go to the heap and allocs exhaust that memory first and otherwise use the region. opaque! do not read/write any fields!
Field Summary | |
u8* |
bucket
currently open bucket. |
size_t |
el_size : 16
|
void* |
freelist
|
uint |
num_buckets : 16
records # buckets allocated; verifies the list of buckets is correct. |
size_t |
pos
offset of free space at end of current bucket (i.e. # bytes in use). |
Field Detail |
public u8* bucket;
public size_t el_size : 16;
public void* freelist;
public uint num_buckets : 16;
public size_t pos;
|
0 A.D.
Generated on September 04, 2007 at 18:13 CppDoc v2.4.0 |
|||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |