Manually optimizing for efficient cache usage

From: Bytes Grip (spamtrap_at_crayne.org)
Date: 02/18/05


Date: Thu, 17 Feb 2005 23:24:31 +0000 (UTC)

Hello.

I'm programming in Windows 2000 on a P4 with 512KB of L2 cache.

I have a very big data structure (approx. 500MB) which I store in main
memory (RAM).

I have read about the way the P4's L2 cache works and came up with a
way to arrange my data structure to ensure very efficient cache usage.
(No compiler can do this for me, because this cannot be deduced at
compile-time)

The problem is that I'm assuming I have a sequential block of 500MB
allocated for my needs. Windows lets me allocate such a large buffer,
but I'm afraid it is actually split in memory.

To my questions:

1. Which memory address determines the cache-set to which a certain
line belongs, the virtual address or the absolute addresses?

2. Can I somehow get myself 500MB of real sequential memory in Windows
2000?

3. Is there any other advice you can give me?

Thanks in advance,
Bytesgrip.



Relevant Pages

  • Re: NV Cache v Ready Boost
    ... Windows ReadyDrive enables computers shipped with a hybrid hard drive ... USB flash drives, to be used as an additional memory cache in order to ...
    (microsoft.public.windows.vista.performance_maintenance)
  • FlushViewOfFile, lazy writing, cache manager
    ... If I open a file under Windows XP, create a memory-mapped view of it, ... since it is documented as flushing out dirty pages to the disk. ... does the cache manager's lazy writer write out ... the dirty page being in user mapped memory and in the cache manager's ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Concurency in the functional world
    ... you're saying the message is some big data structure consed out ... global memory ... ... So we have a global memory, which n CPUs act on. ... cache to speed access to the global memory. ...
    (comp.lang.functional)
  • Re: Performance Improvement of complex data structure (hash of hashes of hashes)
    ... Anno Siegel wrote: ... >> Here is the code that I'm using to build up this data structure. ... loop through and increment the ... I know that memory allocation in C is expensive, ...
    (comp.lang.perl.misc)
  • Re: System Cache Too Big - 219/512 MB. Help!
    ... Swap: http://www.webopedia.com/TERM/s/swap.html ... I need to know how to set the System Cache to something a little ... Memory Management is set to Programs in Windows. ...
    (microsoft.public.windowsxp.general)