mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-26 05:51:30 +00:00
parent
13d57cdbd6
commit
34129e8484
2 changed files with 9 additions and 6 deletions
|
@ -77,6 +77,14 @@ void *M_Realloc(void *memblock, size_t size)
|
||||||
GC::ReportRealloc(oldsize, _msize(block));
|
GC::ReportRealloc(oldsize, _msize(block));
|
||||||
return block;
|
return block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void* M_Calloc(size_t v1, size_t v2)
|
||||||
|
{
|
||||||
|
auto p = M_Malloc(v1 * v2);
|
||||||
|
memset(p, 0, v1 * v2);
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
void *M_Malloc(size_t size)
|
void *M_Malloc(size_t size)
|
||||||
{
|
{
|
||||||
|
|
|
@ -72,12 +72,7 @@ inline void* M_Calloc_Dbg(size_t v1, size_t v2, const char* file, int lineno)
|
||||||
#else
|
#else
|
||||||
void *M_Malloc (size_t size);
|
void *M_Malloc (size_t size);
|
||||||
void *M_Realloc (void *memblock, size_t size);
|
void *M_Realloc (void *memblock, size_t size);
|
||||||
inline void* M_Calloc(size_t v1, size_t v2)
|
void* M_Calloc(size_t v1, size_t v2);
|
||||||
{
|
|
||||||
auto p = M_Malloc(v1 * v2);
|
|
||||||
memset(p, 0, v1 * v2);
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue