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. Other Discussions
  3. IT & Infrastructure
  4. Stack – Heap Memory Question - calculating and understanding.

Stack – Heap Memory Question - calculating and understanding.

Scheduled Pinned Locked Moved IT & Infrastructure
data-structuresbeta-testingperformancequestioncode-review
3 Posts 2 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.
  • B Offline
    B Offline
    BedHead
    wrote on last edited by
    #1

    Stack – Heap Memory Question I’m trying to figure out how one would determine the size of the stack. If my understanding is correct the stack is the reserved memory of an application for it’s statically declared objects and the heap is the memory reservoir of the computer. Can I get some feedback please, I've been finding the web and my texts a little short in this subject. Thx

    G 1 Reply Last reply
    0
    • B BedHead

      Stack – Heap Memory Question I’m trying to figure out how one would determine the size of the stack. If my understanding is correct the stack is the reserved memory of an application for it’s statically declared objects and the heap is the memory reservoir of the computer. Can I get some feedback please, I've been finding the web and my texts a little short in this subject. Thx

      G Offline
      G Offline
      Gerald Leslie Jones
      wrote on last edited by
      #2

      By default, Win32 applications have a stack size of 1MB per thread. This can be changed on a per-thread basis by passing a value other than 0 in the dwStackSize argument to CreateThread/CreateRemoteThread or the default value used by all the threads in a process can be altered via the STACKSIZE element in your .def file. Once allocated, the stack is not resizable. The stack size and the reserved memory for the app have very little to do with each other.

      B 1 Reply Last reply
      0
      • G Gerald Leslie Jones

        By default, Win32 applications have a stack size of 1MB per thread. This can be changed on a per-thread basis by passing a value other than 0 in the dwStackSize argument to CreateThread/CreateRemoteThread or the default value used by all the threads in a process can be altered via the STACKSIZE element in your .def file. Once allocated, the stack is not resizable. The stack size and the reserved memory for the app have very little to do with each other.

        B Offline
        B Offline
        BedHead
        wrote on last edited by
        #3

        First, thanks very much for the reply. I'll do some more searching with dwStackSize and STACKSIZE in the .def file. Is there any other wordings I could search on that might get me some more reference? I am also curious how other languages and non managed applications allocate. Thanks.

        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