mirror of
https://github.com/holub/mame
synced 2025-04-20 15:32:45 +03:00
Mark replacements separate from overloads and remove unneeded prototypes (nw)
This commit is contained in:
parent
d1b57314bf
commit
3c5998b7ee
@ -96,7 +96,7 @@ memory_entry *memory_entry::s_hash[memory_entry::k_hash_prime] = { NULL };
|
||||
memory_entry *memory_entry::s_freehead = NULL;
|
||||
|
||||
//**************************************************************************
|
||||
// OPERATOR OVERLOADS - DEFINITIONS
|
||||
// OPERATOR REPLACEMENTS
|
||||
//**************************************************************************
|
||||
|
||||
#ifndef NO_MEM_TRACKING
|
||||
@ -107,8 +107,17 @@ void *operator new[](std::size_t size) throw (std::bad_alloc) { return malloc_fi
|
||||
void operator delete(void *ptr) throw() { if (ptr != NULL) free_file_line(ptr, NULL, 0, false); }
|
||||
void operator delete[](void *ptr) throw() { if (ptr != NULL) free_file_line(ptr, NULL, 0, true); }
|
||||
|
||||
void* operator new(std::size_t size,const std::nothrow_t&) throw() { return malloc_file_line(size, NULL, 0, false, false, false); }
|
||||
void* operator new[](std::size_t size, const std::nothrow_t&) throw() { return malloc_file_line(size, NULL, 0, true, false, false); }
|
||||
void operator delete(void* ptr, const std::nothrow_t&) throw() { if (ptr != NULL) free_file_line(ptr, NULL, 0, false); }
|
||||
void operator delete[](void* ptr, const std::nothrow_t&) throw() { if (ptr != NULL) free_file_line(ptr, NULL, 0, true); }
|
||||
|
||||
#endif
|
||||
|
||||
//**************************************************************************
|
||||
// OPERATOR OVERLOADS - DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// file/line new/delete operators
|
||||
void *operator new(std::size_t size, const char *file, int line) throw (std::bad_alloc) { return malloc_file_line(size, file, line, false, true, false); }
|
||||
void *operator new[](std::size_t size, const char *file, int line) throw (std::bad_alloc) { return malloc_file_line(size, file, line, true, true, false); }
|
||||
|
@ -57,16 +57,6 @@ void dump_unfreed_mem(UINT64 start = 0);
|
||||
// zeromem_t is a dummy class used to tell new to zero memory after allocation
|
||||
class zeromem_t { };
|
||||
|
||||
#ifndef NO_MEM_TRACKING
|
||||
|
||||
// standard new/delete operators (try to avoid using)
|
||||
void *operator new(std::size_t size) throw (std::bad_alloc);
|
||||
void *operator new[](std::size_t size) throw (std::bad_alloc);
|
||||
void operator delete(void *ptr) throw();
|
||||
void operator delete[](void *ptr) throw();
|
||||
|
||||
#endif
|
||||
|
||||
// file/line new/delete operators
|
||||
void *operator new(std::size_t size, const char *file, int line) throw (std::bad_alloc);
|
||||
void *operator new[](std::size_t size, const char *file, int line) throw (std::bad_alloc);
|
||||
|
Loading…
Reference in New Issue
Block a user