Alternative C Library

The Alternative C language library contains equivalents of functions found in the standard C language library. This library separates products so they do not rely on elements from the standard C library. It includes alternative functions for:

Each set of functions can be excluded from compilation, in which case the corresponding functions from the standard C library will be used. This is achieved by setting the following constants to 1: ST_USE_MALLOC_CLIB for memory management, ST_USE_MEMORY_CLIB for basic memory operations, and ST_USE_STRING_CLIB for basic string operations.

When using the memory management module from the alternative C library, the memory management module of the Standard Library must be active. This is done by setting ST_USE_MEMORY to 1. The memory size should be defined in ST_MALLOC_SIZE. This memory will be declared as a global buffer, and functions allocating memory will operate within it. If the memory size is not defined, the default value is 8192 bytes (8 KB). To use memory at a different address, that address should be defined in ST_MALLOC_BASE_ADDRESS, and ST_MALLOC_BUFFERED should be set to 0.

SpaceShadow documentation