data.d

JimBob jim at bob.com
Thu Jul 15 01:03:57 PDT 2010


"Vladimir Panteleev" <vladimir at thecybershadow.net> wrote in message 
news:op.vfvdtwgwtuzx1w at 89-28-59-99.starnet.md...
>
> If you see anything that can be improved, feel free to fork the github 
> repo, or post patches, or just comment on it.

VirtualAlloc returns chunks that have 'dwAllocationGranularity' granularity, 
which is 64K on every Windows OS I've used. So allocating a page, 4K, will 
actualy get you 64K.

So using VirtualAlloc as a replacement for malloc is very wasteful unless 
the allocations are larger that 64K.

You might want to look at HeapCreate and it's siblings. (on windows anyway)







More information about the Digitalmars-d-announce mailing list