SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
MemoryGetFree

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
MemoryGetFree
Author Message
Greig



Joined: 15 Mar 2001
Posts: 49

Post MemoryGetFree Reply with quote

Please refer to a conversation I had on this forum with SysOp almost exacly one year ago. I pointed out that the value for MemoryGetFree was incorrect. The last response from SysOp was on 16 May 2001 and it was as follows:

"It appears that the number is changing, but the value is bogus on WinNT/200 systems. It supposed to be the valus for "AVAILABLE FREE VIRTUAL MEMORY", I don't know where the heck, Windows get that number over 1GB. I've added a change request to calculate this memory as a sum of free physical + free page file space that looks like a more reasonable number. This change should be made in the next version".

This does not seem to be fixed. Can you comment?

Thanks
Greig

Tue May 14, 2002 10:21 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6499

Post Re: MemoryGetFree Reply with quote

Yes, the change was made in 24x7 version 3. Please upgrade.
MemoryGetFree returns dwAvailPhys + dwAvailPageFile

In version 2 it returns dwAvailVirtual. For details please see full description below

The MemoryGetFree uses documented Windows API function GlobalMemoryStatus to obtain current memory availability. That API functions fills and returns data in the MEMORYSTATUS structure which contains information about system memory.

Here is the definition of the structure

typedef struct _MEMORYSTATUS { // mst

DWORD dwLength; // sizeof(MEMORYSTATUS)

DWORD dwMemoryLoad; // percent of memory in use

DWORD dwTotalPhys; // bytes of physical memory

DWORD dwAvailPhys; // free physical memory bytes

DWORD dwTotalPageFile; // bytes of paging file

DWORD dwAvailPageFile; // free bytes of paging file

DWORD dwTotalVirtual; // user bytes of address space

DWORD dwAvailVirtual; // free user bytes

} MEMORYSTATUS, *LPMEMORYSTATUS;

: Please refer to a conversation I had on this forum with SysOp almost exacly
: one year ago. I pointed out that the value for MemoryGetFree was
: incorrect. The last response from SysOp was on 16 May 2001 and it was as
: follows: "It appears that the number is changing, but the value is
: bogus on WinNT/200 systems. It supposed to be the valus for
: "AVAILABLE FREE VIRTUAL MEMORY", I don't know where the heck,
: Windows get that number over 1GB. I've added a change request to calculate
: this memory as a sum of free physical + free page file space that looks
: like a more reasonable number. This change should be made in the next
: version".

: This does not seem to be fixed. Can you comment?

: Thanks
: Greig

Tue May 14, 2002 10:46 am View user's profile Send private message
Greig



Joined: 15 Mar 2001
Posts: 49

Post Re: MemoryGetFree Reply with quote

I am using 3.2.4. MemoryGetFree reports that I have 334151680 bytes free (318
.7MB). However, my system has 376MB (256MB Physical plus swapfile) with only 200MB free (according to Task Manager). So where does MemoryGetFree find the additional 118MB?

: Yes, the change was made in 24x7 version 3. Please upgrade.
: MemoryGetFree returns dwAvailPhys + dwAvailPageFile

: In version 2 it returns dwAvailVirtual. For details please see full
: description below

: The MemoryGetFree uses documented Windows API function GlobalMemoryStatus to
: obtain current memory availability. That API functions fills and returns
: data in the MEMORYSTATUS structure which contains information about system
: memory.

: Here is the definition of the structure

: typedef struct _MEMORYSTATUS { // mst

: DWORD dwLength; // sizeof(MEMORYSTATUS)

: DWORD dwMemoryLoad; // percent of memory in use

: DWORD dwTotalPhys; // bytes of physical memory

: DWORD dwAvailPhys; // free physical memory bytes

: DWORD dwTotalPageFile; // bytes of paging file

: DWORD dwAvailPageFile; // free bytes of paging file

: DWORD dwTotalVirtual; // user bytes of address space

: DWORD dwAvailVirtual; // free user bytes

: } MEMORYSTATUS, *LPMEMORYSTATUS;

Wed May 15, 2002 5:40 am View user's profile Send private message
Greig



Joined: 15 Mar 2001
Posts: 49

Post Re: MemoryGetFree Reply with quote

Also, here are the values returned by GlobalMemoryStatus:

Memory Information:

Memory available: 116584448

Memory total: 267767808

Virtual mem avail: 2124976128

Virtual mem total: 2147352576

Page mem available: 201347072

Page mem total: 394579968

Current memory load: 0

I'm guessing that the Page Memory figures include both physical and swap, therefore you are counting the physical memory twice in your figures. Can you confirm?

Thanks
Greig

: I am using 3.2.4. MemoryGetFree reports that I have 334151680 bytes free (318
: .7MB). However, my system has 376MB (256MB Physical plus swapfile) with only
: 200MB free (according to Task Manager). So where does MemoryGetFree find
: the additional 118MB?

Wed May 15, 2002 7:11 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6499

Post Re: MemoryGetFree Reply with quote

As I've indicated in me previous message, it returns dwAvailPhys + dwAvailPageFile

: I am using 3.2.4. MemoryGetFree reports that I have 334151680 bytes free (318
: .7MB). However, my system has 376MB (256MB Physical plus swapfile) with only
: 200MB free (according to Task Manager). So where does MemoryGetFree find
: the additional 118MB?

Wed May 15, 2002 9:24 am View user's profile Send private message
Greig



Joined: 15 Mar 2001
Posts: 49

Post Re: MemoryGetFree Reply with quote

Please see my other message at 09:11 today. I think dwAvailPageFile already includes dwAvailPhys, so dwAvailPhys is being counted twice. This is why MemoryGetFree is 118MB to large in my system. MSDN describes dwAvailPageFile as "Size of available memory to commit, in bytes". Can you confirm that MemoryGetFree is incorrect and will be fixed?

: As I've indicated in me previous message, it returns dwAvailPhys +
: dwAvailPageFile

Wed May 15, 2002 11:08 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6499

Post Re: MemoryGetFree Reply with quote

dwAvailPageFile reports the amount of space, in bytes, currently available in the paging file. Please note that the value is CURRENT - meaning it is relative to the the current size of the paging file which is not necessarily the largest possible size. Since you have a lot of phycial memory on your system I doubt that your page file ever gets very big.

As for the Task Manager, I could not find where this tool says what the total amount of free memeory is. Where do you get your free memory numbers?

: Please see my other message at 09:11 today. I think dwAvailPageFile already
: includes dwAvailPhys, so dwAvailPhys is being counted twice. This is why
: MemoryGetFree is 118MB to large in my system. MSDN describes
: dwAvailPageFile as "Size of available memory to commit, in
: bytes". Can you confirm that MemoryGetFree is incorrect and will be
: fixed?

Wed May 15, 2002 11:36 am View user's profile Send private message
Greig



Joined: 15 Mar 2001
Posts: 49

Post Re: MemoryGetFree Reply with quote

In the bottome right of the Task Manager window, there are memory usage figures. The second is total memory.

I know that the name of dwAvailPageFile suggests it is the size of the paging file, but I think the name is misleading.

: dwAvailPageFile reports the amount of space, in bytes, currently available in
: the paging file. Please note that the value is CURRENT - meaning it is
: relative to the the current size of the paging file which is not
: necessarily the largest possible size. Since you have a lot of phycial
: memory on your system I doubt that your page file ever gets very big.

: As for the Task Manager, I could not find where this tool says what the total
: amount of free memeory is. Where do you get your free memory numbers?

Wed May 15, 2002 12:03 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.