mirror of
https://github.com/jmarshall23/DoomRTX.git
synced 2026-08-12 16:21:04 +02:00
205 lines
3.6 KiB
C++
205 lines
3.6 KiB
C++
/*
|
|
===========================================================================
|
|
|
|
IceTech GPL Source Code
|
|
Copyright (C) 2026 Justin Marshall
|
|
|
|
This file is part of the IceTech GPL Source Code (?IceTech Source Code?).
|
|
|
|
IceTech Source Code is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
IceTech Source Code is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with IceTech Source Code. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
In addition, the IceTech Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the IceTech Source Code. If not, please request a copy in writing from id Software at the address below.
|
|
|
|
If you have questions concerning this license or the applicable additional terms, you may contact in writing Justin Marshall, justinmarshall20@gmail.com
|
|
|
|
===========================================================================
|
|
*/
|
|
|
|
#include "precompiled.h"
|
|
#pragma hdrstop
|
|
|
|
void* lastTempMemory = NULL;
|
|
|
|
/*
|
|
==================
|
|
Mem_ClearFrameStats
|
|
==================
|
|
*/
|
|
void Mem_ClearFrameStats(void) {
|
|
|
|
}
|
|
|
|
/*
|
|
==================
|
|
Mem_GetFrameStats
|
|
==================
|
|
*/
|
|
void Mem_GetFrameStats(memoryStats_t& allocs, memoryStats_t& frees) {
|
|
|
|
}
|
|
|
|
/*
|
|
==================
|
|
Mem_GetStats
|
|
==================
|
|
*/
|
|
void Mem_GetStats(memoryStats_t& stats) {
|
|
|
|
}
|
|
|
|
/*
|
|
==================
|
|
Mem_UpdateStats
|
|
==================
|
|
*/
|
|
void Mem_UpdateStats(memoryStats_t& stats, int size) {
|
|
stats.num++;
|
|
if (size < stats.minSize) {
|
|
stats.minSize = size;
|
|
}
|
|
if (size > stats.maxSize) {
|
|
stats.maxSize = size;
|
|
}
|
|
stats.totalSize += size;
|
|
}
|
|
|
|
/*
|
|
==================
|
|
Mem_UpdateAllocStats
|
|
==================
|
|
*/
|
|
void Mem_UpdateAllocStats(int size) {
|
|
|
|
}
|
|
|
|
/*
|
|
==================
|
|
Mem_UpdateFreeStats
|
|
==================
|
|
*/
|
|
void Mem_UpdateFreeStats(int size) {
|
|
|
|
}
|
|
|
|
/*
|
|
==================
|
|
Mem_Alloc
|
|
==================
|
|
*/
|
|
void* Mem_Alloc(const int size) {
|
|
return malloc(size);
|
|
}
|
|
|
|
/*
|
|
==================
|
|
Mem_Free
|
|
==================
|
|
*/
|
|
void Mem_Free(void* ptr) {
|
|
free(ptr);
|
|
}
|
|
|
|
/*
|
|
==================
|
|
Mem_Alloc16
|
|
==================
|
|
*/
|
|
void* Mem_Alloc16(const int size) {
|
|
return _aligned_malloc(size, 16);
|
|
}
|
|
|
|
/*
|
|
==================
|
|
Mem_Free16
|
|
==================
|
|
*/
|
|
void Mem_Free16(void* ptr) {
|
|
_aligned_free(ptr);
|
|
}
|
|
|
|
/*
|
|
==================
|
|
Mem_ClearedAlloc
|
|
==================
|
|
*/
|
|
void* Mem_ClearedAlloc(const int size) {
|
|
void* mem = Mem_Alloc(size);
|
|
memset(mem, 0, size);
|
|
return mem;
|
|
}
|
|
|
|
/*
|
|
==================
|
|
Mem_ClearedAlloc
|
|
==================
|
|
*/
|
|
void Mem_AllocDefragBlock(void) {
|
|
|
|
}
|
|
|
|
/*
|
|
==================
|
|
Mem_CopyString
|
|
==================
|
|
*/
|
|
char* Mem_CopyString(const char* in) {
|
|
char* out;
|
|
|
|
out = (char*)Mem_Alloc(strlen(in) + 1);
|
|
strcpy(out, in);
|
|
return out;
|
|
}
|
|
|
|
/*
|
|
==================
|
|
Mem_Dump_f
|
|
==================
|
|
*/
|
|
void Mem_Dump_f(const idCmdArgs& args) {
|
|
}
|
|
|
|
/*
|
|
==================
|
|
Mem_DumpCompressed_f
|
|
==================
|
|
*/
|
|
void Mem_DumpCompressed_f(const idCmdArgs& args) {
|
|
}
|
|
|
|
/*
|
|
==================
|
|
Mem_Init
|
|
==================
|
|
*/
|
|
void Mem_Init(void) {
|
|
|
|
}
|
|
|
|
/*
|
|
==================
|
|
Mem_Shutdown
|
|
==================
|
|
*/
|
|
void Mem_Shutdown(void) {
|
|
|
|
}
|
|
|
|
/*
|
|
==================
|
|
Mem_EnableLeakTest
|
|
==================
|
|
*/
|
|
void Mem_EnableLeakTest(const char* name) {
|
|
}
|