module ti.sysbios.heaps.HeapNull

Empty heap

C synopsis target-domain sourced in ti/sysbios/heaps/HeapNull.xdc
#include <ti/sysbios/heaps/HeapNull.h>
Functions
Void
Void
Void
Void
Functions common to all IHeap modules
Ptr 
Void 
Void 
Bool 
Functions common to all target instances
Functions common to all target modules
Typedefs
typedef HeapNull_Object *
typedef struct
typedef struct
typedef struct
 
Module-Wide Built-Ins

C synopsis target-domain
Types_ModuleId HeapNull_Module_id();
// Get this module's unique id
 
Bool HeapNull_Module_startupDone();
// Test if this module has completed startup
 
IHeap_Handle HeapNull_Module_heap();
// The heap from which this module allocates memory
 
Bool HeapNull_Module_hasMask();
// Test whether this module has a diagnostics mask
 
Bits16 HeapNull_Module_getMask();
// Returns the diagnostics mask for this module
 
Void HeapNull_Module_setMask(Bits16 mask);
// Set the diagnostics mask for this module
Instance Object Types

C synopsis target-domain
typedef struct HeapNull_Object HeapNull_Object;
// Opaque internal representation of an instance object
 
typedef HeapNull_Object *HeapNull_Handle;
// Client reference to an instance object
 
typedef struct HeapNull_Struct HeapNull_Struct;
// Opaque client structure large enough to hold an instance object
 
HeapNull_Handle HeapNull_handle(HeapNull_Struct *structP);
// Convert this instance structure pointer into an instance handle
 
HeapNull_Struct *HeapNull_struct(HeapNull_Handle handle);
// Convert this instance handle into an instance structure pointer
Instance Config Parameters

C synopsis target-domain
typedef struct HeapNull_Params {
// Instance config-params structure
    IInstance_Params *instance;
    // Common per-instance configs
} HeapNull_Params;
 
Void HeapNull_Params_init(HeapNull_Params *params);
// Initialize this config-params structure with supplier-specified defaults before instance creation
Runtime Instance Creation

C synopsis target-domain
HeapNull_Handle HeapNull_create(const HeapNull_Params *params, Error_Block *eb);
// Allocate and initialize a new instance object and return its handle
 
Void HeapNull_construct(HeapNull_Struct *structP, const HeapNull_Params *params);
// Initialize a new instance object inside the provided structure
ARGUMENTS
params — per-instance config params, or NULL to select default values (target-domain only)
eb — active error-handling block, or NULL to select default policy (target-domain only)
Instance Deletion

C synopsis target-domain
Void HeapNull_delete(HeapNull_Handle *handleP);
// Finalize and free this previously allocated instance object, setting the referenced handle to NULL
 
Void HeapNull_destruct(HeapNull_Struct *structP);
// Finalize the instance object inside the provided structure
 
HeapNull_alloc()  // instance

Allocates a block of memory from the heap

C synopsis target-domain
Ptr HeapNull_alloc(HeapNull_Handle handle, SizeT size, SizeT align, Error_Block *eb);
 
ARGUMENTS
handle — handle of a previously-created HeapNull instance object
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.
 
HeapNull_free()  // instance

Free a block of memory back to the heap

C synopsis target-domain
Void HeapNull_free(HeapNull_Handle handle, Ptr block, SizeT size);
 
ARGUMENTS
handle — handle of a previously-created HeapNull instance object
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.
 
HeapNull_getStats()  // instance

Retrieve the statistics from the heap

C synopsis target-domain
Void HeapNull_getStats(HeapNull_Handle handle, Memory_Stats *stats);
 
ARGUMENTS
handle — handle of a previously-created HeapNull instance object
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.
 
HeapNull_isBlocking()  // instance

Returns whether the heap may block during an alloc() or free()

C synopsis target-domain
Bool HeapNull_isBlocking(HeapNull_Handle handle);
 
ARGUMENTS
handle — handle of a previously-created HeapNull instance object
RETURNS
If the heap might block, TRUE is returned. If the heap does not block, FALSE is returned.
Instance Convertors

C synopsis target-domain
IHeap_Handle HeapNull_Handle_upCast(HeapNull_Handle handle);
// unconditionally move one level up the inheritance hierarchy
 
HeapNull_Handle HeapNull_Handle_downCast(IHeap_Handle handle);
// conditionally move one level down the inheritance hierarchy; NULL upon failure
Instance Built-Ins

C synopsis target-domain
Int HeapNull_Object_count();
// The number of statically-created instance objects
 
HeapNull_Handle HeapNull_Object_get(HeapNull_Object *array, Int i);
// The handle of the i-th statically-created instance object (array == NULL)
 
HeapNull_Handle HeapNull_Object_first();
// The handle of the first dynamically-created instance object, or NULL
 
HeapNull_Handle HeapNull_Object_next(HeapNull_Handle handle);
// The handle of the next dynamically-created instance object, or NULL
 
IHeap_Handle HeapNull_Object_heap();
// The heap used to allocate dynamically-created instance objects
 
Types_Label *HeapNull_Handle_label(HeapNull_Handle handle, Types_Label *buf);
// The label associated with this instance object
 
String HeapNull_Handle_name(HeapNull_Handle handle);
// The name of this instance object
 
Configuration settings sourced in ti/sysbios/heaps/HeapNull.xdc
var HeapNull = xdc.useModule('ti.sysbios.heaps.HeapNull');
module-wide config parameters
per-instance config parameters
    var params = new HeapNull.Params// Instance config-params object;
per-instance creation
    var inst = HeapNull.create// Create an instance-object(params);
 
 
metaonly config HeapNull.common$  // module-wide

Common module configuration parameters

Configuration settings
HeapNull.common$ = Types.Common$ undefined;
 
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 Config Parameters

Configuration settings
var params = new HeapNull.Params;
// Instance config-params object
Static Instance Creation

Configuration settings
var params = new HeapNull.Params;
// Allocate instance config-params
params.config =   ...
// Assign individual configs
 
var inst = HeapNull.create(params);
// Create an instance-object
ARGUMENTS
params — per-instance config params, or NULL to select default values (target-domain only)
eb — active error-handling block, or NULL to select default policy (target-domain only)
generated on Thu, 23 May 2019 00:22:23 GMT