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. Regarding memory

Regarding memory

Scheduled Pinned Locked Moved C / C++ / MFC
data-structuresperformancequestion
5 Posts 4 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.
  • V Offline
    V Offline
    voorugonda prashanth
    wrote on last edited by
    #1

    hi all, how much heap memory allocated for a process? how much stack memory allocated for a process? if i have 512MB RAM and trying allocate 1GB of Heap memory what will happen?? please explain or give me links. Thanks in advance.

    C 1 Reply Last reply
    0
    • V voorugonda prashanth

      hi all, how much heap memory allocated for a process? how much stack memory allocated for a process? if i have 512MB RAM and trying allocate 1GB of Heap memory what will happen?? please explain or give me links. Thanks in advance.

      C Offline
      C Offline
      Code_Zombie
      wrote on last edited by
      #2

      Default heap size is 1mb,this can be changed using the /heap linker option.An application can directly use about 2gb of address space. Same for stack also,1mb is the default and can be changed using the /stack linker option

      V J 2 Replies Last reply
      0
      • C Code_Zombie

        Default heap size is 1mb,this can be changed using the /heap linker option.An application can directly use about 2gb of address space. Same for stack also,1mb is the default and can be changed using the /stack linker option

        V Offline
        V Offline
        voorugonda prashanth
        wrote on last edited by
        #3

        but what will happen , if i have 512MB RAM and trying to allocate 1GB of heap memory? please give me the links or suggest any books? thank u.

        J 1 Reply Last reply
        0
        • V voorugonda prashanth

          but what will happen , if i have 512MB RAM and trying to allocate 1GB of heap memory? please give me the links or suggest any books? thank u.

          J Offline
          J Offline
          Jonathan Darka
          wrote on last edited by
          #4

          It will attempt to allocate the memory from virtual memory


          Darka [Xanya]

          1 Reply Last reply
          0
          • C Code_Zombie

            Default heap size is 1mb,this can be changed using the /heap linker option.An application can directly use about 2gb of address space. Same for stack also,1mb is the default and can be changed using the /stack linker option

            J Offline
            J Offline
            Jun Du
            wrote on last edited by
            #5

            BTW, 2GB is for 32-bit Windows, which is the total limit of stack plus heap plus none-user memory. Best, Jun

            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