\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.8.2 - Profiling tools, Hash Map, Union-find, Modifiers
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages

#include <CGAL/Memory_sizer.h>

Definition

The class Memory_sizer allows to measure the memory size used by the process.

Both the virtual memory size and the resident size are available (the resident size does not account for swapped out memory nor for the memory which is not yet paged-in).

Implementation

Accessing this information requires the use of non-portable code. Currently, there is support for Linux platforms, the Microsoft and Intel compiler on Windows, as well as Mac OS X. If a platform is not supported, the two member functions return 0.

Types

typedef std::size_t size_type
 

Creation

 Memory_sizer ()
 Default constructor.
 

Operations

size_type virtual_size () const
 Returns the virtual memory size in bytes.
 
size_type resident_size () const
 Returns the resident memory size in bytes.