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

# fzrt_new_ptr

Description

Allocates a non-relocatable block of memory. This will allocate a block of memory in the applications heap and set the contents to zeros. This block is non-relocatable on MacOS 9, and may cause fragmentation of memory, therefore it should only be used to allocate temporary memory. Persistent blocks of dynamic memory should use mem zones.

Plugin Prototype

fzrt_error_td fzrt_new_ptr(

fzrt_size | byteCount,
fzrt_ptr * | new_ptr )

Parameters

byteCount [Input]

the desired size of the memory block

new_ptr [Result]

pointer to a pointer that receives the pointer to a newly allocated memory block

Returns

FZRT_NOERR if successful, err code otherwise

Availability

5.0.0.0

See Also

, fz_mem_zone_alloc,

Function Set

fz_fzrt_mem_fset

Defined in

fzrt_api.h