nn::fnd::FrameHeapTemplate

nn::fnd::FrameHeapTemplate Class

Syntax

template <class LockPolicy>
class FrameHeapTemplate :public nn::fnd::FrameHeapBase

Template Arguments

Name Description
LockPolicy Specifies the lock policy to use during operations on the heap.

Description

Class template for the frame heap.

In classes that instantiate this class template, mutual exclusion is done using the lock policy specified by this function. For the lock policy, you can either specify one of the classes declared within the nn::os::LockPolicy class, or specify a class that instantiates the class template. Neither operation nor compatibility is guaranteed if you specify any other class for the LockPolicy argument.

Locking is only performed on operations within the heap. If you want to perform operations on the heap hierarchy, you must take additional appropriate measures to ensure exclusive access.

Classes

nn::fnd::FrameHeapTemplate::ScopedFrame Class for storing the state of the frame heap individually for each scope.

Member Functions

FrameHeapTemplate Constructor. No initialization is performed.
Initialize Initializes the frame heap.
Finalize Destroys the heap.
V ~FrameHeapTemplate Destructor. Calls Finalize.
Allocate Allocates memory from the frame heap.
ResizeBlock Resizes the memory block that was most recently allocated from the frame heap.
Free Frees all memory blocks that have been allocated from the frame heap.
V FreeV This function is defined only for consistency with the other heap types and cannot be called.
SaveState Saves the state of the frame heap.
RestoreState Restores the state of the frame heap.
Adjust Resizes the frame heap to the minimum size required to encompass the memory blocks that have been allocated.
GetAllocatableSize Gets the size of the memory block that can be allocated from the frame heap.
V GetStartAddress Gets the starting address of the frame heap's memory region.
V GetTotalSize Gets the memory size allocated to the frame heap.
V HasAddress Determines whether the specified address is located within a heap.
V Dump Displays a heap's internal information. (Used for debugging.)
S Create Creates a frame heap within a parent heap.

Class Hierarchy

nn::util::NonCopyable
  nn::fnd::IntrusiveLinkedList
    nn::fnd::HeapBase
      nn::fnd::FrameHeapBase
        nn::fnd::FrameHeapTemplate

Revision History

2010/01/07
Initial version.

CONFIDENTIAL