CPMemUtils.h
Go to the documentation of this file.
00001 #ifndef CPMEMUTILS_H
00002 #define CPMEMUTILS_H
00003 
00004 
00005 #ifdef __APPLE__
00006         #include <sys/types.h>
00007         #include <sys/sysctl.h>
00008         # include <mach/task.h>
00009         # include <mach/mach_init.h>
00010 #else
00011 
00012         #ifdef _MSC_VER
00013 
00014                 #include <Windows.h>
00015                 #include <Psapi.h>
00016                 #pragma comment(lib,"psapi.lib")
00017 
00018         #else
00019                 //#include <sys/resource.h>
00020                 //#include <sys/sysinfo.h>
00021                 #include <sys/unistd.h>
00022 
00023                 #include <stdlib.h>
00024                 #include <stdio.h>
00025                 #include <malloc.h>
00026 
00027         #endif
00028 
00029 #endif
00030 
00031 
00032 
00033 #ifdef __cplusplus
00034 extern "C"
00035 #endif
00036 unsigned long getPhysicalMemorySize();
00037 
00038 #ifdef __cplusplus
00039 extern "C"
00040 #endif
00041 unsigned long getCurrentProcessMemoryUsage();
00042 
00043 #ifdef __cplusplus
00044 extern "C"
00045 #endif
00046 unsigned long getPlatformMemoryLimit();
00047 
00048 
00049 
00050 
00051 
00052 #endif // CPMEMUTILS_H


appl
Author(s): petercai
autogenerated on Tue Jan 7 2014 11:02:28