On 4/08/13 5:57 PM, Nicholas Nethercote wrote:
AIUI, on Windows the smallest block you can ask for with VirtualAlloc
is 4 KiB.  However, no more than one VirtualAlloc block can exist per
64 KiB chunk.  So if you ask for 4 KiB you'll end up wasting the
remaining 60 KiB of address space in the 64 KiB chunk.

Assuming I'm right about this (I'm fairly certain, but not 100%), it
sounds like some code (be it Mozilla or driver code) is
VirtualAlloc'ing lots of 4 KiB blocks, and thus wasting lots of
address space.

This sounds like a really good hypothesis.

FWIW, the VirtualAlloc() allocation granularity may be queried via GetSystemInfo(), but AFAIK it has always been 64KiB across all architectures supported by NT.

Unsurprisingly, Raymond Chen provides some history on this:
http://blogs.msdn.com/b/oldnewthing/archive/2003/10/08/55239.aspx
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to