Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ShPool.hpp

00001 #ifndef SHPOOL_HPP 00002 #define SHPOOL_HPP 00003 00004 // #define SH_USE_MEMORY_POOL 00005 00006 #ifdef SH_USE_MEMORY_POOL 00007 00008 #include <cstddef> 00009 00010 namespace SH { 00011 00012 class ShPool { 00013 public: 00014 ShPool(std::size_t element_size, std::size_t block_size); 00015 00016 void* alloc(); 00017 void free(void*); 00018 00019 private: 00020 std::size_t m_element_size; 00021 std::size_t m_block_size; 00022 00023 void* m_next; 00024 }; 00025 00026 } 00027 00028 #endif // SH_USE_MEMORY_POOL 00029 00030 #endif

Generated on Mon Oct 18 14:17:40 2004 for Sh by doxygen 1.3.7