Memory Management Demos

Compilation

Navigate to $CAFE_SDK_ROOT/system/src/demo/os/memory and enter make.
The executable (.elf) files are generated in the $CAFE_SDK_ROOT/system/bin/ghs/cafe/demo/os/nemory/DEBUG directory.

Execution

Setting up DVDRoot is not required because the optical disc is not accessed.
Load the generated .elf file in the $CAFE_SDK_ROOT/system/bin/ghs/cafe/demo/os/memory/DEBUG/ directory.

Description

The following samples use the OSReport function to output results with debug print. Nothing is output onscreen.
There are some sections which use the MEMDumpHeap function, which is valid only in debug builds, so the output for debug builds differs slightly from non-debug builds.

default_heap_basic_usage This basic demo allocates memory from the default heap and frees it.
replace_default_heap This demo shows how to replace the default heap with a user-defined heap.  This can be performed if you wish your default heap to be different from the stock implementation, or if you wish to use a different algorithm to choose blocks to allocate within the heap.
create_heap_for_application This demo reduces the size of the default heap to make some free space, then uses the free space to create another heap.
baseheap This simple demo shows how to get information about the base heap.

Revision History

2013-05-08 Automated cleanup pass.
2010-11-01 Initial version.


CONFIDENTIAL