no-OS
Functions
no_os_alloc.h File Reference
#include <stdio.h>
#include <stdlib.h>
Include dependency graph for no_os_alloc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

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: