RSIM Bug Report #5

Version of RSIM1.0
Bug number5
Bug class4
Date9/28/97
Reported byauthors
AffectsAll (no impact on simulated performance)
Filescache.c

Problem Description

The memory for the cache pipeline is currently allocated with the code:

captr->pipe = malloc(sizeof(Pipeline) * (datapipes + tagpipes)); However, pipe is supposed to be an array of pointers to Pipeline data structures, not an array of Pipeline data structures. Thus, this allocates too much memory. This has no impact on simulated performance, as it will always allocate too much memory.

Problem Fix

The line is now changed to:

captr->pipe = (Pipeline **)malloc(sizeof(Pipeline *) * (datapipes + tagpipes));