Hi

Is there a memory map file size limit with the API CreateFileMapping in
Windows CE 4.1 with all QFE installed until december 2004? In theory I think
that I should be able to create a memory map file of 1GB minus 32MB (size of
the shared memory) but I know that there is always a little part of this
space already reserved (Storage memory, ?, ...) so I tryed to find this size.

To find out what is the "real" quantity of available shared virtual memory I
used VirtualQuery to scan the whole shared memory area and noticed that the
memory seems divided in 32MB slots like the first Virtual Memory GigaBytes
and that only the first 320MB was reserved. With that information in mind I
concluded that I should be able to map 640MB. Unfortunately the biggest
memory mapped file that I am able to create is 320MB but I don't find where
this limit comes from.

There is plenty of virtual memory available because I am able to create
memory mapped files of 320MB, 160MB, 96MB, 32MB, 32MB, 9MB and 5MB at the
same time in virtual memory. At each call to CreateFileMapping my size limit
decrease (the previous sizes are in creation order).

It looks like I has to do with consecutive memory available but my
VirtualQuery calls indicates that each memory mapped files are allocated in
consecutive memory space. The last 2 maps (9 and 5 MB) does not make any
difference in my results as they seems to fit in a 32MB block already
reserved that has available space.

I also noticed that the last 32MB of shared memory is never reserved. I'm I
right if I consider that VirtualQuery return an empty structure if the query
is done on an unused memory space?

Thank you for your help. I need to be able to map 400MB in a row to be able
to save real-time acquisition data very fast and then save it to a
CompactFlash.

Regards,
JF Morin

Re: Memory map file limit in VM by JF

JF
Tue Aug 02 15:18:25 CDT 2005

Hi,

I hope I did not afraid anyone with my last post!

What I want to know is: What is the limit size of a memory mapped file
in virtual memory?

I have to create a memory mapped file of 400MB and it does not work so
I'm looking for more information.

Re: Memory map file limit in VM by Mike

Mike
Thu Aug 04 09:02:18 CDT 2005

Hi Morin,

I think the virtual memory address that you can assign is 512MB. This will
include all your memory (RAM) and the CPU resources. Have look into the
online help under OEMAddressTable.

Best regards,

Mike E.

"JF Morin" <private@private.com> escribió en el mensaje
news:#SV9X95lFHA.1048@tk2msftngp13.phx.gbl...
> Hi,
>
> I hope I did not afraid anyone with my last post!
>
> What I want to know is: What is the limit size of a memory mapped file
> in virtual memory?
>
> I have to create a memory mapped file of 400MB and it does not work so
> I'm looking for more information.



Re: Memory map file limit in VM by JF

JF
Thu Aug 04 13:56:09 CDT 2005

Hi Mike,

Thank you for your answer. I just found out what is the problem and it is a
bug in the memory map file allocation of the Windows CE 4.1 kernel. It is
impossible to reserve big memory mapped file (>~356MB depending of the image
components) under this version of WinCE (I did not check the other ones).
I'm just surprised that there is so few people that encountered the problem.
Now I can reserve and commit big buffers (480MB), oh yeah!

I know it is big for an embedded device, but it is required by our
application...



Re: Memory map file limit in VM by Mike

Mike
Fri Aug 05 03:49:18 CDT 2005

Hi Morin,

where have you find that bug? It maybe of interest for the other users too.

Thanks,

Mike E.

"JF Morin" <private@private.com> escribió en el mensaje
news:uJlUzYSmFHA.1416@TK2MSFTNGP09.phx.gbl...
> Hi Mike,
>
> Thank you for your answer. I just found out what is the problem and it is
a
> bug in the memory map file allocation of the Windows CE 4.1 kernel. It is
> impossible to reserve big memory mapped file (>~356MB depending of the
image
> components) under this version of WinCE (I did not check the other ones).
> I'm just surprised that there is so few people that encountered the
problem.
> Now I can reserve and commit big buffers (480MB), oh yeah!
>
> I know it is big for an embedded device, but it is required by our
> application...
>
>