14#include "common/lang/atomic.h"
15#include "common/lang/vector.h"
35 char *alloc(
size_t bytes);
37 size_t memory_usage()
const {
return memory_usage_; }
41 vector<char *> blocks_;
47inline char *ObArena::alloc(
size_t bytes)
52 char *result =
new char[bytes];
53 blocks_.push_back(result);
54 memory_usage_ += bytes +
sizeof(
char *);
a simple memory allocator.
Definition: ob_arena.h:26