StateOS
Loading...
Searching...
No Matches
Memory allocation

allocation of the memory for the objects created dynamically More...

Functions

void * sys_malloc (size_t size)
 system malloc procedure, deprecated
void sys_free (void *ptr)
 system free procedure, deprecated
size_t sys_heapSize (void)
 get total size of free blocks of the dedicated heap memory
size_t sys_segSize (void *ptr)
 get memory segment size

Detailed Description

allocation of the memory for the objects created dynamically

Function Documentation

◆ sys_malloc()

void * sys_malloc ( size_t size)
inline

system malloc procedure, deprecated

Parameters
sizerequired size of the memory segment (in bytes)
Returns
pointer to the beginning of allocated memory segment
Return values
NULLmemory segment not allocated (not enough free memory)
Note
use only in thread mode

◆ sys_free()

void sys_free ( void * ptr)
inline

system free procedure, deprecated

Parameters
ptrpointer to a memory segment previously allocated with sys_malloc, xxx_create or xxx_new functions
Note
use only in thread mode

◆ sys_heapSize()

size_t sys_heapSize ( void )

get total size of free blocks of the dedicated heap memory

Returns
size of free heap memory
Return values
0there is no dedicated heap memory or the heap is full
Note
use only in thread mode

◆ sys_segSize()

size_t sys_segSize ( void * ptr)

get memory segment size

Parameters
ptrpointer to a memory segment previously allocated with sys_malloc, xxx_create or xxx_new functions
Returns
size of allocated memory segment
Return values
0there is no dedicated heap memory or the heap is full
Note
use only in thread mode