IPC@CHIP® RTOS-PPC – API Documentation

Header image

Main page


#define setSpaceReserve ( space   )     initLinkerSymbol(__space_reserve, (space * 0x100000))

This macro function sets the __space_reserve program constant. By default, this value is zero in which case the system will apply the default reserve space allocation of 32 Mega-bytes. When this constant is non-zero, this default 32 Mega-byte address space reservation size is overriden.

Note that when speaking of reserved address space here, this will always include the program's image space which is actually used.

For programs which will never need this 32 Mega-bytes of address space, this macro can be used to specify a lower value which will conserve application program memory address space.

A program can allocate additional heap space from the system during run-time provided that 1) the standard heap is used, 2) physical memory is available and 3) additional virtual address space is available to append to the program's current image. This third requirement is why reserve address space is desireable for a program.

The space value must be a constant expression.

Note that the units used in the argument here are Mega-bytes while the units on the __space_reserve constant which is set here are bytes. (Due to the granularity of the system's application program address space allocations, resolution below mega-bytes would serve no purpose here.)

Example:
This would be placed in one of your C files outside the scope of any module. The units are Mega-bytes.

     // Reduce program's reserve space from default 32 MByte to 16 MByte.
setSpaceReserve(16) ;
Since:
SC2x3 V1.00 - CLIB V1.00
Compatibility:
This macro does not exists in the SC1x, SC2x and SC1x3 C-Library.
See also:
setHeapInitialSize      setHeapIncrement





Top of page | Main page

Copyright © 2017 Beck IPC GmbH
Generated on Thu Jan 26 16:21:36 2017 by Doxygen 1.6.1