You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
527 B
C++
35 lines
527 B
C++
|
|
#include "Memory.h"
|
|
#include "Debug.h"
|
|
|
|
//#if HAVE_MALLOC_H
|
|
//#include <malloc.h>
|
|
//#endif
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
using namespace nv;
|
|
|
|
void * nv::mem::malloc(size_t size)
|
|
{
|
|
return ::malloc(size);
|
|
}
|
|
|
|
void * nv::mem::malloc(size_t size, const char * file, int line)
|
|
{
|
|
return ::malloc(size);
|
|
}
|
|
|
|
void nv::mem::free(const void * ptr)
|
|
{
|
|
::free(const_cast<void *>(ptr));
|
|
}
|
|
|
|
void * nv::mem::realloc(void * ptr, size_t size)
|
|
{
|
|
nvDebugCheck(ptr != NULL || size != 0); // undefined realloc behavior.
|
|
return ::realloc(ptr, size);
|
|
}
|
|
|