MRPT
2.0.4
|
Header: #include <mrpt/system/memory.h>
.
Library: [mrpt-system]
Classes | |
class | mrpt::system::CGenericMemoryPool< DATA_PARAMS, POOLABLE_DATA > |
A generic system for versatile memory pooling. More... | |
Macros | |
#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". More... | |
#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. More... | |
Functions | |
unsigned long | mrpt::system::getMemoryUsage () |
Returns the memory occupied by this process, in bytes. More... | |
template<std::size_t alignment, typename T , typename = std::enable_if_t<std::is_pointer<T>::value>> | |
bool | mrpt::system::is_aligned (T ptr) |
#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".
Definition at line 41 of file memory.h.
Referenced by mrpt::maps::COccupancyGridMap2D::internal_insertObservation().
#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.
Definition at line 59 of file memory.h.
Referenced by mrpt::maps::COccupancyGridMap2D::internal_insertObservation().
unsigned long mrpt::system::getMemoryUsage | ( | ) |
Returns the memory occupied by this process, in bytes.
Definition at line 114 of file memory.cpp.
References _PROCESS_MEMORY_COUNTERS::cb, mrpt::system::os::fclose(), mrpt::system::os::fopen(), mrpt::system::CAuxPSAPI_Loader::GetProcessMemoryInfo(), MRPT_END, MRPT_START, and _PROCESS_MEMORY_COUNTERS::PagefileUsage.
Referenced by mrpt::hmtslam::CHMTSLAM::generateLogFiles(), mrpt::apps::RBPF_SLAM_App_Base::run(), and mrpt::apps::ICP_SLAM_App_Base::run().
Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020 |