https://gitlab.opengeosys.org/ogs/ogs.git
Raw File
Tip revision: 6eefabc2ac5dd10e67d8b05fe9b00d4ee3edfc0c authored by Christoph Lehmann on 17 February 2016, 12:22:33 UTC
[NL] added a remark
Tip revision: 6eefabc
MemWatch.h
/**
 * \file
 * \author Thomas Fischer
 * \date   2012-05-07
 * \brief  Definition of the MemWatch class.
 *
 * \copyright
 * Copyright (c) 2012-2016, OpenGeoSys Community (http://www.opengeosys.org)
 *            Distributed under a Modified BSD License.
 *              See accompanying file LICENSE.txt or
 *              http://www.opengeosys.org/project/license
 *
 */

#ifndef MEMWATCH_H_
#define MEMWATCH_H_

namespace BaseLib {

class MemWatch {
public:
	MemWatch ();
	unsigned long getVirtMemUsage ();
	unsigned long getResMemUsage ();
	unsigned long getShrMemUsage ();
	unsigned long getCodeMemUsage ();

private:
	unsigned updateMemUsage ();
	unsigned long _vmem_size = 0;
	unsigned long _rmem_size = 0;
	unsigned long _smem_size = 0;
	unsigned long _cmem_size = 0;
};

}

#endif /* MEMWATCH_H_ */
back to top