summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Wilbert Pol <wilbert@jdg.info>2010-10-16 18:17:00 +0000
committer Wilbert Pol <wilbert@jdg.info>2010-10-16 18:17:00 +0000
commit1d4ea432e9770483e85cad69f765364344cc370e (patch)
tree25a6587a8fb421264d70ce4a25ec6948574368ae
parent84cdaed285678cb58f9f621e06956f06bd2ac27d (diff)
emualloc.h: Force inlining of MAME's new and delete operators.
-rw-r--r--src/emu/emualloc.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/emu/emualloc.h b/src/emu/emualloc.h
index e4ff11a424c..10aa43a04e6 100644
--- a/src/emu/emualloc.h
+++ b/src/emu/emualloc.h
@@ -204,7 +204,7 @@ void dump_unfreed_mem();
//**************************************************************************
// standard new/delete operators (try to avoid using)
-inline void *operator new(std::size_t size) throw (std::bad_alloc)
+ATTR_FORCE_INLINE inline void *operator new(std::size_t size) throw (std::bad_alloc)
{
void *result = malloc_file_line(size, NULL, 0);
if (result == NULL)
@@ -212,7 +212,7 @@ inline void *operator new(std::size_t size) throw (std::bad_alloc)
return result;
}
-inline void *operator new[](std::size_t size) throw (std::bad_alloc)
+ATTR_FORCE_INLINE inline void *operator new[](std::size_t size) throw (std::bad_alloc)
{
void *result = malloc_file_line(size, NULL, 0);
if (result == NULL)
@@ -220,13 +220,13 @@ inline void *operator new[](std::size_t size) throw (std::bad_alloc)
return result;
}
-inline void operator delete(void *ptr) throw()
+ATTR_FORCE_INLINE inline void operator delete(void *ptr) throw()
{
if (ptr != NULL)
free_file_line(ptr, NULL, 0);
}
-inline void operator delete[](void *ptr) throw()
+ATTR_FORCE_INLINE inline void operator delete[](void *ptr) throw()
{
if (ptr != NULL)
free_file_line(ptr, NULL, 0);
@@ -234,7 +234,7 @@ inline void operator delete[](void *ptr) throw()
// file/line new/delete operators
-inline void *operator new(std::size_t size, const char *file, int line) throw (std::bad_alloc)
+ATTR_FORCE_INLINE inline void *operator new(std::size_t size, const char *file, int line) throw (std::bad_alloc)
{
void *result = malloc_file_line(size, file, line);
if (result == NULL)
@@ -242,7 +242,7 @@ inline void *operator new(std::size_t size, const char *file, int line) throw (s
return result;
}
-inline void *operator new[](std::size_t size, const char *file, int line) throw (std::bad_alloc)
+ATTR_FORCE_INLINE inline void *operator new[](std::size_t size, const char *file, int line) throw (std::bad_alloc)
{
void *result = malloc_file_line(size, file, line);
if (result == NULL)
@@ -250,13 +250,13 @@ inline void *operator new[](std::size_t size, const char *file, int line) throw
return result;
}
-inline void operator delete(void *ptr, const char *file, int line)
+ATTR_FORCE_INLINE inline void operator delete(void *ptr, const char *file, int line)
{
if (ptr != NULL)
free_file_line(ptr, file, line);
}
-inline void operator delete[](void *ptr, const char *file, int line)
+ATTR_FORCE_INLINE inline void operator delete[](void *ptr, const char *file, int line)
{
if (ptr != NULL)
free_file_line(ptr, file, line);
@@ -264,7 +264,7 @@ inline void operator delete[](void *ptr, const char *file, int line)
// file/line new/delete operators with zeroing
-inline void *operator new(std::size_t size, const char *file, int line, const zeromem_t &) throw (std::bad_alloc)
+ATTR_FORCE_INLINE inline void *operator new(std::size_t size, const char *file, int line, const zeromem_t &) throw (std::bad_alloc)
{
void *result = malloc_file_line(size, file, line);
if (result == NULL)
@@ -273,7 +273,7 @@ inline void *operator new(std::size_t size, const char *file, int line, const ze
return result;
}
-inline void *operator new[](std::size_t size, const char *file, int line, const zeromem_t &) throw (std::bad_alloc)
+ATTR_FORCE_INLINE inline void *operator new[](std::size_t size, const char *file, int line, const zeromem_t &) throw (std::bad_alloc)
{
void *result = malloc_file_line(size, file, line);
if (result == NULL)
@@ -282,13 +282,13 @@ inline void *operator new[](std::size_t size, const char *file, int line, const
return result;
}
-inline void operator delete(void *ptr, const char *file, int line, const zeromem_t &)
+ATTR_FORCE_INLINE inline void operator delete(void *ptr, const char *file, int line, const zeromem_t &)
{
if (ptr != NULL)
free_file_line(ptr, file, line);
}
-inline void operator delete[](void *ptr, const char *file, int line, const zeromem_t &)
+ATTR_FORCE_INLINE inline void operator delete[](void *ptr, const char *file, int line, const zeromem_t &)
{
if (ptr != NULL)
free_file_line(ptr, file, line);