structure (DirectoryMemory, external = "yes") {
AbstractCacheEntry allocate(Addr, AbstractCacheEntry);
AbstractCacheEntry lookup(Addr);
+ void deallocate(Addr);
bool isPresent(Addr);
void invalidateBlock(Addr);
void recordRequestType(DirectoryRequestType);
/*
- * Copyright (c) 2017 ARM Limited
+ * Copyright (c) 2017,2019 ARM Limited
* All rights reserved.
*
* The license below extends only to copyright in the software and shall
idx = mapAddressToLocalIdx(address);
assert(idx < m_num_entries);
+ assert(m_entries[idx] == NULL);
entry->changePermission(AccessPermission_Read_Only);
m_entries[idx] = entry;
return entry;
}
+void
+DirectoryMemory::deallocate(Addr address)
+{
+ assert(isPresent(address));
+ uint64_t idx;
+ DPRINTF(RubyCache, "Removing entry for address: %#x\n", address);
+
+ idx = mapAddressToLocalIdx(address);
+ assert(idx < m_num_entries);
+ assert(m_entries[idx] != NULL);
+ delete m_entries[idx];
+ m_entries[idx] = NULL;
+}
+
void
DirectoryMemory::print(ostream& out) const
{
/*
- * Copyright (c) 2017 ARM Limited
+ * Copyright (c) 2017,2019 ARM Limited
* All rights reserved.
*
* The license below extends only to copyright in the software and shall
AbstractCacheEntry *lookup(Addr address);
AbstractCacheEntry *allocate(Addr address, AbstractCacheEntry* new_entry);
+ // Explicitly free up this address
+ void deallocate(Addr address);
+
void print(std::ostream& out) const;
void recordRequestType(DirectoryRequestType requestType);