Skip to main content

ddwaf_synchronized_pool_allocator_init

Function ddwaf_synchronized_pool_allocator_init 

Source
pub unsafe extern "C" fn ddwaf_synchronized_pool_allocator_init() -> ddwaf_allocator
Expand description

Creates a thread-safe pool allocator. Allocations are served from internal pools sized by block class to reduce fragmentation and allocator overhead; memory freed via the corresponding ddwaf APIs is returned to the pools for reuse. This allocator can be shared across threads safely.

Lifetime and safety:

  • The allocator must not be destroyed while any memory obtained from it is still in use; doing so will invalidate outstanding pointers.

@return Allocator handle.