1 2 /* 3 * 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. 7 */ 8 9 10 11 #include <stdlib.h> 12 13 void* GrMalloc(size_t bytes) { 14 void* ptr = ::malloc(bytes); 15 if (NULL == ptr) { 16 ::exit(-1); 17 } 18 return ptr; 19 } 20 21 void GrFree(void* ptr) { 22 if (ptr) { 23 ::free(ptr); 24 } 25 } 26 27 28