blob: 340e51c2b799e60471a766ed843d97bbad1c0967 [file] [log] [blame]
Carl Shapiro1fb86202011-06-27 17:43:13 -07001// 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
10namespace art {
11
12class Heap {
13 public:
14 static Class* AllocClass(size_t size) {
15 byte* raw = new byte[size];
Carl Shapiro0e5d75d2011-07-06 18:28:37 -070016 memset(raw, 0, size);
Carl Shapiro1fb86202011-06-27 17:43:13 -070017 return reinterpret_cast<Class*>(raw);
18 }
19};
20
21} // namespace art
22
23#endif // ART_SRC_HEAP_H_