Changeset e03d7b in git for omalloc/omallocClass.cc


Ignore:
Timestamp:
Apr 10, 2015, 2:26:57 PM (9 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '873fc1222e995d7cb33f79d8f1792ce418c8c72c')
Children:
aeb760bbbad0ff816c36fdb5a66d5481d76a769c
Parents:
76f52597f7be2cdc6a83d6956f788e3bb342a2f9
Message:
opt: omallocClass mostly inlined
File:
1 edited

Legend:

Unmodified
Added
Removed
  • omalloc/omallocClass.cc

    r76f525 re03d7b  
    1313#include <stdlib.h>
    1414#include <omalloc/omallocClass.h>
    15 
    16 /* We define those, so that our values of
    17    OM_TRACK and OM_CHECK are used  */
    18 void* omallocClass::operator new ( size_t size )
    19 #ifndef __GNUC__
    20 throw (std::bad_alloc)
    21 #endif
    22 {
    23   void* addr;
    24   if (size==(size_t)0) size = 1;
    25   omTypeAlloc(void*, addr, size);
    26   return addr;
    27 }
    28 
    29 void  omallocClass::operator delete ( void* block )
    30 #ifndef __GNUC__
    31 throw ()
    32 #endif
    33 {
    34   omfree( block );
    35 }
    3615
    3716void*  omallocClass::operator new[] ( size_t size )
     
    7655{
    7756  void* addr;
    78   if (size==(size_t)0) size = (size_t)1;
    7957  omTypeAlloc(void*, addr, size);
    8058  return addr;
Note: See TracChangeset for help on using the changeset viewer.