Ignore:
Timestamp:
Sep 24, 2008, 2:36:26 AM (16 years ago)
Author:
イグトランス (egtra)
Message:

性能がよいというdlmallocを導入。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/ab_common/src/Environment.cpp

    r719 r751  
    3535    throw;
    3636}
     37
     38void* operator new( std::size_t n )
     39{
     40    if ( void* p = dlmalloc(n) ){
     41        return p;
     42    }
     43    else{
     44        throw std::bad_alloc();
     45    }
     46}
     47
     48void* operator new[]( std::size_t n )
     49{
     50    return ::operator new( n );
     51}
     52
     53void operator delete( void* p )
     54{
     55    dlfree( p );
     56}
     57
     58void operator delete[]( void* p )
     59{
     60    ::operator delete( p );
     61}
Note: See TracChangeset for help on using the changeset viewer.