Flat_Pool module

flat_pool_allocator_proc

procedure · 1 overloadSource

The Allocator_Proc for a flat pool: use it as Allocator.{ flat_pool_allocator_proc, *pool }.

Allocate and resize take from the pool (resize copies); free does nothing; startup initializes it and shutdown calls fini. It reports IS_THIS_YOURS for addresses in the part of the range used so far.

flat_pool_allocator_proc :: (
    mode: Allocator_Mode,
    requested_size: s64,
    old_size: s64,
    old_memory: *void,
    allocator_data: *void
) -> *void

The Allocator_Proc for a flat pool: use it as Allocator.{ flat_pool_allocator_proc, *pool }.

Allocate and resize take from the pool (resize copies); free does nothing; startup initializes it and shutdown calls fini. It reports IS_THIS_YOURS for addresses in the part of the range used so far.

Parameters

mode: Allocator_Mode
requested_size: s64
old_size: s64
old_memory: *void
allocator_data: *void

Returns

*void

See also