summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/memory.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2012-04-24 04:47:27 +0000
committer Aaron Giles <aaron@aarongiles.com>2012-04-24 04:47:27 +0000
commit9afad3fd75f833e97274d1bbf15f92a8230f4d94 (patch)
tree60d7ebc79b82f4bc7e75bdad6af382e835bc2b5d /src/emu/memory.c
parent3066fcc6352583d66f04a77bdcaffa510e3b3719 (diff)
Use a tagged_list for memory_banks.
Diffstat (limited to 'src/emu/memory.c')
-rw-r--r--src/emu/memory.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/emu/memory.c b/src/emu/memory.c
index 1b861de383d..1ca92ac8a9d 100644
--- a/src/emu/memory.c
+++ b/src/emu/memory.c
@@ -2930,13 +2930,12 @@ memory_bank &address_space::bank_find_or_allocate(const char *tag, offs_t addrst
throw emu_fatalerror("Unable to allocate bank for RAM/ROM area %X-%X\n", bytestart, byteend);
}
- // allocate the bank
+ // if no tag, create a unique one
membank = global_alloc(memory_bank(*this, banknum, bytestart, byteend, tag));
- manager().m_banklist.append(*membank);
-
- // for named banks, add to the map and register for save states
- if (tag != NULL)
- manager().m_bankmap.add_unique_hash(tag, membank, false);
+ astring temptag;
+ if (tag == NULL)
+ tag = temptag.format("anon_%p", membank);
+ manager().m_banklist.append(tag, *membank);
}
// add a reference for this space