diff options
Diffstat (limited to 'runtime/gc/space/malloc_space.h')
-rw-r--r-- | runtime/gc/space/malloc_space.h | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/runtime/gc/space/malloc_space.h b/runtime/gc/space/malloc_space.h index c1f4841cb6..e4a6f158ec 100644 --- a/runtime/gc/space/malloc_space.h +++ b/runtime/gc/space/malloc_space.h @@ -113,9 +113,14 @@ class MallocSpace : public ContinuousMemMapAllocSpace { void SetGrowthLimit(size_t growth_limit); - virtual MallocSpace* CreateInstance(MemMap* mem_map, const std::string& name, void* allocator, - uint8_t* begin, uint8_t* end, uint8_t* limit, - size_t growth_limit, bool can_move_objects) = 0; + virtual MallocSpace* CreateInstance(MemMap&& mem_map, + const std::string& name, + void* allocator, + uint8_t* begin, + uint8_t* end, + uint8_t* limit, + size_t growth_limit, + bool can_move_objects) = 0; // Splits ourself into a zygote space and new malloc space which has our unused memory. When true, // the low memory mode argument specifies that the heap wishes the created space to be more @@ -137,12 +142,23 @@ class MallocSpace : public ContinuousMemMapAllocSpace { } protected: - MallocSpace(const std::string& name, MemMap* mem_map, uint8_t* begin, uint8_t* end, - uint8_t* limit, size_t growth_limit, bool create_bitmaps, bool can_move_objects, - size_t starting_size, size_t initial_size); - - static MemMap* CreateMemMap(const std::string& name, size_t starting_size, size_t* initial_size, - size_t* growth_limit, size_t* capacity, uint8_t* requested_begin); + MallocSpace(const std::string& name, + MemMap&& mem_map, + uint8_t* begin, + uint8_t* end, + uint8_t* limit, + size_t growth_limit, + bool create_bitmaps, + bool can_move_objects, + size_t starting_size, + size_t initial_size); + + static MemMap CreateMemMap(const std::string& name, + size_t starting_size, + size_t* initial_size, + size_t* growth_limit, + size_t* capacity, + uint8_t* requested_begin); // When true the low memory mode argument specifies that the heap wishes the created allocator to // be more aggressive in releasing unused pages. |