dmd.root.region
Region storage allocator implementation.
License
Source: root/region.d
Documentation: https://dlang.org/phobos/dmd_root_region.html
-
Declaration
structRegion;Simple region storage allocator.
-
Declaration
nothrow void*malloc(size_tnbytes);Allocate
nbytes. Aborts on failure.Parameters
size_tnbytesnumber of bytes to allocate, can be 0, must be <= than MaxAllocSize
Return Value
allocated data,
nullfornbytes==0 -
Declaration
nothrow RegionPossavePos();Return stack position for allocations in this region.
Return Value
an opaque struct to be passed to
release() -
Declaration
nothrow voidrelease(RegionPospos);Release the memory that was allocated after the respective call to
savePos().Parameters
RegionPosposposition returned by
savePos() -
Declaration
nothrow boolcontains(void*p);If pointer points into Region.
Parameters
void*ppointer to check
Return Value
trueif it points into the region -
Declaration
nothrow size_tsize();Return Value
sizeof Region
-