Bruce
Fri Jun 06 05:43:13 PDT 2008
Read the documentation for OEMAddressTable again. It set up virtual to
physical mapping in the kernel's address space. To use VirtualAlloc, you
don't even need to have the addresses mapped in OEMAddressTable.
--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT EuroTech DOT com
My BLOG
http://geekswithblogs.net/bruceeitman
EuroTech Inc.
www.EuroTech.com
"deepu" <pradeepit@gmail.com> wrote in message
news:60904a07-d9b4-4276-99ba-1b9fd2dd0110@i18g2000prn.googlegroups.com...
Dear steve,
Thanks for the response. I wanted to allocate a memory location in a
cached adress spcae and lock it in the cache. As I am working in arm9
processor. cache locking is possible.
You mean the whole of the userspace is already cacheable in windows
CE. But the variable adress it returns doesnot match with any of the
adresses mentioned in the virtual map. How can i relate these 2?
Regadrs
Deepu
On Jun 6, 12:43 pm, "Steve Araiza" <sara...@contractor.net> wrote:
> but I think that the OEMAddressTable only applies to the kernel process.
>
> In your example, your tempPtr is in cached memory.
>
> The cache is usually only enabled for RAM access, it usually does not make
> sense for peripherals. With that in mind, explicitly asking for 0x80000000
> (probably RAM) will likely corrupt something if you write to it.
>
> What are you actually trying to do?
>
> steve araiza
>
> "deepu" <pradee...@gmail.com> wrote in message
>
> news:edd142cb-c806-4e79-8823-b5fb72522b9f@w1g2000prd.googlegroups.com...
>
>
>
> > Dear all,
> > I am working on a ARM9 platform that has WINCE 5 ported onit. I want
> > to use some cached memory space in user application. The normal malloc
> > is allocating the address at 0x004ea14c, but when i saw the virtual
> > address space mapping in OEMAddressTable, it shows that cached memory
> > space lies between 0x80000000-0x9FFFFFFF. Hence I am trying to use
> > virtual alloc to allocate some memory from that address space, I am
> > not able to allocate at that location. When I verify the address
> > returned by virtualalloc, it remains the same as returned by normal
> > malloc.
> > I am not able to understand the difference in here between
> > 1) malloc and virtual alloc, and also
> > 2) cached memory space reserved in kernel space and userspace
> > memorymap where does it points to.
>
> > Or am I missing some thing in here. I am using the virtual alloc as
> > follows.
>
> > unsigned int* tempPtr;
> > tempPtr = (unsigned int*)VirtualAlloc((LPVOID) 0x80000000, 2468,
> > MEM_RESERVE, PAGE_READWRITE);
>
> > I also tried with other (MEM_RESERVE || MEM_TOP_DOWN).
>
> > Can any one please letme know if something is wrong in my approach.
>
> > Regards
> > Deepu- Hide quoted text -
>
> - Show quoted text -