1.1 --- a/memory.cc Sat Mar 20 16:53:21 2021 +0100
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,31 +0,0 @@
1.4 -#include "memory.h"
1.5 -
1.6 -#include <stdlib.h>
1.7 -
1.8 -
1.9 -/* Initialise the memory pool with an optional 'limit' in pages. */
1.10 -
1.11 -Memory::Memory(offset_t region_size)
1.12 -: _region_size(region_size)
1.13 -{
1.14 -}
1.15 -
1.16 -/* Allocate a block of the given 'size'. */
1.17 -
1.18 -Region *Memory::allocate(offset_t size)
1.19 -{
1.20 - /* Attempt to allocate aligned memory. */
1.21 -
1.22 - void *current;
1.23 -
1.24 - /* Make the size appropriate for the invocation. */
1.25 -
1.26 - size = round_multiple(size, PAGE_SIZE);
1.27 -
1.28 - if (posix_memalign(¤t, size, size))
1.29 - return NULL;
1.30 -
1.31 - return new Region((offset_t) current, (offset_t) current + size);
1.32 -}
1.33 -
1.34 -// vim: tabstop=4 expandtab shiftwidth=4