Thread: Cache usage

  1. #1
    Just kidding.... fnoyan's Avatar
    Join Date
    Jun 2003
    Location
    Still in the egg
    Posts
    275

    Cache usage

    Hi

    Is there a way to demonstare the cache usage of a program. I know it is invisibile to programmer but, sometimes data is stored in cache and sometimes in primary memory (RAM). So, is it possible to distinguish in a "magic way" ?

    Thanks..

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Code:
    #include<stdmagic.h>
    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Awesomefaceradcore bivhitscar's Avatar
    Join Date
    Apr 2006
    Location
    Melbourne, Australia
    Posts
    210
    Quote Originally Posted by quzah
    Code:
    #include<stdmagic.h>
    Quzah.

    Bahahahahahaha.

    I might ask my lecturer about that one.
    it's ironic considerate rarity patron of love higher knowledge engulfs me...

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Like cachegrind for example?
    http://valgrind.org/info/tools.html
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    Just kidding.... fnoyan's Avatar
    Join Date
    Jun 2003
    Location
    Still in the egg
    Posts
    275
    Well, I found something useful from google.

    http://www.cs.rpi.edu/~hollingd/comp.../CacheCode.ppt

    This slide shows the concept of locality. And may be useful I think! Especially accessing a matrix from its rows or columns! There is a performance difference.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. need help with cache simulator!
    By dtogers123 in forum C Programming
    Replies: 3
    Last Post: 04-30-2008, 06:18 PM
  2. ideas requested for a CACHE.
    By bean66 in forum C Programming
    Replies: 2
    Last Post: 02-21-2008, 11:01 AM
  3. Resource manager tree
    By VirtualAce in forum Game Programming
    Replies: 23
    Last Post: 09-07-2007, 10:27 PM
  4. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 01:30 PM
  5. cache miss/hit
    By xddxogm3 in forum C++ Programming
    Replies: 3
    Last Post: 05-07-2007, 06:51 PM