diff options
Diffstat (limited to 'src/utils/storage.cc')
-rw-r--r-- | src/utils/storage.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/utils/storage.cc b/src/utils/storage.cc index a023e945..0bd9265d 100644 --- a/src/utils/storage.cc +++ b/src/utils/storage.cc @@ -146,6 +146,13 @@ namespace OpenAxiom { os_release_raw_memory(store, store->extent()); } + void* + Storage::allocate(size_t n) { + void* result = free; + free += n; + return memset(result, 0, n); + } + bool Storage::align_to(size_t alignment) { if (alignment == 0) // protect against nuts |