Working with Linux until now where stack addresses are very high and heap addresses are pretty low (as seen by printing heap and stack addresses using a C program), I have a problem with the Win32 process memory layout. MWSDN is saying that that stack addresses are higher than heap addresses, but from what I saw in practice, stack addresses are lower than heap addresses. So I am confused. Someone please explain.
相关问题
- What uses more memory in c++? An 2 ints or 2 funct
- the application was unable to start correctly 0xc0
- how to get running process information in java?
- Handle button click in another application
- Memory for python.exe on Windows 7 python 32 - Num
相关文章
- Why are memory addresses incremented by 4 in MIPS?
- Why windows 64 still makes use of user32.dll etc?
- Threading in C# , value types and reference types
- How to start a process in its own process group?
- Can WM_NEXTDLGCTL be used with non-dialog windows?
- Is my heap fragmented
- Windows EventLog: How fast are operations with it?
- Stack<> implementation in C#
Hm,
stack addresses are higher than heap addresses
- this is simply not true. Both stack and heap can reside anywhere in the address space of the process on Windows.If you start a lot of threads, make huge heap allocations and load hundreds of dlls, you will find that all these objects are evenly spread around the address space.
This picture shows the structure of virtual allocations in a typical 32-bit process on Windows. Green shows free areas, blue that something is allocated. Activity is mostly taking place in the beginning of the address space but in other address ranges it is present also.