init
Function parameters
Parameters
- buffer:[]u8
Functions in this namespace
Functions
- allocator
- Using this at the same time as the interface returned by `threadSafeAllocator` is not thread safe.
- threadSafeAllocator
- Provides a lock free thread safe `Allocator` interface to the underlying `FixedBufferAllocator`
- isLastAllocation
- This has false negatives when the last allocation had an
Source
Implementation
pub fn init(buffer: []u8) FixedBufferAllocator {
return .{
.buffer = buffer,
.end_index = 0,
};
}