請問如何取得虛擬記憶體大小? |
尚未結案
|
nlj859
資深會員 發表:139 回覆:375 積分:322 註冊:2004-03-20 發送簡訊給我 |
|
zilch
中階會員 發表:5 回覆:87 積分:78 註冊:2002-09-24 發送簡訊給我 |
GlobalMemoryStatus
The GlobalMemoryStatus function obtains information about the system's current usage of both physical and virtual memory. To obtain information about the extended portion of the virtual address space, or if your application may run on computers with more than 4 GB of main memory, use the GlobalMemoryStatusEx function. VOID GlobalMemoryStatus(
LPMEMORYSTATUS lpBuffer // memory status structure
);
Parameters
lpBuffer
[out] Pointer to a MEMORYSTATUS structure. The GlobalMemoryStatus function stores information about current memory availability into this structure.
Return Values
This function does not return a value. Remarks
You can use the GlobalMemoryStatus function to determine how much memory your application can allocate without severely impacting other applications. The information returned by the GlobalMemoryStatus function is volatile. There is no guarantee that two sequential calls to this function will return the same information. On computers with more than 4 GB of memory, the GlobalMemoryStatus function can return incorrect information. Windows 2000 reports a value of -1 to indicate an overflow. Earlier versions of Windows NT report a value that is the real amount of memory, modulo 4 GB. For this reason, on Windows 2000, use the GlobalMemoryStatusEx function instead. On Intel x86 computers with more than 2 GB and less than 4 GB of memory, the GlobalMemoryStatus function will always return 2 GB in the dwTotalPhys member of the MEMORYSTATUS structure. Similarly, if the total available memory is between 2 and 4 GB, the dwAvailPhys member of the MEMORYSTATUS structure will be rounded down to 2 GB. If the executable is linked using the /LARGEADDRESSWARE linker option, then the GlobalMemoryStatus function will return the correct amount of physical memory in both members. Example
The program following shows a simple use of the GlobalMemoryStatus function.
// Sample output: // c:>global // The MemoryStatus structure is 32 bytes long. // It should be 32. // 78 percent of memory is in use. // There are 65076 total Kbytes of physical memory. // There are 13756 free Kbytes of physical memory. // There are 150960 total Kbytes of paging file. // There are 87816 free Kbytes of paging file. // There are 1fff80 total Kbytes of virtual memory. // There are 1fe770 free Kbytes of virtual memory. #include |
nlj859
資深會員 發表:139 回覆:375 積分:322 註冊:2004-03-20 發送簡訊給我 |
|
conundrum
尊榮會員 發表:893 回覆:1272 積分:643 註冊:2004-01-06 發送簡訊給我 |
類似EVEREST Home Edition
http://www.snapfiles.com/get/everest.html
在KTOP內就有了 找找有原始碼不過不一定是你要的 基本上 那都是調用系統的資訊 也可以說參考值和 reg 等資料
虛擬記憶體
2000 xp 2003
pagefile.sys 這檔案交換
http://delphi.ktop.com.tw/topic.php?TOPIC_ID=54467
http://delphi.ktop.com.tw/topic.php?topic_id=18624
http://delphi.ktop.com.tw/topic.php?TOPIC_ID=28254
http://delphi.ktop.com.tw/topic.php?TOPIC_ID=25676
很多 請自行收尋把 http://delphi.ktop.com.tw/topic.php?topic_id=47103
http://delphi.ktop.com.tw/topic.php?topic_id=32546 發表人 - conundrum 於 2004/08/20 20:56:09
|
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |