#include <mrpt/utils/utils_defs.h>

Go to the source code of this file.
Namespaces | |
| namespace | mrpt |
This is the global namespace for all Mobile Robot Porgramming Toolkit (MRPT) libraries. | |
| namespace | mrpt::system |
This namespace provides a OS-independent interface to many useful functions: filenames manipulation, time and date, string parsing, file I/O, threading, memory allocation, etc. | |
| namespace | mrpt::system::os |
This namespace provides a OS-independent interface to low-level functions. | |
Defines | |
| #define | mrpt_alloca(nBytes) ::malloc( nBytes ); |
| In platforms and compilers with support to "alloca", allocate a memory block on the stack; if alloca is not supported, it is emulated as a normal "malloc" - NOTICE: Since in some platforms alloca will be emulated with malloc, alloca_free MUST BE ALWAYS CALLED to avoid memory leaks. | |
| #define | mrpt_alloca_free(mem_block) free(mem_block) |
| This method must be called to "free" each memory block allocated with "system::alloca": If the block was really allocated in the stack, no operation is actually performed, otherwise it will be freed from the heap. | |
Functions | |
| unsigned long MRPTDLLIMPEXP | mrpt::system::getMemoryUsage () |
| Returns the memory occupied by this process, in bytes. | |
Aligned memory management | |
| void MRPTDLLIMPEXP * | mrpt::system::os::aligned_malloc (size_t bytes, size_t alignment) |
| Returns an aligned memory block. | |
| void MRPTDLLIMPEXP * | mrpt::system::os::aligned_calloc (size_t bytes, size_t alignment) |
| Identical to aligned_malloc, but it zeroes the reserved memory block. | |
| void MRPTDLLIMPEXP * | mrpt::system::os::aligned_realloc (void *old_ptr, size_t bytes, size_t alignment) |
| Frees a memory block reserved by aligned_malloc. | |
| void MRPTDLLIMPEXP | mrpt::system::os::aligned_free (void *p) |
| Frees a memory block reserved by aligned_malloc. | |
| #define mrpt_alloca | ( | nBytes | ) | ::malloc( nBytes ); |
In platforms and compilers with support to "alloca", allocate a memory block on the stack; if alloca is not supported, it is emulated as a normal "malloc" - NOTICE: Since in some platforms alloca will be emulated with malloc, alloca_free MUST BE ALWAYS CALLED to avoid memory leaks.
This method MUST BE a macro rather than a function in order to operate on the caller's stack.
| #define mrpt_alloca_free | ( | mem_block | ) | free(mem_block) |
This method must be called to "free" each memory block allocated with "system::alloca": If the block was really allocated in the stack, no operation is actually performed, otherwise it will be freed from the heap.
This method MUST BE a macro rather than a function in order to operate on the caller's stack.
| Page generated by Doxygen 1.6.2 for MRPT 0.8.1 SVN:exported at Mon Feb 15 22:01:07 UTC 2010 |