Carl Shapiro | 1fb8620 | 2011-06-27 17:43:13 -0700 | [diff] [blame^] | 1 | // Copyright 2011 Google Inc. All Rights Reserved. |
2 | // Author: cshapiro@google.com (Carl Shapiro) | ||||
3 | |||||
4 | #ifndef ART_SRC_HEAP_H_ | ||||
5 | #define ART_SRC_HEAP_H_ | ||||
6 | |||||
7 | #include "src/globals.h" | ||||
8 | #include "src/object.h" | ||||
9 | |||||
10 | namespace art { | ||||
11 | |||||
12 | class Heap { | ||||
13 | public: | ||||
14 | static Class* AllocClass(size_t size) { | ||||
15 | byte* raw = new byte[size]; | ||||
16 | return reinterpret_cast<Class*>(raw); | ||||
17 | } | ||||
18 | }; | ||||
19 | |||||
20 | } // namespace art | ||||
21 | |||||
22 | #endif // ART_SRC_HEAP_H_ |