Memory Mapped Files in x64

Memory Mapped Files in x64


Our code is compiled with Composer XE 2013 in Studio 2010, for Win32

Some of our users have migrated to Win7 x64 and we have discovered (as has been reported earlier) that there can be problems with the ALLOCATE process for code compiled for Win32 that attempts to run in Win7x64. If, however, the code is compiled for x64, we encounter no problems. 

We have used memory mapped files in our commercial software since early in XP days. In the Win32 code we use the following at the beginning of the subroutine that was used to access a previously established memory mapped file to use the MMF routines supplied in the kernel32 module:

use kernel32, only: CreateFileMapping, MapViewOfFile, CloseHandle, UnmapViewOfFile, RtlMoveMemory

What are / where are the equivalent routines for x64?


2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

All of those routines are supported on x64. You simply have to make sure that address-sized arguments are declared properly, such as INTEGER(PVOID) or INTEGER(INT_PTR_KIND()). Most likely you have declared such variables as INTEGER(4) which won't work.

I am unaware of any supposed issues of ALLOCATE in 32-bit programs on x64. Can you elaborate or point to a report of such?

Retired 12/31/2016

Leave a Comment

Please sign in to add a comment. Not a member? Join today