Page 1 of 1 1
Topic Options
#154593 - 2006-01-05 02:47 PM Bug in MemorySize() ?
weiali Offline
Lurker

Registered: 2002-06-01
Posts: 1
Loc: Finland
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?

Top
#154594 - 2006-01-05 06:29 PM Re: Bug in MemorySize() ?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
yep.
_________________________
!

download KiXnet

Top
#154595 - 2006-01-05 07:21 PM Re: Bug in MemorySize() ?
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
Quite a few threads have been generated on this topic... one workaround is to use the following UDF: Memory()
Top
#154596 - 2006-01-05 11:27 PM Re: Bug in MemorySize() ?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
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.
_________________________
!

download KiXnet

Top
#154597 - 2006-01-06 12:13 AM Re: Bug in MemorySize() ?
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
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

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

Registered: 2002-07-17
Posts: 28
On one of our servers...

macro = 2048
udf = 3328

Something definitely wrong, there.

Top
#154599 - 2006-02-21 08:17 PM Re: Bug in MemorySize() ?
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
The Macro only supports Memory up to 2GB in size.
For larger memory sizes you would need to use the UDF.

Top
#154600 - 2006-02-25 03:46 PM Re: Bug in MemorySize() ?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
yes, the macro should be FINALLY updated.
_________________________
!

download KiXnet

Top
#154601 - 2006-04-17 11:55 AM Re: Bug in MemorySize() ?
Ruud van Velsen Moderator Offline
Developer
*****

Registered: 1999-05-06
Posts: 391
Loc: Amsterdam, The Netherlands
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

Top
#154602 - 2006-04-17 01:55 PM Re: Bug in MemorySize() ?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
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?
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  ShaneEP, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 248 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.062 seconds in which 0.026 seconds were spent on a total of 12 queries. Zlib compression enabled.