Chiharu の日記

絵描き C/C++ プログラマーの日記です。

2011-03-01から1日間の記事一覧

std::allocate_shared 〜カスタム アロケータ

C++

先日の日記の続き。std::allocate_shared 用のカスタム アロケータとして、簡易的なメモリ プールを用意してみました。 namespace { template <int unit> class memory_manager { private: union trait { trait* next; unsigned char body[unit]; }; public: memory_ma</int>…