有关内存监控的一些知识
来源:互联网 发布:桃蓓商城是网络传销吗 编辑:程序博客网 时间:2024/04/30 20:05
这两天在写一个内存监控的DLL,刚开始学写DLL,什么都不会,昨天在网上找一个有关内存的小程序,如下:
#include <windows.h>
#include <stdio.h>
#define DIV 1024
char *divisor = "K";
#define WIDTH 7
void main(int argc, char *argv[])
{
MEMORYSTATUS stat;
GlobalMemoryStatus (&stat);
printf ("The MemoryStatus structure is %ld bytes long./n",
stat.dwLength);
printf ("It should be %d./n", sizeof (stat));
printf ("%ld percent of memory is in use./n",
stat.dwMemoryLoad);
printf ("There are %*ld total %sbytes of physical memory./n",
WIDTH, stat.dwTotalPhys/DIV, divisor);
printf ("There are %*ld free %sbytes of physical memory./n",
WIDTH, stat.dwAvailPhys/DIV, divisor);
printf ("There are %*ld total %sbytes of paging file./n",
WIDTH, stat.dwTotalPageFile/DIV, divisor);
printf ("There are %*ld free %sbytes of paging file./n",
WIDTH, stat.dwAvailPageFile/DIV, divisor);
printf ("There are %*lx total %sbytes of virtual memory./n",
WIDTH, stat.dwTotalVirtual/DIV, divisor);
printf ("There are %*lx free %sbytes of virtual memory./n",
WIDTH, stat.dwAvailVirtual/DIV, divisor);
}
我要写的是一个有关内存信息实时采集的库,看了一天了还是没有头绪,晕了!
- 有关内存监控的一些知识
- 有关内存泄露检测的一些知识。
- 有关win32的一些知识
- 有关dll的一些知识
- 一些有关服务器的知识
- 有关绑定的一些知识
- 内存泄漏的有关知识
- 有关内存泄漏的知识
- 有关内存泄漏的知识
- 内存的一些知识
- 有关raw socket的一些知识
- 有关SPID的一些知识和使用
- 有关raw socket的一些知识
- 有关类加载的一些知识
- 一些有关音视频的知识
- 有关raw socket的一些知识
- 有关raw socket的一些知识
- 有关raw socket的一些知识
- 委托与事件
- NB的题目
- 算术运算符(Arithmetic Operators)
- NMFilter.sys(4.3.2.2485) 逆向源代码
- JAVA对文件的操作
- 有关内存监控的一些知识
- 穿透还原卡和还原软件的代码
- 借地方放个东西^_^
- 文件透明加密--新思路
- 多线程编程之二——MFC中的多线程开发
- 多线程编程之三——线程间通讯
- 多线程编程之四——线程的同步
- 感别04级..
- 一个小教训