formZ SDK | 5.0 API Reference | System | Runtime Library (FZRT) | Memory

# fz_mem_zone_alloc

Description

This will allocate a memory block from a mem zone. The mem zone can be either static or dynamic, or NULL. If the mem zone is NULL, the call is the same a fzrt_new_ptr. The memory must be freed with a call to , using the same mem zone. A pointer to the newly allocated memory is returned if successful; it is NULL if unsuccessful

Plugin Prototype

fzrt_error_td fz_mem_zone_alloc(

fzrt_zone_ptr | zone_ptr,
fzrt_int | size,
fzrt_boolean | clearit,
fzrt_ptr * | new_ptr )

Parameters

zone_ptr [Input, Optional]

mem zone to allocate memory from, NULL to allocate from

size [Input]

size of memory to allocate

clearit [Input]

TRUE to clear memory to zeros, FALSE otherwise

new_ptr [Result]

pointer to pointer that receives the newly allocated pointer

Returns

FZRT_NOERR on success, error ID otherwise.

Availability

5.0.0.0

See Also

, fz_mem_zone_static_init,

Function Set

fz_fzrt_mem_fset

Defined in

fzrt_api.h