no-OS
Functions
chibios_alloc.c File Reference
#include "no_os_alloc.h"
#include "hal.h"
#include <string.h>
Include dependency graph for chibios_alloc.c:

Functions

void * no_os_malloc (size_t size)
 Allocate memory and return a pointer to it. More...
 
void * no_os_calloc (size_t nitems, size_t size)
 Allocate memory and return a pointer to it, set memory to 0. More...
 
void no_os_free (void *ptr)
 Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc. More...
 

Function Documentation

◆ no_os_calloc()

void* no_os_calloc ( size_t  nitems,
size_t  size 
)

Allocate memory and return a pointer to it, set memory to 0.

Parameters
nitems- Number of elements to be allocated.
size- Size of elements.
Returns
Pointer to the allocated memory, or NULL if the request fails.
Here is the caller graph for this function:

◆ no_os_free()

void no_os_free ( void *  ptr)

Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.

Parameters
ptr- Pointer to a memory block previously allocated by a call to no_os_calloc or no_os_malloc.
Returns
None.
Here is the caller graph for this function:

◆ no_os_malloc()

void* no_os_malloc ( size_t  size)

Allocate memory and return a pointer to it.

Parameters
size- Size of the memory block, in bytes.
Returns
Pointer to the allocated memory, or NULL if the request fails.
Here is the caller graph for this function: