1 2 #include "Memory.h" 3 #include "Debug.h" 4 5 //#if HAVE_MALLOC_H 6 //#include <malloc.h> 7 //#endif 8 9 #include <stdlib.h> 10 11 12 using namespace nv; 13 malloc(size_t size)14void * nv::mem::malloc(size_t size) 15 { 16 return ::malloc(size); 17 } 18 malloc(size_t size,const char * file,int line)19void * nv::mem::malloc(size_t size, const char * file, int line) 20 { 21 NV_UNUSED(file); 22 NV_UNUSED(line); 23 return ::malloc(size); 24 } 25 free(const void * ptr)26void nv::mem::free(const void * ptr) 27 { 28 ::free(const_cast<void *>(ptr)); 29 } 30 realloc(void * ptr,size_t size)31void * nv::mem::realloc(void * ptr, size_t size) 32 { 33 nvDebugCheck(ptr != NULL || size != 0); // undefined realloc behavior. 34 return ::realloc(ptr, size); 35 } 36 37