summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/emualloc.h
Commit message (Collapse)AuthorAgeFilesLines
* general cleanup: Vas Crabb2017-05-231-33/+43
| | | | | | | | | | | * move rarely-used output and pty interfaces out of emu.h * consolidate and de-duplicate forward declarations, also remove some obsolete ones * clean up more #include guard macros * scope down a few more things (nw) Everyone, please keep forward declarations for src/emu in src/emu/emufwd.h - this will make it far easier to keep them in sync with declarations than having them scattered through all the other files.
* Introduce u8/u16/u32/u64/s8/s16/s32/s64 Vas Crabb2016-11-191-6/+6
| | | | | | | | | | | | * New abbreviated types are in osd and util namespaces, and also in global namespace for things that #include "emu.h" * Get rid of import of cstdint types to global namespace (C99 does this anyway) * Remove the cstdint types from everything in emu * Get rid of U64/S64 macros * Fix a bug in dps16 caused by incorrect use of macro * Fix debugcon not checking for "do " prefix case-insensitively * Fix a lot of messed up tabulation * More constexpr * Fix up many __names
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-3/+3
| | | | | Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8 also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
* replace osd_lock with std::mutex [Miodrag Milanovic] Miodrag Milanovic2016-01-301-1/+2
|
* removed memory tracking (nw) Miodrag Milanovic2016-01-081-23/+6
|
* clang-modernize part 1 (nw) Miodrag Milanovic2015-12-031-3/+3
|
* Replace dynamic_array with std::vector [O. Galibert] Olivier Galibert2015-04-141-1/+1
|
* Cleanups and version bumpmame0153 Miodrag Milanovic2014-04-071-1/+1
|
* Moved core template container classes up from emutempl.h to coretmpl.h: Aaron Giles2014-03-111-161/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Aaron Giles] * these classes now no longer take a resource_pool; everything is managed globally -- this means that objects added to lists must be allocated with global_alloc * added new auto_pointer<> template which wraps a pointer and auto-frees it upon destruction; it also defaults to NULL so it doesn't need to be explicitly initialized * moved tagged_list template to tagmap.h Redo of the low-level memory tracking system: [Aaron Giles] * moved low-level tracking out of emu\emualloc into lib\util\corealloc so it can be shared among all components and used by core libraries * global_alloc and friends no longer use a resource pool to track allocations; turns out this was a wholly redundant system that wasted a lot of memory * removed global_resource_pool entirely * added global_free_array to delete arrays allocated with global_alloc_array * added tracking of object versus array allocation; we will now error if you use global_free on an array, or global_free_array on an object Added new utility helper const_string_pool which can be used to efficiently accumulate strings that are not intended to be modified. Used by updated makelist and software list code. [Aaron Giles] Updated png2bdc and makelist tools to not leak memory and use more modern techniques (no more MAX_DRIVERS in makelist, for example). [Aaron Giles] Deprecated auto_strdup and removed all uses by way of caller-managed astrings and the software list rewrite. [Aaron Giles] Rewrote software list management: [Aaron Giles] * removed the notion of a software_list that is separate from a software_list_device; they are one and the same now * moved several functions into device_image_interface since they really didn't belong in the core software list class * lots of simplification as a result of the above changes Additional notes (no whatsnew): Moved definition of FPTR to osdcomm.h. Some changes happened in the OSD code to fix issues, especially regarding freeing arrays. SDL folks may need to fix up some of these. The following devices still are using tokens and should be modernized (I found them because they kept their token as void * and tried to delete it, which you can't): namco_52xx_device (mame/audio/namco52.c) namco_54xx_device (mame/audio/namco54.c) namco_06xx_device (mame/machine/namco06.c) namco_50xx_device (mame/machine/namco50.c) namco_51xx_device (mame/machine/namco51.c) namco_53xx_device (mame/machine/namco53.c) voodoo_device (emu/video/voodoo.c) mos6581_device (emu/sound/mos6581.c) aica_device (emu/sound/aica.c) scsp_device (emu/sound/scsp.c) dmadac_sound_device (emu/sound/dmadac.c) s3c2440_device (emu/machine/s3c2440.c) wd1770_device (emu/machine/wd17xx.c) latch8_device (emu/machine/latch8.c) duart68681_device (emu/machine/68681.c) s3c2400_device (emu/machine/s3c2400.c) s3c2410_device (emu/machine/s3c2410.c) strataflash_device (mess/machine/strata.c) hd63450_device (mess/machine/hd63450.c) tap_990_device (mess/machine/ti99/990_tap.c) omti8621_device (mess/machine/omti8621.c) vdt911_device (mess/video/911_vdt.c) apollo_graphics_15i (mess/video/apollo.c) asr733_device (mess/video/733_asr.c)
* Bulk convert files that already had standard BSD license in my name Aaron Giles2013-10-161-31/+2
| | | | to new license tagged form.
* Cleanups and version bumpmame0148 Miodrag Milanovic2013-01-111-38/+38
|
* Wrapped the global_resource_pool into a function in an attempt to Aaron Giles2012-01-261-9/+9
| | | | ensure it is initialized before anyone that references it.
* tagmap is just a C++ template now. Added iterators to it as Aaron Giles2012-01-171-3/+0
| | | | well. Updated a few outlying uses.
* Added possibility of disabling memory tracking when using some external ↵ Miodrag Milanovic2011-10-111-1/+4
| | | | libraries in osd layer (no whatsnew)
* Be consistent about template argument naming. Aaron Giles2011-04-301-14/+15
|
* Use much bigger hash tables for memory allocations now that we aremame0142u1 Aaron Giles2011-04-191-4/+3
| | | | | | | | | | | allocating lots of small objects. Previous size was scaling poorly and taking a lot of time to free, causing things like -listxml and -validate to be a lot slower than before since the new driver_enumerator actually frees all of its memory at the end. Also changed resource_pool to support a hash table size as input to the constructor, which allows the global pool to be large, while the machine-local pools can remain smaller.
* (Big tangle of changes that all happened as I was looking into the ROM Aaron Giles2011-04-131-6/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | loader rewrite, which is still in progress....) Replaced mamedriv.c with a new driver list mechanism that is generated by the build tools. The emulator core now expects the presence of a file called src/$(TARGET)/$(SUBTARGET).lst which is just a raw list of driver names, one per line. C and C++ comments are still permitted. This file is parsed by a new build tool makelist which extracts the driver names, sorts them, and generates a file called drivlist.c, which is consumed by the core. [Aaron Giles] Added new osdcore function osd_malloc_array() which is identical to osd_malloc() but obviously hints that the underlying allocation is for an array. Updated all callers to use the appropriate form. Modified the Windows allocator to only use guard pages for array-style allocations, allowing us to enable them once again in debug builds. [Aaron Giles] Created new static class driver_list to wrap accesses to the list of available drivers. Improved speed of driver lookups by relying on the presorting done by makelist. [Aaron Giles] Created helper class driver_enumerator as a helper for iterating through the list of drivers. This class supports basic filtering and iteration, and also serves as a temporary cache of machine_configs. [Aaron Giles] Created cli_frontend object to wrap all the CLI handling code in clifront.c. Updated/simplified all the code to take advantage of the driver_enumerator. [Aaron Giles] Created media_auditor object to wrap all the auditing functions in audit.c. Updated all users to the new interface. Note that the new auditing mechanism is slightly out of sync with the romload code in terms of finding ROMs owned by devices, so it may mis-report some issues until the new ROM loading code is in. [Aaron Giles] Added concept of a per-device searchpath. For most devices, their searchpath is just the short name of the device. For driver_devices, the searchpath is driver[;parent[;bios]]. This searchpath will eventually be used by the rom loader to find ROMs. For now it is used by the media auditor only. [Aaron Giles] Created info_xml_creator object to wrap all the info generation functions in info.c. Converted the file to C++ and cleaned up the input processing code. [Aaron Giles] (not for whatsnew ... Known issues: auditing of CHDs appears busted, and debug builds report unfreed memory if you use the built-in game picker)
* Non-debug builds need to free those memory_entries. Fixes enormous Aaron Giles2011-03-101-113/+113
| | | | | | | | memory consumption when iterating through all drivers like -romident does. Also moved softlist scanning into the main loop so that machine_configs are only constructed once.
* emualloc.h: Force inlining of MAME's new and delete operators. Wilbert Pol2010-10-161-12/+12
|
* More Clang fixes (verified OK with GCC) [Balrog] R. Belmont2010-10-161-2/+2
|
* Converted render.c objects into C++ objects. Updated all callers. Aaron Giles2010-10-131-1/+3
|
* C++-ified the debugger views. Not quite architecturally where I would Aaron Giles2010-06-251-0/+1
| | | | | | | | | | | like them, but it's a start. Split implementation of individual view types out to separate files. Updated all callers. Also: * fixed okim6295 memory view * changed emualloc to free resource pools from earliest to latest so that early objects can safely clean up stuff they allocated
* Moved global new/delete operators into inlines in emualloc.h Aaron Giles2010-02-141-85/+163
| | | | | | | to avoid link errors with certain architectures. [couriersud] Some minor cleanup/normalizing of emualloc in general. [Aaron Giles]
* Cleanups and version bump. Aaron Giles2010-01-161-14/+14
|
* Fixed memory freeing so that is it released in the opposite order Aaron Giles2010-01-111-1/+16
| | | | | | | | | | | | | | | | 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.
* Re-enabled malloc/free but routed them to the file+line versions. Aaron Giles2010-01-081-2/+2
|
* Oops, forgot these files. Aaron Giles2010-01-081-0/+222