Effective implementation of algorithms (Master Thesis)
Effective and error-free implementation of algorithms
src/utils/memory_usage/memory_usage.h
Go to the documentation of this file.
00001 #ifndef H_UTILS_MEMORY_USAGE_MEMORY_USAGE
00002 #define H_UTILS_MEMORY_USAGE_MEMORY_USAGE
00003 
00007 #include <malloc.h>
00008 
00009 namespace utils {
00010 namespace memory_usage {
00011 
00023 int getUsedMemoryKb() {
00024   return mallinfo().uordblks / 1024;
00025 }
00026 
00027 } // namespace memory_usage
00028 } // namespace utils
00029 
00030 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines