Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Virtual Memory

Virtual Memory

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++performancequestiontutorial
7 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cy163 hotmail com
    wrote on last edited by
    #1

    I am working on a project involving huge amount of data. The memory space is alomst exhausted. My program terminates abnormally when the remaining mem is about 100M(indicated in Task Manager). The error message is "abnornal program termination". My problem is that I am not sure if the shortage of mem space OR bugs in my program caused the abnormal termination. Anybody can help me diagnose this probelm by your experiences. I wonder what is the best way to deal with huge amount of data. I do not have experiences with huge amount of data before. I wonder if 'virtual mem' actually means some space on hard disk? How to set the size of virtual memory. Can I use virtaul mem in my VC++ program. Can I set the size of virtual memory in my visual C++ program. Is it true that the access speed for virtual mem is much slow than that for main memory? by the way, wm PC (DELL Openlex GX620) has 1G main memory, running Windows 2000.

    G G D J 4 Replies Last reply
    0
    • C cy163 hotmail com

      I am working on a project involving huge amount of data. The memory space is alomst exhausted. My program terminates abnormally when the remaining mem is about 100M(indicated in Task Manager). The error message is "abnornal program termination". My problem is that I am not sure if the shortage of mem space OR bugs in my program caused the abnormal termination. Anybody can help me diagnose this probelm by your experiences. I wonder what is the best way to deal with huge amount of data. I do not have experiences with huge amount of data before. I wonder if 'virtual mem' actually means some space on hard disk? How to set the size of virtual memory. Can I use virtaul mem in my VC++ program. Can I set the size of virtual memory in my visual C++ program. Is it true that the access speed for virtual mem is much slow than that for main memory? by the way, wm PC (DELL Openlex GX620) has 1G main memory, running Windows 2000.

      G Offline
      G Offline
      George L Jackson
      wrote on last edited by
      #2

      If you are not suffering from memory leaks, Memory Mapped files might be a possible solution to handling large amounts of data: http://msdn2.microsoft.com/en-us/library/ms810613.aspx[^]

      "We make a living by what we get, we make a life by what we give." --Winston Churchill

      1 Reply Last reply
      0
      • C cy163 hotmail com

        I am working on a project involving huge amount of data. The memory space is alomst exhausted. My program terminates abnormally when the remaining mem is about 100M(indicated in Task Manager). The error message is "abnornal program termination". My problem is that I am not sure if the shortage of mem space OR bugs in my program caused the abnormal termination. Anybody can help me diagnose this probelm by your experiences. I wonder what is the best way to deal with huge amount of data. I do not have experiences with huge amount of data before. I wonder if 'virtual mem' actually means some space on hard disk? How to set the size of virtual memory. Can I use virtaul mem in my VC++ program. Can I set the size of virtual memory in my visual C++ program. Is it true that the access speed for virtual mem is much slow than that for main memory? by the way, wm PC (DELL Openlex GX620) has 1G main memory, running Windows 2000.

        G Offline
        G Offline
        Gokalp Peker
        wrote on last edited by
        #3

        First of all , Problem could be memory leak or anything related with memory management.Your application may be trying to access a memory area that it's not allowed to. Virtual memory is usage of hard-drive(or similar devices) space as memory area.Simply data is kept in drive as specified file.There are many virtual memory management algorithms that decides how,when and what to fetch.But it's performance is never as good as accessing real memory.Virtual Management is a trade-off between memory size and memory speed. Also if you are programming a WIN32 application , memory allocation functions calls a specified system function that automatically allocates real or virtual memory.

        [AGP]

        C 1 Reply Last reply
        0
        • G Gokalp Peker

          First of all , Problem could be memory leak or anything related with memory management.Your application may be trying to access a memory area that it's not allowed to. Virtual memory is usage of hard-drive(or similar devices) space as memory area.Simply data is kept in drive as specified file.There are many virtual memory management algorithms that decides how,when and what to fetch.But it's performance is never as good as accessing real memory.Virtual Management is a trade-off between memory size and memory speed. Also if you are programming a WIN32 application , memory allocation functions calls a specified system function that automatically allocates real or virtual memory.

          [AGP]

          C Offline
          C Offline
          cy163 hotmail com
          wrote on last edited by
          #4

          thank you Gokalp Peker. My appication is MFC based work instead of a Win32 application. In MFC, is virtual memory avaiable for storage?

          M 1 Reply Last reply
          0
          • C cy163 hotmail com

            thank you Gokalp Peker. My appication is MFC based work instead of a Win32 application. In MFC, is virtual memory avaiable for storage?

            M Offline
            M Offline
            markkuk
            wrote on last edited by
            #5

            If your progam is running under Windows, then it uses virtual memory. Virtual memory is handled by the operating system, it doesn't depend on what language or what toolkits you use in your program.

            1 Reply Last reply
            0
            • C cy163 hotmail com

              I am working on a project involving huge amount of data. The memory space is alomst exhausted. My program terminates abnormally when the remaining mem is about 100M(indicated in Task Manager). The error message is "abnornal program termination". My problem is that I am not sure if the shortage of mem space OR bugs in my program caused the abnormal termination. Anybody can help me diagnose this probelm by your experiences. I wonder what is the best way to deal with huge amount of data. I do not have experiences with huge amount of data before. I wonder if 'virtual mem' actually means some space on hard disk? How to set the size of virtual memory. Can I use virtaul mem in my VC++ program. Can I set the size of virtual memory in my visual C++ program. Is it true that the access speed for virtual mem is much slow than that for main memory? by the way, wm PC (DELL Openlex GX620) has 1G main memory, running Windows 2000.

              D Offline
              D Offline
              David Crow
              wrote on last edited by
              #6

              cy163@hotmail.com wrote:

              I wonder if 'virtual mem' actually means some space on hard disk? How to set the size of virtual memory. Can I use virtaul mem in my VC++ program. Can I set the size of virtual memory in my visual C++ program.

              This is all handled automatically by Windows.

              cy163@hotmail.com wrote:

              Is it true that the access speed for virtual mem is much slow than that for main memory?

              Of course, unless you have very slow RAM and a very fast HDD!


              "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

              "Judge not by the eye but by the heart." - Native American Proverb

              1 Reply Last reply
              0
              • C cy163 hotmail com

                I am working on a project involving huge amount of data. The memory space is alomst exhausted. My program terminates abnormally when the remaining mem is about 100M(indicated in Task Manager). The error message is "abnornal program termination". My problem is that I am not sure if the shortage of mem space OR bugs in my program caused the abnormal termination. Anybody can help me diagnose this probelm by your experiences. I wonder what is the best way to deal with huge amount of data. I do not have experiences with huge amount of data before. I wonder if 'virtual mem' actually means some space on hard disk? How to set the size of virtual memory. Can I use virtaul mem in my VC++ program. Can I set the size of virtual memory in my visual C++ program. Is it true that the access speed for virtual mem is much slow than that for main memory? by the way, wm PC (DELL Openlex GX620) has 1G main memory, running Windows 2000.

                J Offline
                J Offline
                John M Drescher
                wrote on last edited by
                #7

                I'm not sure if this is in play but do you know the default maximum size of a block of memory that you can allocate in 32 bit windows is around 1.2GB?

                John

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups