interface xdc.runtime.IHeap |
|
|
|
Interface to heap functions
All heap implementations inherit from this interface.
The implementations can have additional configuration
parmeters and functions.
interface IHeap { ...
instance: ...
interface IHeap {
module-wide config parameters
instance:
per-instance creation
per-instance functions
}
metaonly config IHeap.common$ // module-wide |
|
Common module configuration parameters
DETAILS
All modules have this configuration parameter. Its name
contains the '$' character to ensure it does not conflict with
configuration parameters declared by the module. This allows
new configuration parameters to be added in the future without
any chance of breaking existing modules.
Instance Creation |
|
create();
// Create an instance-object
DETAILS
See specific IHeap implementation for parameters used.
IHeap.alloc() // instance |
|
Allocates a block of memory from the heap
ARGUMENTS
size
size (in MADUs) of the block
align
alignment (in MADUs) of the block
eb
pointer to error block
DETAILS
This method returns a block of memory from the heap.
It is called by the
xdc.runtime.Memory.alloc() function.
RETURNS
Returns the address of the allocated memory.
IHeap.free() // instance |
|
Free a block of memory back to the heap
Void free(Ptr block, SizeT size);
ARGUMENTS
block
non-NULL address of allocated block to free
size
size (in MADUs) of the block of memory to free
DETAILS
This method gives back a block of memory to a heap.
It is called by the
xdc.runtime.Memory.free() function.
IHeap.getStats() // instance |
|
Retrieve the statistics from the heap
ARGUMENTS
stats
non-NULL pointer to an output buffer
DETAILS
The caller passes in a pointer to a
xdc.runtime.Memory.Stats
structure and
getStats fills in this structure.
This function is called by the
xdc.runtime.Memory.getStats()
function.
IHeap.isBlocking() // instance |
|
Returns whether the heap may block during an alloc() or
free()
RETURNS
If the heap might block, TRUE is returned.
If the heap does not block, FALSE is returned.
generated on Thu, 27 Sep 2012 23:21:04 GMT