blob: fa6ee2fda37d43f0f1357a8e3fea98142edf5a89 [file] [log] [blame]
epoger@google.comec3ed6a2011-07-28 14:26:00 +00001
reed@google.comac10a2d2010-12-22 21:39:39 +00002/*
epoger@google.comec3ed6a2011-07-28 14:26:00 +00003 * Copyright 2010 Google Inc.
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
reed@google.comac10a2d2010-12-22 21:39:39 +00007 */
8
9
epoger@google.comec3ed6a2011-07-28 14:26:00 +000010
reed@google.comac10a2d2010-12-22 21:39:39 +000011#include <stdlib.h>
12
13void* GrMalloc(size_t bytes) {
14 void* ptr = ::malloc(bytes);
15 if (NULL == ptr) {
16 ::exit(-1);
17 }
18 return ptr;
19}
20
21void GrFree(void* ptr) {
22 if (ptr) {
23 ::free(ptr);
24 }
25}
26
27