zoukankan
html css js c++ java
Windows mobile 中获取内存使用情况
Code
using
System;
using
System.Text;
using
System.Runtime.InteropServices;
namespace
TaskManager
{
public
class
Memory
{
static
MEMORYSTATUS status
=
new
MEMORYSTATUS();
P/V invoke
#region
P/V invoke
private
struct
MEMORYSTATUS
{
public
UInt32 dwLength;
public
UInt32 dwMemoryLoad;
public
UInt32 dwTotalPhys;
public
UInt32 dwAvailPhys;
public
UInt32 dwTotalPageFile;
public
UInt32 dwAvailPageFile;
public
UInt32 dwTotalVirtual;
public
UInt32 dwAvailVirtual;
}
[DllImport(
"
CoreDll.dll
"
)]
private
static
extern
void
GlobalMemoryStatus
(
ref
MEMORYSTATUS lpBuffer
);
[DllImport(
"
CoreDll.dll
"
)]
private
static
extern
int
GetSystemMemoryDivision
(
ref
UInt32 lpdwStorePages,
ref
UInt32 lpdwRamPages,
ref
UInt32 lpdwPageSize
);
#endregion
public
static
void
UpdateStatus()
{
GlobalMemoryStatus(
ref
status);
}
public
static
UInt32 TotalPhysicalMemory
{
get
{
return
status.dwTotalPhys;
}
}
public
static
UInt32 AvilablePhysicalMemory
{
get
{
return
status.dwAvailPhys;
}
}
public
static
UInt32 TotalVirtualMemory
{
get
{
return
status.dwTotalVirtual;
}
}
public
static
UInt32 AvilableVirtualMemory
{
get
{
return
status.dwAvailVirtual;
}
}
public
static
UInt32 TotalPageFile
{
get
{
return
status.dwTotalPageFile;
}
}
public
static
UInt32 AvilablePageFile
{
get
{
return
status.dwAvailPageFile;
}
}
}
}
查看全文
相关阅读:
OpenStack对象存储管理手册(5) OpenStack对象存储系统管理3
hdu1568Fibonacci
智能手机中显示信号强度格数
上篇日本人经营之道 一破坏对手的情绪乱其方寸
基于Wince的计算器程序
shell 字符串操作
轻松记住大端小端的含义
如何把手机变成你的救生设备
PM是一个事实
mysql 5.6 online ddl 测试
原文地址:https://www.cnblogs.com/swnuwangyun/p/1573425.html
最新文章
Android InputStreamReader 解析gbk、gb2312编码的xml文件 编码问题.
Android: WebView tips & tricks
ZZZZ
InputStream.read、OutputStream.write、二进制文件读写及文件流末尾判断
有一点niubiality的python min sorted code
Android WebView Scrolling Performance
【转】Ubuntu server 9.10更改网卡配置设置IP地址
寻找最小term,自制面试题
InputStreamReader的编码
Basic4android (Basic for Android) Rapid Application Development
热门文章
Hardware Acceleration | Android Developers
yxl/DownloadProvider
OrmLite Lightweight Java ORM Supports Android and SQLite
Android中的DownloadManager
HttpClient乱码问题
做项目,还是标准点好(对象命名标准),呵呵
MVC巧用枚举做权限管理
MVC中当Action名称与页面名称不同时
MVC分页控件之二,为IQueryable定义一个扩展方法,直接反回PagedList<T>结果集
多层架构在业务逻辑层实现IOC
Copyright © 2011-2022 走看看