@CHIP-RTOS C Library - Helper Functions


Reentrant malloc() for use with multitasking.

void * malloc (unsigned int size);



Number of bytes to allocate from heap.

Return Value

Pointer to newly allocated memory on success
NULL pointer on allocation failure


This function provides semaphore protection around the compiler's standard C-library malloc() function.

This function is available only with the Paradigm Beck IPC Edition compiler.    The necessary hooks into the compiler's Run-Time Library (RTL) are not available with other compilers.

This function is not part of the Beck C-Library.   You must link the provided HEAP.C source file directly into your project to use this reentrant heap manager.   This source file can be found in the Paradigm Beck IPC Edition compiler's installation area in the Source/Beck directory.

These alternative heap functions may only be linked with the single-threaded Run-Time Library (RTL).   An equivalent to these heap functions is already built into either of the multi-threaded Paradigm RTL optional libraries, so there is no need for this HEAP.C source file when the multi-tasking libraries are used.

The reentrant malloc(), free(), realloc() and farcoreleft() come together as one package inside the HEAP.C source file.

Refer to your compiler's standard library documentation for a description of this API's basic functionality.

    A further alternative for a multi-tasking far heap is offered by the BeckHeap library. The density of objects is greater with the BeckHeap, and it resolves the MEMGAP problem.

See Also

Supported since or modified in @CHIP-RTOS version


This API List
List of C Libraries
@CHIP-RTOS Main Index

End of document