Work on heap and space initialization to support image loading
Change-Id: Icab25efa4dee17e4b6c6e97e38f63f5ab8a8a005
diff --git a/src/heap.h b/src/heap.h
index 247c6ba..99f6554 100644
--- a/src/heap.h
+++ b/src/heap.h
@@ -24,7 +24,9 @@
typedef void (RootVistor)(Object* root, void* arg);
- static bool Init(size_t starting_size, size_t maximum_size);
+ // Create a heap with the requested sizes. optional boot image may
+ // be NULL, otherwise it is an image filename created by ImageWriter.
+ static bool Init(size_t starting_size, size_t maximum_size, const char* boot_image_file_name);
static void Destroy();
@@ -53,10 +55,6 @@
return mark_bitmap_;
}
- static size_t GetMaximumSize() {
- return maximum_size_;
- }
-
private:
// Allocates uninitialized storage.
static Object* Allocate(size_t num_bytes);
@@ -73,13 +71,13 @@
static std::vector<Space*> spaces_;
+ // default Space for allocations
+ static Space* alloc_space_;
+
static HeapBitmap* mark_bitmap_;
static HeapBitmap* live_bitmap_;
- // The startup size of the heap in bytes.
- static size_t startup_size_;
-
// The maximum size of the heap in bytes.
static size_t maximum_size_;