Xively Official / mbed-libxively-5d6fdd4

Dependents:   xively-jumpstart-demo

Embed: (wiki syntax)

« Back to documentation index

xi_allocator.h File Reference

xi_allocator.h File Reference

Our custom `alloc()` and `free()`. More...

Go to the source code of this file.

Functions

void * xi_alloc (size_t bytes)
 Behaves like usual `malloc()`, which is supposed to allocate a chunk of memory and return the pointer to it.
void xi_free (void *pointer)
 Behaves like usual `free()`, it frees previously allocated chunk of of memory.

Detailed Description

Our custom `alloc()` and `free()`.

Author:
Olgierd Humenczuk This is a faced built for future use when limitation of certain embedded devices require custom memory management, e.g. pooling and leak detection.

Definition in file xi_allocator.h.


Function Documentation

void* xi_alloc ( size_t  bytes )

Behaves like usual `malloc()`, which is supposed to allocate a chunk of memory and return the pointer to it.

Returns:
Pointer to allocated memory or null in case of any error.

Definition at line 13 of file xi_allocator.c.

void xi_free ( void *  pointer )

Behaves like usual `free()`, it frees previously allocated chunk of of memory.

Definition at line 18 of file xi_allocator.c.