Function isLastAllocation [src]

This has false negatives when the last allocation had an adjusted_index. In such case we won't be able to determine what the last allocation was because the alignForward operation done in alloc is not reversible.

Prototype

pub fn isLastAllocation(self: *FixedBufferAllocator, buf: []u8) bool

Parameters

self: *FixedBufferAllocatorbuf: []u8

Source

pub fn isLastAllocation(self: *FixedBufferAllocator, buf: []u8) bool { return buf.ptr + buf.len == self.buffer.ptr + self.end_index; }