WinCE
(1)
GetCurrentProcess
(1)
VirtualAllocEx
(1)
VirtualCopyEx
(1)
VirtualFreeEx
(1)
OpenProcess
(1)
ProcessID
(1)
Ext
(1)
Verification of Ext Physical Memory beyond 512MB
Asked By Johan
05-Nov-09 07:44 PM

Hi All,
I read from several articles expecially from Sue Loh, that we are able
to extend the physical memory of WinCE 6.0 beyond 512MB using
VirtualAllocEx and VitualCopyEx. This is what i have done to replicate
it.
My Setup:
-WinCE 6.0 using CEPC with 1GB RAM
My Steps:
- Modify the sample stream driver where VirtualAllocEx and
VirtualCopyEx is called
- From an application, i will pass to the driver the application's
processID which VirtualAllocEx will use for reserving 512MB of space.
VirtualCopyEx is also called as shown.
In driver:
//processid is received from application
destprocess=OpenProcess(0,FALSE,processid);
sourceprocess=GetCurrentProcess();
p=(LPBYTE)VirtualAllocEx(destprocess, NULL, 0x20000000, MEM_RESERVE,
PAGE_READWRITE);
ret=VirtualCopyEx(destprocess, p, sourceprocess, (void*)0x20000000,
(512*1024*1024), PAGE_READWRITE|PAGE_PHYSICAL}PAGE_NOCACHE);
- With the returned base address of p, i am able to write and read
data into it in my application. (Which i assume that i have
successfully mapped the remaining 512MB of RAM left)
- However in my test to verify this, i purposely set the allocated
space to 512MB+1 byte. This should fail because i have only 1GB RAM.
The first half is taken by OS while only 512MB is left for mapping.
However, what i notice is that i am able to allocated the 512MB + 1
byte space and am still able to read and write to the last byte.
1) Why is this so? I though i only have up to 512MB of physical memory
left, why is that i am able to map more than 512MB and even access the
512MB + 1 byte ? (In the code, i am assuming that the remaining
physical memory i can map is from 0x20000000 to 0x3FFFFFFF)
2) Secondly, in my driver, i also include ability to free this mapping
via this codes
In driver:
//processid is received from application
destprocess=OpenProcess(0,FALSE,processid);
virtualFreeEx(destprocess,p,0,MEM_RESERVE);
When this code is executed, the whole CEPC restarts itselfs. Can i
know what i happening? Is there isome kind of memory corruption that
caused this to happen?
Thanks for the help:)
Hi,Any kind soul willing to help me with this? Thanks.
Johan replied to Johan
06-Nov-09 06:57 AM
Hi,
Any kind soul willing to help me with this? Thanks.
Can anyone pls take a look at my question and help me with this?Thanks.
Johan replied to Johan
15-Nov-09 10:57 PM
Can anyone pls take a look at my question and help me with this?
Thanks.
that we are able to extend the physical memory of WinCE 6.0 beyond 512MB using VirtualAllocEx and VitualCopyEx. This is what i have done to replicate it. My Setup: -WinCE 6.0 using CEPC with 1GB RAM My Steps: - Modify the sample stream driver where VirtualAllocEx and VirtualCopyEx is called - From an application, i will pass to the driver the application's processID which VirtualAllocEx will use for reserving 512MB of space. VirtualCopyEx is also is received from application destprocess = OpenProcess(0, FALSE, processid); sourceprocess = GetCurrentProcess(); p = (LPBYTE)VirtualAllocEx(destprocess, NULL, 0x20000000, MEM_RESERVE, PAGE_READWRITE); ret = VirtualCopyEx(destprocess, p, sourceprocess that we are able to extend the physical memory of WinCE 6.0 beyond 512MB using VirtualAlloc
C++ / VB can wince 6.0 support multi core. hello all, Wince 7.0 is supporting ARMv7 dual core. wince 6.0 doesnot support dual core. so is it possible to port a dual core supported BSP in wince 7.0 to wince 6.0. if yes then how much effort will b required for it. Thanks in advance keywords: can, wince, 6.0, support, multi, core. description: hello all, Wince 7.0 is supporting ARMv7 dual core. wince 6.0 doesnot support dual core. so is it possible to port a dual core supported BSP in wince 7.0
C++ / VB web browser wince hi is there an web browser control for wince? (like chtmldialog) thank keywords: web, browser, wince description: hi is there an web browser control for wince (like chtmldialog) thank?
C++ / VB wince nls load information Hi, I have learned that the locale conventions are kept in wince.nls in \ windows folder. The OS uses this file for initializing the NLS tables.After wince boots up i can see the list of locales in for all locales loaded ) after it is read from the wince.nls file? how to load a different NLS after wince boots up? Best Regards, Raja I do not think that Thanks for the reply. . It is Possible to make the wince system load a different NLS. There are some exe's simple vein, you could arrange to change the *contents* of wince.nls in the filesystem and then reboot the device. This that you copy there effectively hides the ROM version of wince.nls. Paul T. keywords: wince, nls, load, information description: Hi, I have learned that the locale conventions are kept in wince.nls in \ windows folder. The OS uses this file for
C++ / VB WinCE license Hi, How to buy WinCE license? Thanks! Contact a WinCE distributor. You can find a directory of them on Microsoft just wondered if there was an updated version? Thanks keywords: WinCE, license description: Hi, How to buy WinCE license Thanks!?
C++ / VB WinCE 5.0 and handle count hi, how to get the handle count of a process in WinCe 5.0 ? Thanks for help keywords: WinCE, 5.0, and, handle, count description: hi, how to get the handle count of a process in WinCe 5.0 Thanks for help?
C++ / VB Testing multiple WinCE based devices Hello Gurus, With activesync you are limited to one PC to one wince device. Are there any other ways of connecting multiple wince devices to a single PC? The PC should be able mind. Henrik Viklund http: / / www.addlogic.se keywords: Testing, multiple, WinCE, based, devices description: Hello Gurus, With activesync you are limited to one PC to one wince device. Are there any other ways of connecting multiple wince devices to a single PC
C++ / VB WinCE Support for AAC files. . hi, Can anybody tell me what are the filters required to play a .aac in WinCE. . r they AAC Parser, CoreAAC and AudioDecoder?? Where can i find these filters( AAC Parser, CoreAAC ). . Regards Ramya From: "ramya" WinCE does not contain AAC support out of the box, but Windows Mobile 5 / 6). Unless you have an x86-based WinCE system (which rules out Windows Mobile), you can not use will probably need to at least rebuild the filters for WinCE, since there are some differences. - - / / Alessandro Angeli / / MVP :: DirectShow / MediaFoundation dot com / / http: / / www.riseoftheants.com / mmx / faq.htm keywords: WinCE, Support, for, AAC, files. . description: hi, Can anybody tell me what are the filters required to play a .aac in WinCE. . r they AAC Parser, CoreAAC and AudioDecoder Where can i