System Information: RAM

Bug reports will be moved here when the described bug has been fixed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
SailorMax
Member
Member
Posts: 121
Joined: 2007-03-15, 15:11 UTC

System Information: RAM

Post by *SailorMax »

I have 3GB RAM.
System Information on tab "Hardware" show: Installed RAM: 2 097 151 k
System Information on tab "Software" show: Free Memory: 1 953 036 k (63 %)

(Vista 32bit)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, I can only show what the system reports.
Author of Total Commander
https://www.ghisler.com
mihaipi
Junior Member
Junior Member
Posts: 10
Joined: 2006-11-28, 11:28 UTC

Post by *mihaipi »

As you know, applications under a 32bit OS can access a maximum of 2GB of memory as process space. That is why TC is showing only 2GB as installed RAM. Taken this into account, there are 2 ways to solve this:
a) the text in TC has to be changed
b) find a way to read the real amount of RAM, maybe display it like Win7 does it.

More info about this issue can be at

Code: Select all

http://www.msfn.org/board/index.php?showtopic=92568&st=0&p=623978&#entry623978
gigaman
Member
Member
Posts: 134
Joined: 2003-02-14, 11:28 UTC

Post by *gigaman »

mihaipi wrote:As you know, applications under a 32bit OS can access a maximum of 2GB of memory as process space. That is why TC is showing only 2GB as installed RAM. Taken this into account, there are 2 ways to solve this:
That is not true, or at least highly inaccurate.
32bit application has a 4GB address space (both under 32bit and 64bit OS), so it can't access more than 4GB. Normally (and on 32bit OS), 2GB are available as user-mode memory and the upper 2GB are reserved for kernel. Through a boot.ini switch, you can move this boundary higher.

However, this doesn't have anything to do with reporting the amount of installed memory. That's affected by the fact that starting from XP SP2, Microsoft dropped support for PAE on consumer 32bit OSes (because of possible problems with drivers that were not ready for this) - so the operating system doesn't see more than 4GB - parts of it being reserved for graphics adapter and other stuff, so it's even more.

Anyway, if the operating system reports 2GB with the GlobalMemoryStatusEx() call, I don't think there's any way to find the real amount (actually, I think your system doesn't see/support the real amount in that case, so it actually "has" 2GB).
User avatar
HolgerK
Power Member
Power Member
Posts: 5408
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

I can confirm that GlobalMemoryStatusEx() reports
3GiB physical memory on x86 installation and 6GiB on x64 installation here (as expected).

But TC's System information shows only 2 097 151 k on x86, and a - sign on X64 system.

So I guess that TC use another method than GlobalMemoryStatusEx() to determine the amount of physical memory.

Tested wit TC7.50pb1, TC7.04 and Vista Ultimate (x86 and x64).

Regards
Holger
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

TC currently uses GlobalMemoryStatus, not GlobalMemoryStatusEx.
Author of Total Commander
https://www.ghisler.com
User avatar
HolgerK
Power Member
Power Member
Posts: 5408
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

MSDN wrote:[GlobalMemoryStatus can return incorrect information. Use the GlobalMemoryStatusEx function instead. ]
Anyway, no vital point at all.

Regards
Holger
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I will consider it for one of the next betas.
Author of Total Commander
https://www.ghisler.com
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3893
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

Works fine now (TC 7.5pb2, Win XP SP3)
System Information on tab "Hardware" shows: Installed RAM:2.620.412 k (2.558 M)
#5767 Personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Nice to hear that! I couldn't test it because the largest I have is 2 GB. But I switched to GlobalMemoryStatusEx when available...
Author of Total Commander
https://www.ghisler.com
User avatar
HolgerK
Power Member
Power Member
Posts: 5408
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

Confirmed fix!
History.tx wrote:28.04.09 Fixed: Use GlobalMemoryStatusEx (if available) to get total and free memory (RAM), to support memory sizes>2GB
Installed RAM:
Vista (x86): 3,143,228 k (3,069 M)
Vista (x64): 6.288.956 k (6.141 M)

Free memory:
Vista (x86): 1,669,612 k (54 %)
Vista (x64): 4.750.868 k (76 %)

Thanks
Holger
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Great, thanks! With two users confirming the fix I think that I can move this to fixed now although the thread starter hasn't replied yet.
Author of Total Commander
https://www.ghisler.com
Post Reply