blob: 5b6b991d46ec1b4a73e4ce06c43a463a7b054659 [file] [log] [blame]
Elliott Hughes9d5ccec2011-09-19 13:19:50 -07001/*
2 * Copyright (C) 2008 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
Carl Shapiro1fb86202011-06-27 17:43:13 -070016
17#ifndef ART_SRC_HEAP_H_
18#define ART_SRC_HEAP_H_
19
Elliott Hughesc967f782012-04-16 10:23:15 -070020#include <iosfwd>
Elliott Hughesb3bd5f02012-03-08 21:05:27 -080021#include <string>
Carl Shapiro58551df2011-07-24 03:09:51 -070022#include <vector>
23
Ian Rogers5d76c432011-10-31 21:42:49 -070024#include "card_table.h"
Brian Carlstrom578bbdc2011-07-21 14:07:47 -070025#include "globals.h"
Ian Rogers30fab402012-01-23 15:43:46 -080026#include "gtest/gtest.h"
Elliott Hughes5e71b522011-10-20 13:12:32 -070027#include "heap_bitmap.h"
Brian Carlstromcd74c4b2012-01-23 13:21:00 -080028#include "mutex.h"
Ian Rogers0cfe1fb2011-08-26 03:29:44 -070029#include "offsets.h"
Carl Shapiro1fb86202011-06-27 17:43:13 -070030
Elliott Hughes3e465b12011-09-02 18:26:12 -070031#define VERIFY_OBJECT_ENABLED 0
32
Carl Shapiro1fb86202011-06-27 17:43:13 -070033namespace art {
34
Ian Rogers30fab402012-01-23 15:43:46 -080035class AllocSpace;
Brian Carlstroma40f9bc2011-07-26 21:26:07 -070036class Class;
Brian Carlstromfddf6f62012-03-15 16:56:45 -070037class ImageSpace;
Brian Carlstroma40f9bc2011-07-26 21:26:07 -070038class Object;
Carl Shapiro69759ea2011-07-21 18:13:35 -070039class Space;
Ian Rogers5d4bdc22011-11-02 22:15:43 -070040class Thread;
Carl Shapiro69759ea2011-07-21 18:13:35 -070041class HeapBitmap;
Ian Rogers30fab402012-01-23 15:43:46 -080042class SpaceTest;
Carl Shapiro69759ea2011-07-21 18:13:35 -070043
Carl Shapiro1fb86202011-06-27 17:43:13 -070044class Heap {
45 public:
Ian Rogers30fab402012-01-23 15:43:46 -080046 static const size_t kInitialSize = 2 * MB;
Carl Shapiro69759ea2011-07-21 18:13:35 -070047
Ian Rogers30fab402012-01-23 15:43:46 -080048 static const size_t kMaximumSize = 32 * MB;
Carl Shapiro69759ea2011-07-21 18:13:35 -070049
Elliott Hughes410c0c82011-09-01 17:58:25 -070050 typedef void (RootVisitor)(const Object* root, void* arg);
Elliott Hughesc33a32b2011-10-11 18:18:07 -070051 typedef bool (IsMarkedTester)(const Object* object, void* arg);
Brian Carlstrom7e93b502011-08-04 14:16:22 -070052
Brian Carlstrom58ae9412011-10-04 00:56:06 -070053 // Create a heap with the requested sizes. The possible empty
54 // image_file_names names specify Spaces to load based on
55 // ImageWriter output.
Elliott Hughesb3bd5f02012-03-08 21:05:27 -080056 explicit Heap(size_t starting_size, size_t growth_limit, size_t capacity,
57 const std::string& image_file_name);
Carl Shapiro61e019d2011-07-14 16:53:09 -070058
Elliott Hughesb3bd5f02012-03-08 21:05:27 -080059 ~Heap();
Brian Carlstroma7f4f482011-07-17 17:01:34 -070060
Brian Carlstroma40f9bc2011-07-26 21:26:07 -070061 // Allocates and initializes storage for an object instance.
Elliott Hughesb3bd5f02012-03-08 21:05:27 -080062 Object* AllocObject(Class* klass, size_t num_bytes);
Brian Carlstroma7f4f482011-07-17 17:01:34 -070063
Elliott Hughesa2501992011-08-26 19:39:54 -070064 // Check sanity of given reference. Requires the heap lock.
Elliott Hughes3e465b12011-09-02 18:26:12 -070065#if VERIFY_OBJECT_ENABLED
Elliott Hughes1bac54f2012-03-16 12:48:31 -070066 void VerifyObject(const Object* o);
Elliott Hughes3e465b12011-09-02 18:26:12 -070067#else
Elliott Hughes1bac54f2012-03-16 12:48:31 -070068 void VerifyObject(const Object*) {}
Elliott Hughes3e465b12011-09-02 18:26:12 -070069#endif
Ian Rogers408f79a2011-08-23 18:22:33 -070070
Ian Rogers0cfe1fb2011-08-26 03:29:44 -070071 // Check sanity of all live references. Requires the heap lock.
Elliott Hughesb3bd5f02012-03-08 21:05:27 -080072 void VerifyHeap();
Ian Rogers0cfe1fb2011-08-26 03:29:44 -070073
Elliott Hughes6a5bd492011-10-28 14:33:57 -070074 // A weaker test than IsLiveObject or VerifyObject that doesn't require the heap lock,
Elliott Hughesa2501992011-08-26 19:39:54 -070075 // and doesn't abort on error, allowing the caller to report more
76 // meaningful diagnostics.
Elliott Hughesb3bd5f02012-03-08 21:05:27 -080077 bool IsHeapAddress(const Object* obj);
78
Elliott Hughes6a5bd492011-10-28 14:33:57 -070079 // Returns true if 'obj' is a live heap object, false otherwise (including for invalid addresses).
80 // Requires the heap lock to be held.
Elliott Hughesb3bd5f02012-03-08 21:05:27 -080081 bool IsLiveObjectLocked(const Object* obj);
Elliott Hughesa2501992011-08-26 19:39:54 -070082
Carl Shapiro69759ea2011-07-21 18:13:35 -070083 // Initiates an explicit garbage collection.
Elliott Hughesb3bd5f02012-03-08 21:05:27 -080084 void CollectGarbage(bool clear_soft_references);
Carl Shapiro69759ea2011-07-21 18:13:35 -070085
Elliott Hughesbf86d042011-08-31 17:53:14 -070086 // Implements java.lang.Runtime.maxMemory.
Elliott Hughesb3bd5f02012-03-08 21:05:27 -080087 int64_t GetMaxMemory();
Elliott Hughesbf86d042011-08-31 17:53:14 -070088 // Implements java.lang.Runtime.totalMemory.
Elliott Hughesb3bd5f02012-03-08 21:05:27 -080089 int64_t GetTotalMemory();
Elliott Hughesbf86d042011-08-31 17:53:14 -070090 // Implements java.lang.Runtime.freeMemory.
Elliott Hughesb3bd5f02012-03-08 21:05:27 -080091 int64_t GetFreeMemory();
Elliott Hughesbf86d042011-08-31 17:53:14 -070092
Elliott Hughes9d5ccec2011-09-19 13:19:50 -070093 // Implements VMDebug.countInstancesOfClass.
Elliott Hughesb3bd5f02012-03-08 21:05:27 -080094 int64_t CountInstances(Class* c, bool count_assignable);
Elliott Hughes9d5ccec2011-09-19 13:19:50 -070095
Ian Rogers3bb17a62012-01-27 23:56:44 -080096 // Removes the growth limit on the alloc space so it may grow to its maximum capacity. Used to
97 // implement dalvik.system.VMRuntime.clearGrowthLimit.
Elliott Hughesb3bd5f02012-03-08 21:05:27 -080098 void ClearGrowthLimit();
jeffhaoc1160702011-10-27 15:48:45 -070099
Ian Rogers30fab402012-01-23 15:43:46 -0800100 // Target ideal heap utilization ratio, implements
101 // dalvik.system.VMRuntime.getTargetHeapUtilization.
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800102 float GetTargetHeapUtilization() {
Brian Carlstrom395520e2011-09-25 19:35:00 -0700103 return target_utilization_;
Elliott Hughes7ede61e2011-09-14 18:18:06 -0700104 }
Ian Rogers30fab402012-01-23 15:43:46 -0800105 // Set target ideal heap utilization ratio, implements
106 // dalvik.system.VMRuntime.setTargetHeapUtilization.
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800107 void SetTargetHeapUtilization(float target) {
Ian Rogers30fab402012-01-23 15:43:46 -0800108 DCHECK_GT(target, 0.0f); // asserted in Java code
109 DCHECK_LT(target, 1.0f);
Brian Carlstrom395520e2011-09-25 19:35:00 -0700110 target_utilization_ = target;
Elliott Hughes7ede61e2011-09-14 18:18:06 -0700111 }
Ian Rogers3bb17a62012-01-27 23:56:44 -0800112
113 // For the alloc space, sets the maximum number of bytes that the heap is allowed to allocate
114 // from the system. Doesn't allow the space to exceed its growth limit.
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800115 void SetIdealFootprint(size_t max_allowed_footprint);
Elliott Hughes7ede61e2011-09-14 18:18:06 -0700116
Carl Shapiro69759ea2011-07-21 18:13:35 -0700117 // Blocks the caller until the garbage collector becomes idle.
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800118 void WaitForConcurrentGcToComplete();
Carl Shapiro69759ea2011-07-21 18:13:35 -0700119
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800120 pid_t GetLockOwner(); // For SignalCatcher.
121 void Lock();
122 void Unlock();
123 void AssertLockHeld() {
Brian Carlstromcd74c4b2012-01-23 13:21:00 -0800124 lock_->AssertHeld();
125 }
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800126 void AssertLockNotHeld() {
Brian Carlstromcd74c4b2012-01-23 13:21:00 -0800127 lock_->AssertNotHeld();
128 }
Carl Shapiro61e019d2011-07-14 16:53:09 -0700129
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800130 const std::vector<Space*>& GetSpaces() {
Carl Shapiro58551df2011-07-24 03:09:51 -0700131 return spaces_;
132 }
Carl Shapiro61e019d2011-07-14 16:53:09 -0700133
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800134 HeapBitmap* GetLiveBits() {
Carl Shapiro58551df2011-07-24 03:09:51 -0700135 return live_bitmap_;
Carl Shapiro744ad052011-08-06 15:53:36 -0700136 }
Carl Shapiro58551df2011-07-24 03:09:51 -0700137
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800138 HeapBitmap* GetMarkBits() {
Carl Shapiro58551df2011-07-24 03:09:51 -0700139 return mark_bitmap_;
Carl Shapiro744ad052011-08-06 15:53:36 -0700140 }
Carl Shapiro58551df2011-07-24 03:09:51 -0700141
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800142 void SetReferenceOffsets(MemberOffset reference_referent_offset,
143 MemberOffset reference_queue_offset,
144 MemberOffset reference_queueNext_offset,
145 MemberOffset reference_pendingNext_offset,
146 MemberOffset finalizer_reference_zombie_offset);
Brian Carlstrom1f870082011-08-23 16:02:11 -0700147
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800148 Object* GetReferenceReferent(Object* reference);
149 void ClearReferenceReferent(Object* reference);
Brian Carlstrom1f870082011-08-23 16:02:11 -0700150
Elliott Hughesadb460d2011-10-05 17:02:34 -0700151 // Returns true if the reference object has not yet been enqueued.
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800152 bool IsEnqueuable(const Object* ref);
153 void EnqueueReference(Object* ref, Object** list);
154 void EnqueuePendingReference(Object* ref, Object** list);
155 Object* DequeuePendingReference(Object** list);
Brian Carlstrom1f870082011-08-23 16:02:11 -0700156
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800157 MemberOffset GetReferencePendingNextOffset() {
Ian Rogers0cfe1fb2011-08-26 03:29:44 -0700158 DCHECK_NE(reference_pendingNext_offset_.Uint32Value(), 0U);
Brian Carlstrom1f870082011-08-23 16:02:11 -0700159 return reference_pendingNext_offset_;
160 }
161
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800162 MemberOffset GetFinalizerReferenceZombieOffset() {
Ian Rogers0cfe1fb2011-08-26 03:29:44 -0700163 DCHECK_NE(finalizer_reference_zombie_offset_.Uint32Value(), 0U);
Brian Carlstrom1f870082011-08-23 16:02:11 -0700164 return finalizer_reference_zombie_offset_;
165 }
166
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800167 void EnableObjectValidation() {
Ian Rogers30fab402012-01-23 15:43:46 -0800168#if VERIFY_OBJECT_ENABLED
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800169 VerifyHeap();
Ian Rogers30fab402012-01-23 15:43:46 -0800170#endif
Elliott Hughes85d15452011-09-16 17:33:01 -0700171 verify_objects_ = true;
172 }
173
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800174 void DisableObjectValidation() {
Elliott Hughes85d15452011-09-16 17:33:01 -0700175 verify_objects_ = false;
Ian Rogers0cfe1fb2011-08-26 03:29:44 -0700176 }
177
Elliott Hughes92b3b562011-09-08 16:32:26 -0700178 // Callers must hold the heap lock.
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800179 void RecordFreeLocked(size_t freed_objects, size_t freed_bytes);
Brian Carlstrom693267a2011-09-06 09:25:34 -0700180
Elliott Hughes5ea047b2011-09-13 14:38:18 -0700181 // Must be called if a field of an Object in the heap changes, and before any GC safe-point.
182 // The call is not needed if NULL is stored in the field.
Elliott Hughes1bac54f2012-03-16 12:48:31 -0700183 void WriteBarrierField(const Object* dst, MemberOffset /*offset*/, const Object* /*new_value*/) {
Ian Rogers5d76c432011-10-31 21:42:49 -0700184 if (!card_marking_disabled_) {
Elliott Hughes1bac54f2012-03-16 12:48:31 -0700185 card_table_->MarkCard(dst);
Ian Rogers5d76c432011-10-31 21:42:49 -0700186 }
187 }
188
189 // Write barrier for array operations that update many field positions
Elliott Hughes1bac54f2012-03-16 12:48:31 -0700190 void WriteBarrierArray(const Object* dst, int /*start_offset*/, size_t /*length TODO: element_count or byte_count?*/) {
Ian Rogers5d76c432011-10-31 21:42:49 -0700191 if (UNLIKELY(!card_marking_disabled_)) {
Elliott Hughes1bac54f2012-03-16 12:48:31 -0700192 card_table_->MarkCard(dst);
Ian Rogers5d76c432011-10-31 21:42:49 -0700193 }
194 }
195
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800196 CardTable* GetCardTable() {
Ian Rogers5d76c432011-10-31 21:42:49 -0700197 return card_table_;
198 }
199
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800200 void DisableCardMarking() {
Ian Rogers5d76c432011-10-31 21:42:49 -0700201 // TODO: we shouldn't need to disable card marking, this is here to help the image_writer
202 card_marking_disabled_ = true;
Elliott Hughes3a4f8df2011-09-13 15:22:36 -0700203 }
Elliott Hughes5ea047b2011-09-13 14:38:18 -0700204
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800205 void AddFinalizerReference(Thread* self, Object* object);
Elliott Hughesadb460d2011-10-05 17:02:34 -0700206
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800207 size_t GetBytesAllocated() { return num_bytes_allocated_; }
208 size_t GetObjectsAllocated() { return num_objects_allocated_; }
Elliott Hughes7162ad92011-10-27 14:08:42 -0700209
Brian Carlstromfddf6f62012-03-15 16:56:45 -0700210 ImageSpace* GetImageSpace() {
211 CHECK(image_space_ != NULL);
212 return image_space_;
213 }
214
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800215 AllocSpace* GetAllocSpace() {
Brian Carlstromfddf6f62012-03-15 16:56:45 -0700216 CHECK(alloc_space_ != NULL);
Ian Rogers5d76c432011-10-31 21:42:49 -0700217 return alloc_space_;
218 }
219
Elliott Hughesc967f782012-04-16 10:23:15 -0700220 void DumpForSigQuit(std::ostream& os);
221
Carl Shapiro58551df2011-07-24 03:09:51 -0700222 private:
223 // Allocates uninitialized storage.
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800224 Object* AllocateLocked(size_t num_bytes);
225 Object* AllocateLocked(AllocSpace* space, size_t num_bytes);
Carl Shapiro58551df2011-07-24 03:09:51 -0700226
Elliott Hughesadb460d2011-10-05 17:02:34 -0700227 // Pushes a list of cleared references out to the managed heap.
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800228 void EnqueueClearedReferences(Object** cleared_references);
Elliott Hughesadb460d2011-10-05 17:02:34 -0700229
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800230 void RequestHeapTrim();
Elliott Hughes8cf5bc02012-02-02 16:32:16 -0800231
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800232 void RecordAllocationLocked(AllocSpace* space, const Object* object);
233 void RecordImageAllocations(Space* space);
Carl Shapiro69759ea2011-07-21 18:13:35 -0700234
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800235 void CollectGarbageInternal(bool clear_soft_references);
Carl Shapiro69759ea2011-07-21 18:13:35 -0700236
Ian Rogers3bb17a62012-01-27 23:56:44 -0800237 // Given the current contents of the alloc space, increase the allowed heap footprint to match
238 // the target utilization ratio. This should only be called immediately after a full garbage
239 // collection.
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800240 void GrowForUtilization();
Carl Shapiro69759ea2011-07-21 18:13:35 -0700241
Elliott Hughesc967f782012-04-16 10:23:15 -0700242 size_t GetPercentFree();
243
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800244 void AddSpace(Space* space);
Ian Rogers30fab402012-01-23 15:43:46 -0800245
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800246 void VerifyObjectLocked(const Object *obj);
Elliott Hughes92b3b562011-09-08 16:32:26 -0700247
jeffhao25045522012-03-13 19:34:37 -0700248 void VerifyHeapLocked();
249
Brian Carlstrom78128a62011-09-15 17:21:19 -0700250 static void VerificationCallback(Object* obj, void* arg);
Elliott Hughes92b3b562011-09-08 16:32:26 -0700251
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800252 Mutex* lock_;
Carl Shapiro69759ea2011-07-21 18:13:35 -0700253
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800254 std::vector<Space*> spaces_;
Carl Shapiro69759ea2011-07-21 18:13:35 -0700255
Brian Carlstromfddf6f62012-03-15 16:56:45 -0700256 ImageSpace* image_space_;
257
Brian Carlstrom4a289ed2011-08-16 17:17:49 -0700258 // default Space for allocations
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800259 AllocSpace* alloc_space_;
Brian Carlstrom4a289ed2011-08-16 17:17:49 -0700260
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800261 HeapBitmap* mark_bitmap_;
Carl Shapiro69759ea2011-07-21 18:13:35 -0700262
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800263 HeapBitmap* live_bitmap_;
Carl Shapiro69759ea2011-07-21 18:13:35 -0700264
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800265 CardTable* card_table_;
Ian Rogers5d76c432011-10-31 21:42:49 -0700266
267 // Used by the image writer to disable card marking on copied objects
268 // TODO: remove
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800269 bool card_marking_disabled_;
Ian Rogers5d76c432011-10-31 21:42:49 -0700270
Carl Shapiro58551df2011-07-24 03:09:51 -0700271 // True while the garbage collector is running.
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800272 bool is_gc_running_;
Carl Shapiro69759ea2011-07-21 18:13:35 -0700273
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800274 // Number of bytes allocated. Adjusted after each allocation and free.
275 size_t num_bytes_allocated_;
Carl Shapiro58551df2011-07-24 03:09:51 -0700276
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800277 // Number of objects allocated. Adjusted after each allocation and free.
278 size_t num_objects_allocated_;
Carl Shapiro58551df2011-07-24 03:09:51 -0700279
Brian Carlstrom1f870082011-08-23 16:02:11 -0700280 // offset of java.lang.ref.Reference.referent
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800281 MemberOffset reference_referent_offset_;
Brian Carlstrom1f870082011-08-23 16:02:11 -0700282
283 // offset of java.lang.ref.Reference.queue
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800284 MemberOffset reference_queue_offset_;
Brian Carlstrom1f870082011-08-23 16:02:11 -0700285
286 // offset of java.lang.ref.Reference.queueNext
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800287 MemberOffset reference_queueNext_offset_;
Brian Carlstrom1f870082011-08-23 16:02:11 -0700288
289 // offset of java.lang.ref.Reference.pendingNext
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800290 MemberOffset reference_pendingNext_offset_;
Brian Carlstrom1f870082011-08-23 16:02:11 -0700291
292 // offset of java.lang.ref.FinalizerReference.zombie
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800293 MemberOffset finalizer_reference_zombie_offset_;
Ian Rogers0cfe1fb2011-08-26 03:29:44 -0700294
Brian Carlstrom395520e2011-09-25 19:35:00 -0700295 // Target ideal heap utilization ratio
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800296 float target_utilization_;
Brian Carlstrom395520e2011-09-25 19:35:00 -0700297
Elliott Hughesb3bd5f02012-03-08 21:05:27 -0800298 bool verify_objects_;
Brian Carlstrom1f870082011-08-23 16:02:11 -0700299
Ian Rogers30fab402012-01-23 15:43:46 -0800300 FRIEND_TEST(SpaceTest, AllocAndFree);
Ian Rogers3bb17a62012-01-27 23:56:44 -0800301 FRIEND_TEST(SpaceTest, AllocAndFreeList);
302 friend class SpaceTest;
Ian Rogers30fab402012-01-23 15:43:46 -0800303
Carl Shapiro69759ea2011-07-21 18:13:35 -0700304 DISALLOW_IMPLICIT_CONSTRUCTORS(Heap);
305};
306
Carl Shapiro1fb86202011-06-27 17:43:13 -0700307} // namespace art
308
309#endif // ART_SRC_HEAP_H_