Provides memory management functionality (allocation and free).
|
| void * | mmosal_malloc_ (size_t size) |
| | Allocate memory of the given size and return a pointer to it (malloc). More...
|
| |
| void * | mmosal_malloc_dbg (size_t size, const char *name, unsigned line_number) |
| | Allocate memory of the given size and return a pointer to it (malloc) – debug version. More...
|
| |
| void | mmosal_free (void *p) |
| | Free the given memory allocation. More...
|
| |
| void * | mmosal_realloc (void *ptr, size_t size) |
| | Equivalent of standard library realloc(). More...
|
| |
| void * | mmosal_calloc (size_t nitems, size_t size) |
| | Equivalent of standard library calloc(). More...
|
| |
◆ mmosal_malloc
Allocate memory of the given size and return a pointer to it (malloc).
No guarantees made about initialization.
- Parameters
-
| size | The amount of memory to allocate (in bytes). |
- Returns
- pointer to the allocated memory on success, or NULL on failure.
Definition at line 137 of file mmosal.h.
◆ mmosal_calloc()
| void * mmosal_calloc |
( |
size_t |
nitems, |
|
|
size_t |
size |
|
) |
| |
Equivalent of standard library calloc().
- Parameters
-
| nitems | Number of blocks to allocate |
| size | Size of each block. |
- Returns
- pointer to the allocated memory on success, or NULL on failure.
Definition at line 38 of file mmosal_shim_bootloader.c.
◆ mmosal_free()
| void mmosal_free |
( |
void * |
p | ) |
|
◆ mmosal_malloc_()
| void * mmosal_malloc_ |
( |
size_t |
size | ) |
|
Allocate memory of the given size and return a pointer to it (malloc).
No guarantees made about initialization.
- Warning
- This function should not be used directly. Instead use mmosal_malloc().
- Parameters
-
| size | The amount of memory to allocate (in bytes). |
- Returns
- pointer to the allocated memory on success, or NULL on failure.
Definition at line 26 of file mmosal_shim_bootloader.c.
◆ mmosal_malloc_dbg()
| void * mmosal_malloc_dbg |
( |
size_t |
size, |
|
|
const char * |
name, |
|
|
unsigned |
line_number |
|
) |
| |
Allocate memory of the given size and return a pointer to it (malloc) – debug version.
No guarantees made about initialization.
- Warning
- This function should not be used directly. Instead use mmosal_malloc().
- Parameters
-
| size | The amount of memory to allocate (in bytes). |
| name | Name of the function that allocated the memory. |
| line_number | The line number at which the allocation happened. |
- Returns
- pointer to the allocated memory on success, or NULL on failure.
Definition at line 31 of file mmosal_shim_bootloader.c.
◆ mmosal_realloc()
| void * mmosal_realloc |
( |
void * |
ptr, |
|
|
size_t |
size |
|
) |
| |
Equivalent of standard library realloc().
- Parameters
-
| ptr | Previously allocated memory block to resize. |
| size | The new size. |
- Returns
- pointer to the resized block of memory, or
NULL.