aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrMemory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrMemory.cpp')
-rw-r--r--src/gpu/GrMemory.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/gpu/GrMemory.cpp b/src/gpu/GrMemory.cpp
new file mode 100644
index 0000000000..fa6ee2fda3
--- /dev/null
+++ b/src/gpu/GrMemory.cpp
@@ -0,0 +1,27 @@
+
+/*
+ * Copyright 2010 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+
+
+#include <stdlib.h>
+
+void* GrMalloc(size_t bytes) {
+ void* ptr = ::malloc(bytes);
+ if (NULL == ptr) {
+ ::exit(-1);
+ }
+ return ptr;
+}
+
+void GrFree(void* ptr) {
+ if (ptr) {
+ ::free(ptr);
+ }
+}
+
+