Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: xively-jumpstart-demo
xi_allocator.h
00001 // Copyright (c) 2003-2013, LogMeIn, Inc. All rights reserved. 00002 // This is part of Xively C library, it is under the BSD 3-Clause license. 00003 00004 /** 00005 * \file xi_allocator.h 00006 * \author Olgierd Humenczuk 00007 * \brief Our custom `alloc()` and `free()` 00008 * 00009 * This is a faced built for future use when limitation of certain embedded 00010 * devices require custom memory management, e.g. pooling and leak detection. 00011 */ 00012 00013 #ifndef __XI_ALLOCATOR_H__ 00014 #define __XI_ALLOCATOR_H__ 00015 00016 #ifdef __cplusplus 00017 extern "C" { 00018 #endif 00019 00020 /** 00021 * \brief Behaves like usual `malloc()`, which is supposed to allocate a chunk 00022 * of memory and return the pointer to it. 00023 * 00024 * \return Pointer to allocated memory or null in case of any error. 00025 */ 00026 void* xi_alloc( size_t bytes ); 00027 00028 /** 00029 * \brief Behaves like usual `free()`, it frees previously allocated chunk of 00030 * of memory. 00031 */ 00032 void xi_free( void* pointer ); 00033 00034 #ifdef __cplusplus 00035 } 00036 #endif 00037 00038 #endif
Generated on Wed Jul 13 2022 17:00:32 by
1.7.2