tlb.cc (8591:8f23aeaf6a91) | tlb.cc (8737:770ccf3af571) |
---|---|
1/* 2 * Copyright (c) 2001-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 49 unchanged lines hidden (view full) --- 58#endif 59 60#define MODE2MASK(X) (1 << (X)) 61 62TLB::TLB(const Params *p) 63 : BaseTLB(p), size(p->size), nlu(0) 64{ 65 table = new TlbEntry[size]; | 1/* 2 * Copyright (c) 2001-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 49 unchanged lines hidden (view full) --- 58#endif 59 60#define MODE2MASK(X) (1 << (X)) 61 62TLB::TLB(const Params *p) 63 : BaseTLB(p), size(p->size), nlu(0) 64{ 65 table = new TlbEntry[size]; |
66 memset(table, 0, sizeof(TlbEntry[size])); | 66 memset(table, 0, sizeof(TlbEntry) * size); |
67 flushCache(); 68} 69 70TLB::~TLB() 71{ 72 if (table) 73 delete [] table; 74} --- 199 unchanged lines hidden (view full) --- 274 lookupTable.insert(make_pair(vaddr.vpn(), nlu)); 275 nextnlu(); 276} 277 278void 279TLB::flushAll() 280{ 281 DPRINTF(TLB, "flushAll\n"); | 67 flushCache(); 68} 69 70TLB::~TLB() 71{ 72 if (table) 73 delete [] table; 74} --- 199 unchanged lines hidden (view full) --- 274 lookupTable.insert(make_pair(vaddr.vpn(), nlu)); 275 nextnlu(); 276} 277 278void 279TLB::flushAll() 280{ 281 DPRINTF(TLB, "flushAll\n"); |
282 memset(table, 0, sizeof(TlbEntry[size])); | 282 memset(table, 0, sizeof(TlbEntry) * size); |
283 flushCache(); 284 lookupTable.clear(); 285 nlu = 0; 286} 287 288void 289TLB::flushProcesses() 290{ --- 318 unchanged lines hidden --- | 283 flushCache(); 284 lookupTable.clear(); 285 nlu = 0; 286} 287 288void 289TLB::flushProcesses() 290{ --- 318 unchanged lines hidden --- |