Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What is CreateFileMapping/MapViewOfFile address alignment?

300 views
Skip to first unread message

liveasfilm

unread,
Sep 20, 2009, 8:17:31 PM9/20/09
to
I want to know about alignment of return address which is from
MapViewOfFile.
Alignment of VirtualAlloc is 64KB.
But CreateFileMapping/MapViewOfFile returns 1MB aligned address.
Is it correct?

Thanks.
JJG.

Valter Minute [eMVP]

unread,
Sep 21, 2009, 3:46:33 AM9/21/09
to

Memory alignment may be CPU dependent and may change if you move to
another hardware architecture or to a new kernel release, so you can't
take it for granted (unless it's specified in the references, like for
VirtualAlloc/Copy but, even in this case, you may discover that it has
been changed reading the help of a new release).
If you explain why do you need to know it someone may provide a
different approach.

--
Valter Minute (eMVP)
www.fortechembeddedlabs.it - Training, support and development for
Windows CE
www.geekswithblogs.net/WindowsEmbeddedCookbook - My embedded programming
and cooking blog
(the reply address of this message is invalid)

0 new messages