IPC@CHIP® RTOS-PPC – API Documentation

Header image

Main page


Program Configuration Constants

A few symbolic linker constants are used to control certain aspects of the application programs. These constants are listed here.

__stack_size

This constant controls the stack size of the program's main() task. The default value is 8192 bytes. The setStackSize macro may be used to override this default value.

__heap_initial_size

This constant specifies the program's initial heap size. Depending on how the heap manager is configured, this may also be the heap's final size. The default heap size is 4096 bytes. This can be overridden with the setHeapInitialSize macro.

__heap_increment

The default program heap increment used during a heap grow operation is 8192 bytes. This default value can be overridden using the setHeapIncrement macro.

This constant does not apply when the user replaces the library's default heap_option::_heap_can_grow control integer with one that is initialized to zero, in which case the heap will always remain at its initial size.

__space_reserve

When non-zero, this constant specifies the total amount of address space in bytes which should be reserved for this program. By default this value is zero and a default 32 MByte will be reserved for this program. Note the difference between the abstraction address space and physical memory. No additional physical memory is being reserved for the application based on this constant. Only address space is reserved.

Reserving address space makes it less likely that a program's heap grow action will fail due to being boxed in by a subsequently launched application that was assigned the address space above your application program, making it not possible for your program's heap space to grow any further.

For programs which will not grow any larger than their initial image size, it is recommended that this constant be set to 1 MByte, which is below the system's resolution for address space allocation units. This setting will allow a subsequent program to be placed immediately after this program's image, rounded up to the next space allocation unit boundary. This can make small driver programs, for example, have less impact on the system resources by conserving application program address space. See the illustrations here.

The system will do its best to respect your reservation. However, if too many other programs have also reserved address space in this manner and the system's total budget of 256 Mega-bytes application space is running low when a subsequent program is launched, then the system may need to apply some of your program's reserved address space for the subsequent application program. (However, the system would never take any of your program's used address space, only some of its reserved space.)

This value can be set with the setSpaceReserve macro.

__prog_attributes

This is a bit field of program attributes. Currently there are only two bits defined. These may be OR'ed together. All unused bits should be set zero, reserved for future definitions.

By default all flag bits are zero. The setProgramAttributes macro can be used to set this __prog_attributes constant.






Top of page | Main page

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