This site is no longer active and is available for archival purposes only. Registration and login is disabled.

I want to allocate 16Mb but can't


I want to allocate 16Mb but can't

Postby matt99 » Sep 8, 2005 @ 6:50pm

I'm developing an application based on ipaq hx4700. I'd like to get 16Mb memory(256*256*256 chars), but I can't! It worked on h5550 perfectly. h5550 has 128Mb memory(and 4700 = 64Mb) but I think it doesn't matter because one process can get just 32Mb memory(<-Am I right? :roll: ).
With GlobalMemoryStatus(), there's enough memory spaces to get 16Mb. I tried with malloc and VirtualAlloc but failed. I tested and I can get *just* 8Mb memory.
It's not a problem about *allocate and free again and again*. I just allocate 16Mb when my application is started, and free it when I quit. What can I do? I'm going crazy... lol
matt99
pm Member
 
Posts: 9
Joined: Apr 6, 2005 @ 11:50am


Re: I want to allocate 16Mb but can't

Postby mamaich » Sep 9, 2005 @ 6:15am

I allocate huge chunks of memory via memory mapped files. CreateFileMapping(NULL,...)
mamaich
pm Member
 
Posts: 53
Joined: Dec 14, 2004 @ 3:16am


Postby drgoldie » Sep 10, 2005 @ 9:13pm

Last edited by drgoldie on Sep 11, 2005 @ 3:38pm, edited 1 time in total.
drgoldie
pm Member
 
Posts: 330
Joined: Jan 10, 2003 @ 10:46am
Location: Vienna


wow!

Postby matt99 » Sep 11, 2005 @ 12:18pm

Thanks guys, you saved me :lol:
matt99
pm Member
 
Posts: 9
Joined: Apr 6, 2005 @ 11:50am


Re: wow!

Postby mamaich » Sep 14, 2005 @ 12:16am

mamaich
pm Member
 
Posts: 53
Joined: Dec 14, 2004 @ 3:16am


Postby drgoldie » Sep 14, 2005 @ 7:44am

for my current research project i need more RAM than a process memory slot (especially counting DLLs in) can provide.

Doug Lea's heap implementation already uses VirtualAlloc under Windows, so i only had to make sure, that 2MB blocks are reserved in order to have a custom heap that can use all of the PDA's memory.

i wish that MS would one day remove this ugly 32MB barrier from WinCE. at least under WinCE 5.0 this issue is still the there.

bye,
Daniel
drgoldie
pm Member
 
Posts: 330
Joined: Jan 10, 2003 @ 10:46am
Location: Vienna


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron