28 #ifndef MEMORY_POOL_HPP 29 #define MEMORY_POOL_HPP 31 #include "../my_config.h" 45 #ifdef LIBDAR_SPECIAL_ALLOC 46 memory_pool() { carte.clear(); };
48 memory_pool() {
throw Efeature(
"Special allocation"); };
50 memory_pool(
const memory_pool & ref) {
throw SRC_BUG ; };
51 const memory_pool & operator = (
const memory_pool & ref) {
throw SRC_BUG; };
52 ~memory_pool() throw(Ebug);
60 void *alloc(
size_t size);
63 void release(
void *ptr);
66 void garbage_collect();
69 bool is_empty()
const {
return carte.size() == 0; };
72 std::string dump()
const;
74 #ifdef LIBDAR_DEBUG_MEMORY 77 std::string max_percent_full()
const;
91 std::map<U_I, mem_sized *> carte;
92 #ifdef LIBDAR_DEBUG_MEMORY 93 std::map<U_I, U_I> count;
defines mem_sized class that holds a variable sized set of fixed sized blocks using class mem_cluster...
contains all the excetion class thrown by libdar
libdar namespace encapsulate all libdar symbols