mirror of
https://github.com/tribes2/engine.git
synced 2026-03-26 23:59:18 +00:00
t2 engine svn checkout
This commit is contained in:
commit
ff569bd2ae
988 changed files with 394180 additions and 0 deletions
60
platformMacCarb/macCarbMemory.cc
Normal file
60
platformMacCarb/macCarbMemory.cc
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// V12 Engine
|
||||
//
|
||||
// Copyright (c) 2001 GarageGames.Com
|
||||
// Portions Copyright (c) 2001 by Sierra Online, Inc.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "PlatformMacCarb/platformMacCarb.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
//--------------------------------------
|
||||
#ifdef new
|
||||
#undef new
|
||||
#endif
|
||||
|
||||
void* FN_CDECL operator new(dsize_t dt, void* ptr)
|
||||
{
|
||||
dMemset(ptr, 0xFF, dt);
|
||||
return (ptr);
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------
|
||||
void* dRealMalloc(dsize_t in_size)
|
||||
{
|
||||
return malloc(in_size);
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------
|
||||
void dRealFree(void* in_pFree)
|
||||
{
|
||||
free(in_pFree);
|
||||
}
|
||||
|
||||
|
||||
void* dMemcpy(void *dst, const void *src, unsigned size)
|
||||
{
|
||||
return memcpy(dst,src,size);
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------
|
||||
void* dMemmove(void *dst, const void *src, unsigned size)
|
||||
{
|
||||
return memmove(dst,src,size);
|
||||
}
|
||||
|
||||
//--------------------------------------
|
||||
void* dMemset(void *dst, S32 c, unsigned size)
|
||||
{
|
||||
return memset(dst,c,size);
|
||||
}
|
||||
|
||||
//--------------------------------------
|
||||
S32 dMemcmp(const void *ptr1, const void *ptr2, unsigned len)
|
||||
{
|
||||
return(memcmp(ptr1, ptr2, len));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue