Thread: memory question

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    57

    memory question

    is it possible to write a program that will take all the unused memory locations on your computer and set them to 0?

  2. #2
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    There is certainly no standard way to do it (as for platform specific methods, I cannot think of any, but there may be).

    The thing is, a program is given its own address space for its memory. Now, that memory may not reside actually in the main memory, but instead may be on disk for example (swapped to disk). In modern operating systems, the program can use this memory without knowing (or caring) exactly where its memory is, and can only access its own address space (through standard methods).
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

  3. #3
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    It is indeed possible. The only way I can see how, though, is to write directly to the RAM. Since that may be difficult (especially in anal OS's like Windows XP) and there is not really any gain from doing so you may just want to not write such a program.

  4. #4
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    A SIMM tester program might do what you want. This this example program was found via this google search
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  5. #5
    Registered User
    Join Date
    Feb 2003
    Posts
    57
    what exactly is a simm tester

  6. #6
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Originally posted by Gil22
    what exactly is a simm tester
    A program that tests RAM by writing to various addresses and then reading it back again.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. heap vs stack memory question
    By donglee in forum C++ Programming
    Replies: 4
    Last Post: 01-23-2009, 04:34 PM
  2. Pointer memory question
    By Edo in forum C++ Programming
    Replies: 5
    Last Post: 01-21-2009, 03:36 AM
  3. Memory question
    By John_L in forum Tech Board
    Replies: 8
    Last Post: 06-02-2008, 10:06 PM
  4. Another Dynamic Memory Question
    By SirCrono6 in forum C++ Programming
    Replies: 6
    Last Post: 03-02-2005, 12:10 PM
  5. Is it necessary to write a specific memory manager ?
    By Morglum in forum Game Programming
    Replies: 18
    Last Post: 07-01-2002, 01:41 PM