Re: Wince address space allocation
- From: "Tom Gensel (eMVP)" <tgensel.at.ptgsystems.dot.com>
- Date: Fri, 06 Jun 2008 10:53:07 -0400
The address your application receives from the malloc call is a
process specific user-space address within Slot 0 of the Windows CE
5.0 address space.
malloc allocates memory from your process' heap which is created by
the kernel within the RAM memory region specified in the MEMORY
section of CONFIG.BIB and should be located within the cacheable
range.
You do not need to do anything else to allocate cacheable memory for
your application unless that memory needs to reside somewhere specific
within the kernel's virtual address space.
Tom
On Thu, 5 Jun 2008 21:08:00 -0700 (PDT), deepu <pradeepit@xxxxxxxxx>
wrote:
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...@xxxxxxxxxxxxxx> 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...@xxxxxxxxx> wrote in message
news:edd142cb-c806-4e79-8823-b5fb72522b9f@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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 -
- Follow-Ups:
- Re: Wince address space allocation
- From: deepu
- Re: Wince address space allocation
- Prev by Date: Re: Driver load order
- Next by Date: Different interfaces for display driver power management? CE6.0
- Previous by thread: OID_PNP_ADD_WAKE_UP_PATTERN
- Next by thread: Re: Wince address space allocation
- Index(es):
Relevant Pages
|