RTI Connext Micro C API Version 4.2.0
Loading...
Searching...
No Matches
osapi_heap.h File Reference

Heap interface definition. More...

#include "osapi/osapi_dll.h"
#include "osapi/osapi_types.h"
#include "osapi/osapi_heap_impl.h"

Macros

#define OSAPI_ALIGNMENT_DEFAULT   (-1)
 Certain methods allow a default alignment: this should be an alignment that follows the "malloc" alignment of the architecture (aligned sufficiently to store any C-structure efficiently).
 
#define OSAPI_Heap_is_address_aligned(location, alignment)
 Check if a particular address is aligned to an alignment.
 
#define OSAPI_Heap_align_size_up(size, alignment)
 Aligns a particular address to an alignment alignment.
 

Typedefs

typedef RTI_INT32 OSAPI_Alignment_T
 The OSAPIAlignment is the alignment in bytes; an address is aligned when it is a positive integer multiple of the alignment.
 

Functions

void * OSAPI_Heap_allocate (RTI_SIZE_T count, RTI_SIZE_T size)
 Allocates zero-initialized memory from the heap.
 
OSPSLDllExport void * OSAPI_Heap_realloc (void *ptr, RTI_SIZE_T size)
 Reallocate memory from the heap.
 
void OSAPI_Heap_free (void *ptr)
 Frees memory allocated from the heap.
 
OSPSLDllExport void OSAPI_Heap_allocate_buffer (char **buffer, RTI_SIZE_T size, OSAPI_Alignment_T alignment)
 Allocate a block of memory of the provided size from the heap.
 
OSPSLDllExport void OSAPI_Heap_free_buffer (void *buffer)
 A static method to return a block (that was previously allocated with OSAPI_Heap_allocate_buffer) to the heap.
 

Detailed Description

Heap interface definition.