flat assembler
Message board for the users of flat assembler.
Index
> Windows > # of VirtualAlloc calls per process?.. |
Author |
|
AsmGuru62 26 Jul 2013, 23:13
Hi everyone,
Does anyone know if there is a limit of VirtualAlloc calls per process? Win32 Platform. |
|||
26 Jul 2013, 23:13 |
|
Alphonso 27 Jul 2013, 03:22
Unless using 4GT tuning, what is it that are you trying to do AsmGuru62?
|
|||
27 Jul 2013, 03:22 |
|
AsmGuru62 27 Jul 2013, 20:18
I am writing a heap replacement code with some diagnostics.
|
|||
27 Jul 2013, 20:18 |
|
blacky 28 Jul 2013, 14:52
I think there is also one detail to that question, and thats if you're allocating the memory and commiting it. See this blog post for an in depth analysis on Virtual Memory on Windows:
http://blogs.technet.com/b/markrussinovich/archive/2008/11/17/3155406.aspx?Redirected=true |
|||
28 Jul 2013, 14:52 |
|
AsmGuru62 28 Jul 2013, 21:37
Thanks!
The memory segments for my heap will be allocated with both flags: Code: invoke VirtualAlloc, 0, 10000h, MEM_RESERVE or MEM_COMMIT, PAGE_READWRITE |
|||
28 Jul 2013, 21:37 |
|
comrade 01 Aug 2013, 09:04
revolution wrote:
It's actually much less than that since the allocation granularity is typically 64 KB, not 4 KB. Look at SYSTEM_INFO.dwAllocationGranularity. That is, if you do:
You will consume 128 KB of VA, not 8 KB. And of course the 2^31 member is also variable: if you run with /3GB and your EXE links with IMAGELARGEADDRESSAWARE, then you will have 3GB of usable user-mode VA on a 32-bit native OS, and the full 4 GB of VA on a 64-bit native OS. Relevant references: http://msdn.microsoft.com/en-us/library/windows/desktop/bb613473%28v=vs.85%29.aspx http://msdn.microsoft.com/en-us/library/windows/desktop/ms724958%28v=vs.85%29.aspx http://msdn.microsoft.com/en-us/library/windows/desktop/aa366887%28v=vs.85%29.aspx |
|||
01 Aug 2013, 09:04 |
|
AsmGuru62 01 Aug 2013, 13:44
Great! Thanks for the answer!
I will be allocating at least by 64Kb chunks. |
|||
01 Aug 2013, 13:44 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.