Skip to content

Commit

Permalink
13th commit: Getting MANY segmentation faults, cleaned up some compil…
Browse files Browse the repository at this point in the history
…ation bugs. Fixes coming soon.
  • Loading branch information
Manuel Gomez committed May 30, 2018
1 parent c3a1a86 commit ec3413a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Binary file modified csim
Binary file not shown.
5 changes: 3 additions & 2 deletions csim.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ void accessData(mem_addr_t addr) {
cache_line_t *currLine;
cache_line_t *head;
cache_line_t *tail;
cache_line_t *newHead;
cache_line_t *newTail;

//Initializing the head, tail, and curr pointers:
Expand Down Expand Up @@ -201,6 +200,8 @@ void accessData(mem_addr_t addr) {
(head->next)->prev = head;
}
else {
//Backup node pointer to keep list intact.
cache_line_t *prevNode;
prevNode = currLine->prev;
prevNode->next = (cache_line_t *)currLine+1;
(prevNode->next)->prev = prevNode;
Expand Down Expand Up @@ -231,7 +232,7 @@ void accessData(mem_addr_t addr) {

//Increase the chance for an eviction:
else {
takenLines++;
linesTaken++;
}
currLine = currLine->next;
}
Expand Down

0 comments on commit ec3413a

Please sign in to comment.