HighTechTalks DotNet Forums  

Marshal.AllocHGlobal in 64 bit Vista

Dotnet Framework (Interop) microsoft.public.dotnet.framework.interop


Discuss Marshal.AllocHGlobal in 64 bit Vista in the Dotnet Framework (Interop) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
assaf
 
Posts: n/a

Default Marshal.AllocHGlobal in 64 bit Vista - 06-11-2007 , 01:50 PM






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


Reply With Quote
  #2  
Old   
Willy Denoyette [MVP]
 
Posts: n/a

Default Re: Marshal.AllocHGlobal in 64 bit Vista - 06-13-2007 , 08:02 PM






"assaf" <assafwo (AT) gmail (DOT) com> wrote

Quote:
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
Quote:
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.



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.