Re: Wince address space allocation



Dear all,
In that case can i check the contents in the cache. Not only in Wince
but on any other platforms like RVDS or any other armsimulators. I
basically want to see the cache dataflow in arm. and the cache data
updated in the processor, as i am not sure from my application has
cache been used efficiently or not. I can also run my application
without any OS.
Any suggestions regarding this.
Regards
Deepu

On Jun 6, 11:53 pm, "Tom Gensel (eMVP)"
<tgensel.at.ptgsystems.dot.com> wrote:
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 <pradee...@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 -- Hide quoted text -

- Show quoted text -

.



Relevant Pages

  • Re: PSQL control center crashes PSQL engine.
    ... usually eek out 1.7 GB of cache, but it really depends on other usage, ... memory on the server was just above 2GB. ... Certain versions of Windows do allow a process to allocate mroe than ... If you truly want to use all the memory in your server and you have ...
    (comp.databases.btrieve)
  • Re: VirtualAlloc()
    ... large/global memory usage instead of "new". ... allocate physical storage. ... uses `VirtualAlloc'. ...
    (microsoft.public.vc.language)
  • [patch 05/26] Slab allocators: Cleanup zeroing allocations
    ... * kzalloc - allocate memory. ... The memory is set to zero. ... * @cache: ...
    (Linux-Kernel)
  • Re: Implementing NVMHCI...
    ... In fact, if there's some way to blow the cache, you could have made it much smaller. ... Imagine what would happen to user application performance if kmallocalways returned 16kB-aligned chunks of memory, all sized as integer multiples of 16kB? ... So having a 16kB or 64kB granularity is a _disaster_. ... If you always allocate 64kB for file caches, and you work with lots of small files, you will literally waste all your memory. ...
    (Linux-Kernel)
  • Re: Games made with BBC BASIC for Windows
    ... Memory handling, string handling and data structures are part of BBC ... allocate 256 Mbytes of contiguous virtual address space (actual memory ... used is of course typically very much less) but for some reason Wine ... options of VirtualAlloc, presumably because of some limitation in ...
    (comp.sys.acorn.misc)