The OpenD Programming Language

RegionAllocator.allocate

Allocates nBytes bytes on the RegionAllocatorStack used by this RegionAllocator instance. The last block allocated from this RegionAllocator instance can be freed by calling RegionAllocator.free or RegionAllocator.freeLast or will be automatically freed when the last copy of this RegionAllocator instance goes out of scope.

Allocation requests larger than segmentSize are allocated directly on the C heap, are scanned by the GC iff the RegionAllocatorStack instance that this object uses is scanned by the GC, and are freed according to the same rules as described above.

struct RegionAllocator
void*
allocate
(
size_t nBytes
)

Meta