| // Copyright 2011 Google Inc. All Rights Reserved. |
| // A space contains memory allocated for managed objects. |
| static Space* Create(size_t startup_size, size_t maximum_size); |
| Object* AllocWithGrowth(size_t num_bytes); |
| Object* AllocWithoutGrowth(size_t num_bytes); |
| size_t MaxAllowedFootprint(); |
| void Grow(size_t num_bytes); |
| size_t AllocationSize(const Object* obj); |
| // The boundary tag overhead. |
| static const size_t kChunkOverhead = kWordSize; |
| Space(size_t startup_size, size_t maximum_size) : |
| startup_size_(startup_size), |
| maximum_size_(maximum_size) { |
| // Initializes the space and underlying storage. |
| void* CreateMallocSpace(void* base, size_t startup_size, |
| static void DontNeed(void* start, void* end, void* num_bytes); |
| DISALLOW_IMPLICIT_CONSTRUCTORS(Space); |
| #endif // ART_SRC_SPACE_H_ |