weiali
(Lurker)
2006-01-05 02:47 PM
Bug in MemorySize() ?

After updating kiXtart from 4.21 to version 4.51 in our login scripts, the memorysize() function started behaving funny. We have some machines that have 256MB of physical RAM on them, but the report shows huge increase in memory size.

This doesn't happen to all machines, but it's rather consistent once wrong memory size is reported.

It would be a nice and cheap upgrade if that's true.

Here're some extracts from our inventroy-report (All the machines below have 256MB RAM, and use our standard XPSP2 image):
-----------
Code:
$Memory = MemorySize(0)
? $Memory + "MB"
-----------
Report:
1: Machine type: Intel(R) Pentium(R) 4 CPU 2.00GHz@1993MHZ, Memory 253 MB
2: Machine type: Intel(R) Pentium(R) 4 CPU 2.00GHz@1993MHZ, Memory 253 MB
3: Machine type: Intel(R) Pentium(R) 4 CPU 2.00GHz@1993MHZ, Memory 1777 MB
4: Machine type: Intel(R) Pentium(R) 4 CPU 2.00GHz@1993MHZ, Memory 2287 MB
5: Machine type: Intel(R) Pentium(R) 4 CPU 2.00GHz@1993MHZ, Memory 1777 MB

Is it a bug?


LonkeroAdministrator
(KiX Master Guru)
2006-01-05 06:29 PM
Re: Bug in MemorySize() ?

yep.

AllenAdministrator
(KiX Supporter)
2006-01-05 07:21 PM
Re: Bug in MemorySize() ?

Quite a few threads have been generated on this topic... one workaround is to use the following UDF: Memory()

LonkeroAdministrator
(KiX Master Guru)
2006-01-05 11:27 PM
Re: Bug in MemorySize() ?

yes, but think this is different Allen.
memsize has always been reporting something odd but now he says that it goes haywire with the new versions.
so, something has changed.


NTDOCAdministrator
(KiX Master)
2006-01-06 12:13 AM
Re: Bug in MemorySize() ?

Well don't know about a 256MB machine, but on a 2GB machine both macro and udf show about the same.

macro = 2038
udf = 2040


PRandal
(Fresh Scripter)
2006-02-21 11:19 AM
Re: Bug in MemorySize() ?

On one of our servers...

macro = 2048
udf = 3328

Something definitely wrong, there.


NTDOCAdministrator
(KiX Master)
2006-02-21 08:17 PM
Re: Bug in MemorySize() ?

The Macro only supports Memory up to 2GB in size.
For larger memory sizes you would need to use the UDF.


LonkeroAdministrator
(KiX Master Guru)
2006-02-25 03:46 PM
Re: Bug in MemorySize() ?

yes, the macro should be FINALLY updated.

Ruud van Velsen
(Hey THIS is FUN)
2006-04-17 11:55 AM
Re: Bug in MemorySize() ?

Thanks for the report. This function is known to return bogus results on systems with more than 2GB of memory (as a result of a quirk in the underlying API). I haven't seen any problems on systems with <2GB and can't reproduce the reported issue, I'm afraid.

Ruud


LonkeroAdministrator
(KiX Master Guru)
2006-04-17 01:55 PM
Re: Bug in MemorySize() ?

k, took a quick search and found this:
http://support.microsoft.com/default.aspx?scid=kb;%5BLN%5D;888664

Quote:


After you install Microsoft Windows XP Service Pack 2 on a computer that is running the Finnish version of Microsoft Windows XP, Total physical memory that appears in System Properties may not be correct or may not appear.





could you check on those failing machines if also the my computer info is wrong?