Function in ldk_os.h

ldk_os_memory_alloc

Allocate memory using the OS abstraction.

LDK_API void * ldk_os_memory_alloc(size_t size);

Parameters

size_t size
Size of the data or region, in bytes where applicable.

Returns

Pointer to the requested object or data; NULL when unavailable.

Function in ldk_os.h

ldk_os_memory_free

Release an OS-allocated memory block.

LDK_API void ldk_os_memory_free(void *memory);

Parameters

void *memory
Memory used by this operation.
Function in ldk_os.h

ldk_os_memory_resize

Resize an OS-allocated block of memory.

LDK_API void * ldk_os_memory_resize(
 void *memory,
 size_t size
);

Parameters

void *memory
Memory used by this operation.
size_t size
Size of the data or region, in bytes where applicable.

Returns

Pointer to the requested object or data; NULL when unavailable.