Overview   Project   Class   Tree   Deprecated   Index 
0 A.D.
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

lib
Struct Bucket

   in allocators.h

struct Bucket

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

bucket

public u8* bucket;
currently open bucket.

el_size

public size_t el_size : 16;

freelist

public void* freelist;

num_buckets

public uint num_buckets : 16;
records # buckets allocated; verifies the list of buckets is correct.

pos

public size_t pos;
offset of free space at end of current bucket (i.e. # bytes in use).

 Overview   Project   Class   Tree   Deprecated   Index 
0 A.D.
Generated on September 04, 2007 at 18:13
CppDoc v2.4.0
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD