nn::fnd::ExpHeapTemplate::Adjust Member Function

Syntax

MemoryRange Adjust(
     HeapAdjustMode mode
);

Arguments

Name Description
in mode Specifies whether to reduce the heap starting from the tail (HEAP_ADJUST_TAIL) or the head (HEAP_ADJUST_HEAD) of the heap.

Return Values

Returns the range of the memory region that has become available as a result of the reduction in heap size. If the heap could not be reduced, the size of the MemoryRange object returned is zero.

Description

Frees unused areas of the expanded heap to reduce the amount of memory the expanded heap uses.

This function has different return values than the version of the Adjust function that takes no arguments. This function returns an nn::fnd::MemoryRange object as its return value. This nn::fnd::MemoryRange object can be used to create a new heap in the freed memory region. We do not recommend using the version of the Adjust function that takes no arguments. When using the Adjust function, use the version documented on this page.

Revision History

2010/01/14
Added this as an overloaded function with an argument that allows the direction of reduction to be specified.

CONFIDENTIAL