fast.buffer

Fast buffer implementation.

Members

Functions

asOutputRange
auto asOutputRange(T* t)
Undocumented in source. Be warned that the author may not have intended to support it.
bufferArg
enum bufferArg()
Undocumented in source. Be warned that the author may not have intended to support it.
stackBuffer
auto stackBuffer()

Returns a structure to your stack that contains a buffer of bytes size. Memory is allocated by calling .alloc!T(count) on it in order to get count elements of type T. The return value will be a RAII structure that releases the memory back to the stack buffer upon destruction, so it can be reused. The pointer within that RAII structure is aligned to T.alignof. If the internal buffer isn't enough to fulfill the request including padding from alignment, then malloc() is used instead.

tempBuffer
TempBuffer!T tempBuffer(void* buffer)
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

allocaLimit
enum allocaLimit;
Undocumented in source.

Structs

LimitedScopeBuffer
struct LimitedScopeBuffer(T, size_t n)

Fixed maximum number of items on the stack. Memory is a static stack buffer. This buffer can be filled up and cleared for reuse.

RaiiArray
struct RaiiArray(T)

Dynamic array using malloc, realloc and free under the hood. Note that memory will be released on scope exit.

StackBuffer
struct StackBuffer(size_t bytes)
Undocumented in source.
StackBufferEntry
struct StackBufferEntry(T)
Undocumented in source.
TempBuffer
struct TempBuffer(T)
Undocumented in source.

Meta