diff options
author | 2010-01-11 18:02:38 +0000 | |
---|---|---|
committer | 2010-01-11 18:02:38 +0000 | |
commit | a9c5a5a27e0511163a774525f86cd9b66e497944 (patch) | |
tree | 758e84268350230cbb894d67b017ac1b300c9990 /src/emu/cpuexec.h | |
parent | 2441940e7a1bdc7d637f6b01792846ee493291b9 (diff) |
Fixed memory freeing so that is it released in the opposite order
it was originally allocated.
Changed machine->region() to return a pointer to the now-public
region_info class.
Added new member function space() to the device_config, along with
shorter constants to be used (AS_PROGRAM, AS_DATA, AS_IO). With no
parameters, space() returns the first address space, which is
commonly the only space present. Updated a few devices that referenced
the old space[] array to call the new function instead.
Added #define to emualloc to ensure delete can't be freely used.
Diffstat (limited to 'src/emu/cpuexec.h')
-rw-r--r-- | src/emu/cpuexec.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/emu/cpuexec.h b/src/emu/cpuexec.h index 94259209db1..3e8e33b03ba 100644 --- a/src/emu/cpuexec.h +++ b/src/emu/cpuexec.h @@ -342,10 +342,7 @@ INLINE cpu_debug_data *cpu_get_debug_data(const device_config *device) INLINE const address_space *cpu_get_address_space(const device_config *device, int spacenum) { - /* it is faster to pull this from the pre-fetched data, but only after we've started */ - if (device->token != NULL) - return device->space[spacenum]; - return memory_find_address_space(device, spacenum); + return device->space(spacenum); } #endif /* __CPUEXEC_H__ */ |