Thread: New Memory

  1. #1
    Darkness Prevails Dark_Phoenix's Avatar
    Join Date
    Oct 2006
    Location
    Houston, Texas
    Posts
    174

    New Memory

    I have recently installed some new memory in my computer, upgrading rfrom 1gb to 4gb. However, the Windows XP, as well as the bios, says that there is only 3.14gb installed. Is this discrepency normal or could there be a bad module? When there was just the one original 1gb module the bios reported 1gb.

    I ran MemTest and it reported no errors.

    All for modules are the same brand/model/size (Corsair Value Select 1gb ddr2 667)

    The mobo supports up to 4gb memory

    Is this normal?
    Using Code::Blocks and Windows XP

    In every hero, there COULD be a villain!

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Well, Windows XP 32-bit can't use 4 GB of memory unfortunately, due to hardware (and OS) limitations.
    But if you have 64-bit (Windows XP), that's not normal...
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    I'm not entirely sure of this, but I seem to remember that windows XP cannot address the total of 4GB, despite that being the maximum amount of supported memory. You may be looking at the amount of addressable memory when seeing those 3.14 Gb

    EDIT: beaten to the second
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  4. #4
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,079
    Simple. If you have a 64-bit operating system, go into your BIOS and look for the Memory Remap option and turn it on. If it's 32-bit then you're out of luck as they state above.
    Sent from my iPad®

  5. #5
    Darkness Prevails Dark_Phoenix's Avatar
    Join Date
    Oct 2006
    Location
    Houston, Texas
    Posts
    174
    Ahh, I forgot about the 32-bit limits. Now I wish I had bought only 2 extra gb instead of 3.

    Oh well... Live and learn i guess. At least it was not very expensive... :P
    Using Code::Blocks and Windows XP

    In every hero, there COULD be a villain!

  6. #6
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,079
    Quote Originally Posted by Dark_Phoenix View Post
    Ahh, I forgot about the 32-bit limits. Now I wish I had bought only 2 extra gb instead of 3.
    I wouldn't. I'd rather 3.14Gb Dual-Channel over 3Gb Single-Channel.
    Sent from my iPad®

  7. #7
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    I wouldn't. I'd rather 3.14Gb Dual-Channel over 3Gb Single-Channel.
    It depends on whether you care about the price difference with respect to the relatively small margin of improvement.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  8. #8
    Registered User
    Join Date
    Apr 2007
    Location
    Greece
    Posts
    52
    If you don't have a license of a Windows 64bit copy you can try for free a Linux distro.

  9. #9
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    But if you aren't a linux-type of individual, it will come back to bite you.
    Linux != Windows.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  10. #10
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    That's assuming it's a 64-bit CPU (Since the mobo only supports 4GB I'd say not -- could be wrong ).

  11. #11
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    There are many motherboards that are 64-bit that can only handle 4 GB of memory. It's not uncommon.
    Any motherboard nowadays are 64-bit, yet some can only hold 4 GB.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  12. #12
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Anyways, changing operating system from Windows to Linux because you happen to want to use that extra 1GB memory is... silly.
    On the other hand changing to a 64 bit version of windows is also not that much of an improvement. Because those extra 700Mb-800Mb will be mostly consumed by the OS.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  13. #13
    Darkness Prevails Dark_Phoenix's Avatar
    Join Date
    Oct 2006
    Location
    Houston, Texas
    Posts
    174
    Quote Originally Posted by Mario F. View Post
    On the other hand changing to a 64 bit version of windows is also not that much of an improvement. Because those extra 700Mb-800Mb will be mostly consumed by the OS.
    This is true. And I am still not sold on Vista. I'm not even sure if mysystem will support 64 bit... was not one of my concerns when I built it a year and a half ago.

    Current specs :
    Intel Pentium D 820 2.8ghz
    MSI 945P Neo-3
    4x Corsair Value Select 1gb DDR2 667
    Gigabyte GeForce 7300GT Video Card w/ 256mb GDDR2
    Using Code::Blocks and Windows XP

    In every hero, there COULD be a villain!

  14. #14
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by Mario F. View Post
    Anyways, changing operating system from Windows to Linux because you happen to want to use that extra 1GB memory is... silly.
    On the other hand changing to a 64 bit version of windows is also not that much of an improvement. Because those extra 700Mb-800Mb will be mostly consumed by the OS.
    Huh? Do you have some documentation for that?

    I can see that a 64-bit OS would take a little bit more memory, but not that much more. Obviously, having DLL's (or .SO's in the case of Linux) for both 32- and 64-bit essentially doubles the size of the distribution on disk, but assuming that you don't have that many applications using many different DLL's that are used in both 32-bit mode and 64-bit mode, it shouldn't make a big difference to the actual amount of memory used.

    Page-tables may take up twice the space compared to a 32-bit OS (but not necessarily, as 32-bit OS's are also using PAE) - but a pagetable to cover 4GB as 4KB pages is 1MB, and whilst there are multiple copies of page-tables, these are not fully populated page-tables [only memory that is reserved or committed is places in populated page-table entries] - so unless you are running hundreds of apps that all use lots of memory (in which case you obviously need significantly more than 4GB of ram anyways), it shouldn't make much of a difference here.

    x86-64 code-size is pretty close to 32-bit code-size. Yes, the opcodes may be longer, but there are savings in having more registers and passing parameters in registers, so it shouldn't grow much more than 10&#37; with a reasonably equally good compiler (and there should be little difference in efficiency in the compiler - if anything, the 32-bit version is more likely to perform badly due to lack of registers). If we scale up 300MB (I'm being kind here and saying that the other 4-500MB is taken up by other things) in 10% growth, then that would mean that 32-bit Windows requires about 3GB of RAM to run - which doesn't make much sense.

    Pointers in OS internal data structures would take up a bit more space, but again, you need many of those to eat up 700MB. (100 million pointers, give or take a few).

    Sure, the register context for each thread is 4x the size, give or take, but again, you don't have that many threads that it makes any significant difference in memory foot print.

    Another thing to consider:
    32-bit OS's using PAE (64-bit per entry page-tables) will be able to address up to 64GB. Windows XP SP2 introduces "Execution protection", which means that the OS is in PAE mode, so it SHOULD be able to access memory above 4GB - now they may well have prevented that from being enabled in the OS distribution - I have never investigated that.

    Edit: I'm not comparing different OS architectures here - Vista 64-bit may well be much bigger than XP 32-bit - but that's not a change from 32- to 64-bit - that's a change from XP to Vista.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  15. #15
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by matsp View Post
    Huh? Do you have some documentation for that?
    No, not really. Well, maybe if I bothered looking for it.

    I speak only from observation and the fact I seem to notice something between 300 and 400 Mbs difference in available memory on similar machines each running their own XP version.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 01-13-2008, 02:14 AM
  2. Question regarding Memory Leak
    By clegs in forum C++ Programming
    Replies: 29
    Last Post: 12-07-2007, 01:57 AM
  3. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  4. Shared Memory - shmget questions
    By hendler in forum C Programming
    Replies: 1
    Last Post: 11-29-2005, 02:15 AM
  5. What's the best memory (RAM) type?
    By Unregistered in forum A Brief History of Cprogramming.com
    Replies: 17
    Last Post: 12-15-2001, 12:37 AM