Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
#include <mitkMemoryUtilities.h>
Static Public Member Functions | |
static vcl_size_t | GetProcessMemoryUsage () |
static vcl_size_t | GetTotalSizeOfPhysicalRam () |
template<typename ElementType > | |
static ElementType * | AllocateElements (vcl_size_t numberOfElements, bool noThrow=false) |
template<typename ElementType > | |
static void | DeleteElements (ElementType *elements) |
Static Protected Member Functions | |
static int | ReadStatmFromProcFS (int *size, int *res, int *shared, int *text, int *sharedLibs, int *stack, int *dirtyPages) |
Definition at line 25 of file mitkMemoryUtilities.h.
|
inlinestatic |
Allocates an array of a given number of elements. Each element has a size of sizeof(ElementType). The function returns NULL, if the array could not be allocated.
numberOfElements | the number of elements of the array |
noThrow | if set to false, an exception is thrown if memory allocation fails. If set to true, a itk::MemoryAllocationError is thrown |
Definition at line 53 of file mitkMemoryUtilities.h.
|
inlinestatic |
Deletes an array of elements previously allocated by AllocateElements.
elements | the array to delete. Not that NULL is an accepted value. |
Definition at line 79 of file mitkMemoryUtilities.h.
|
static |
Returns the memory usage of the current process in bytes. On linux, this refers to the virtual memory allocated by the process (the VIRT column in top). On windows, this refery to the size in bytes of the working set pages (the "Speicherauslastung" column in the task manager).
Definition at line 40 of file mitkMemoryUtilities.cpp.
References ReadStatmFromProcFS().
Referenced by QmitkMemoryUsageIndicatorView::UpdateMemoryUsage().
|
static |
Returns the total size of phyiscal memory in bytes
Definition at line 74 of file mitkMemoryUtilities.cpp.
Referenced by mitk::SurfaceBasedInterpolationController::EstimatePortionOfNeededMemory(), mitk::SurfaceInterpolationController::EstimatePortionOfNeededMemory(), and QmitkMemoryUsageIndicatorView::UpdateMemoryUsage().
|
staticprotected |
Definition at line 100 of file mitkMemoryUtilities.cpp.
Referenced by GetProcessMemoryUsage().