Willy Denoyette [MVP]
6/14/2007 12:03:00 AM
"assaf" <assafwo@gmail.com> wrote in message
news:234E787E-E36E-4804-ADCA-C5C11702ABEA@microsoft.com...
> Hello all.
>
> I see that Marshal.AllocHGlobal is always returning memory in a 32 bit
> memory address.
> Can I be assured that this will always be the case?
>
>
> Thanks.
>
> Assaf
The address returned is a 64 bit value. The memory manager will return an
address that is below 4GB as long as there is free space below 4GB, however,
there is no hard guarantee that you would never get an address back that is
> 4GB, so, I would not count on it.
Just curious, why do you need to know that? If you want the guaranteed to
get an address back that is < 4GB, you should compile for 32 bit.
Willy.