C code to emulate a multi level cache hierarchy.