Struct std.experimental.allocator.building_blocks.region.Region
A Region allocator allocates memory straight from one contiguous chunk.
There is no deallocation, and once the region is full, allocation requests
return null. Therefore, Regions are often used (a) in conjunction with
more sophisticated allocators; or (b) for batch-style very fast allocations
that deallocate everything at once.
						
				struct Region(ParentAllocator, uint minAlign = platformAlignment, Flag!("growDownwards") growDownwards = No
				The region only stores three pointers, corresponding to the current position in the store and the limits. One allocation entails rounding up the allocation size for alignment purposes, bumping the current pointer, and comparing it against the limit.
If ParentAllocator is different from NullAllocator, Region
deallocates the chunk of memory during destruction.
The minAlign parameter establishes alignment. If minAlign > 1, the
sizes of all allocation requests are rounded up to a multiple of minAlign.
Applications aiming at maximum speed may want to choose minAlign = 1 and
control alignment externally.
Constructors
| Name | Description | 
|---|---|
| this | Constructs a region backed by a user-provided store.
    Assumes the memory was allocated with ParentAllocator(if different fromNullAllocator). | 
Fields
| Name | Type | Description | 
|---|---|---|
| parent | ParentAllocator | The parent allocator. Depending on whether ParentAllocatorholds state
    or not, this is a member variable or an alias forParentAllocator. | 
Methods
| Name | Description | 
|---|---|
| alignedAllocate | Allocates nbytes of memory aligned at alignmenta. | 
| allocate | Allocates nbytes of memory. The shortest path involves an alignment
    adjustment (ifalignment > 1), an increment, and a comparison. | 
| allocateAll | Allocates and returns all memory available to this region. | 
| available | Nonstandard property that returns bytes available for allocation. | 
| deallocate | Deallocates b. This works only ifbwas obtained as the last call
    toallocate; otherwise (i.e. another allocation has occurred since) it
    does nothing. | 
| deallocateAll | Deallocates all memory allocated by this region, which can be subsequently reused for new allocations. | 
| empty | Returns Ternaryif no memory has been allocated in this region,Ternaryotherwise. (Never returnsTernary.) | 
| expand | Expands an allocated block in place. Expansion will succeed only if the
    block is the last allocated. Defined only if growDownwardsisNo. | 
| goodAllocSize | Rounds the given size to a multiple of the alignment | 
| owns | Queries whether bhas been allocated with this region. | 
Aliases
| Name | Description | 
|---|---|
| alignment | Alignment offered. | 
Example
import std