blob: f6d3c7f06e5fb245ecc622d2b6e3df2271216464 [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>
caryclark@google.comcf6285b2012-06-06 12:09:01 +000012#include "GrTypes.h"
reed@google.comac10a2d2010-12-22 21:39:39 +000013
14void* GrMalloc(size_t bytes) {
15 void* ptr = ::malloc(bytes);
16 if (NULL == ptr) {
17 ::exit(-1);
18 }
19 return ptr;
20}
21
22void GrFree(void* ptr) {
23 if (ptr) {
24 ::free(ptr);
25 }
26}
27
28