33 #ifndef SPECIAL_ALLOC_HPP 34 #define SPECIAL_ALLOC_HPP 36 #include "../my_config.h" 40 #ifdef LIBDAR_SPECIAL_ALLOC 56 #define USE_SPECIAL_ALLOC(BASE_TYPE) \ 57 void *operator new(size_t taille) { return special_alloc_new(taille); }; \ 58 void *operator new(size_t taille, const std::nothrow_t& nothrow_constant) { return special_alloc_new(taille); }; \ 59 void *operator new(size_t taille, BASE_TYPE * & place) { return (void *) place; }; \ 60 void *operator new(size_t taille, void * & place) { return place; }; \ 61 void operator delete(void *ptr) throw() { special_alloc_delete(ptr); } \ 62 void operator delete(void* ptr, const std::nothrow_t& nothrow_constant) throw() { special_alloc_delete(ptr); } 71 extern void special_alloc_init_for_thread_safe();
73 extern void *special_alloc_new(
size_t taille);
74 extern void special_alloc_delete(
void *ptr);
78 extern void special_alloc_garbage_collect(std::ostream & output);
libdar namespace encapsulate all libdar symbols