![]() |
DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
|
|
#include <stddef.h>
#include <stdalign.h>
#include "qtypes.h"
#include "qdefs.h"
#include "com_list.h"
Go to the source code of this file.
Data Structures | |
struct | memexpandablearray_array_t |
struct | memexpandablearray_t |
struct | memheader_t |
struct | mempool_t |
Macros | |
#define | Mem_Alloc(pool, size) |
#define | Mem_AllocPool(name, flags, parent) |
#define | Mem_AllocType(pool, type, size) |
#define | Mem_CheckSentinels(data) |
#define | Mem_CheckSentinelsGlobal() |
#define | Mem_EmptyPool(pool) |
#define | Mem_Free(mem) |
#define | Mem_FreePool(pool) |
#define | Mem_Realloc(pool, data, size) |
#define | Mem_ReallocType(pool, data, type, size) |
#define | Mem_strdup(pool, s) |
#define | MEMPARANOIA 0 |
#define | POOLFLAG_TEMP 1 |
#define | POOLNAMESIZE 128 |
#define | Z_Free(data) |
#define | Z_Malloc(size) |
#define | Z_Realloc(data, size) |
#define | Z_strdup(s) |
Variables | |
struct cvar_s | developer_memory |
struct cvar_s | developer_memorydebug |
struct cvar_s | developer_memoryreportlargerthanmb |
qbool | mem_bigendian |
mempool_t * | tempmempool |
mempool_t * | zonemempool |
#define Mem_Alloc | ( | pool, | |
size ) |
Definition at line 92 of file zone.h.
Referenced by animatemodel(), AssertBufsize(), BufStr_Expand(), BufStr_Set(), Cbuf_NodeGet(), CheckPendingDownloads(), CL_Beams_SetupBuiltinTexture(), CL_ClearState(), CL_DownloadBegin_f(), CL_ExpandCSQCRenderEntities(), CL_ExpandEntities(), CL_Init(), CL_IPLog_Add(), CL_Locs_AddNode(), CL_ParseServerInfo(), CL_StopDownload(), Cmd_AddCommand(), Cmd_AddInterpreter(), Cmd_CompleteAliasBuildList(), Cmd_CompleteBuildList(), Cmd_Init(), Collision_Cache_Reset(), Collision_NewBrushFromPlanes(), COM_InsertFlags(), Con_ConDump_f(), Con_Init(), ConBuffer_Init(), Crypto_d0_malloc(), Cvar_CompleteBuildList(), EntityFrame4_AddCommitEntity(), EntityFrame4_AllocDatabase(), EntityFrame4_GetReferenceEntity(), EntityFrame5_AllocDatabase(), EntityFrame5_ExpandEdicts(), EntityFrame_AllocDatabase(), EntityFrameQW_AllocDatabase(), EntityState5_ReadUpdate(), fixtransparentpixels(), Font_Alloc(), Font_Attach(), Font_LoadMap(), Font_LoadSize(), Font_Postprocess_Update(), fractalnoise(), FS_AddGameDirectory(), FS_AddPack_Fullpath(), FS_AddSelfPack(), FS_Deflate(), FS_FileFromData(), FS_Inflate(), FS_ListGameDirs(), FS_LoadAndCloseQFile(), FS_LoadPackPAK(), FS_LoadPackPK3FromFD(), FS_LoadPackVirtual(), FS_OpenPackedFile(), FS_Search(), FS_Seek(), FS_SysOpen(), FS_VPrintf(), GL_Draw_Init(), GrowBuf(), hmac(), Image_Compress(), Image_GenerateDitherPattern(), Image_GenerateNoTexture(), Image_GenerateWhite(), Image_GetEmbeddedPicBGRA(), Image_Resample32Lerp(), Image_WriteTGABGRA(), incmap_post_process(), JPEG_LoadImage_BGRA(), JPEG_SaveImage_to_Buffer(), LoadConChars_BGRA(), LoadLMP_BGRA(), LoadPCX_BGRA(), LoadSubtitles(), LoadTGA_BGRA(), LoadWAL_BGRA(), Log_ConPrint(), M_Setup_Draw(), Mem_ExpandableArray_AllocRecord(), Mod_Alias_CalculateBoundingBox(), Mod_Alias_MorphMesh_CompileFrames(), Mod_AllocLightmap_Init(), Mod_AllocSurfMesh(), Mod_BSP_FinalizePortals(), Mod_BSP_LoadSubmodels(), Mod_BSP_MakePortals(), Mod_BuildBaseBonePoses(), Mod_BuildVBOs(), Mod_BuildVertexRemapTableFromElements(), Mod_CreateShaderPass(), Mod_CreateShaderPassFromQ3ShaderLayer(), Mod_DARKPLACESMODEL_Load(), Mod_FrameGroupify(), Mod_GenerateLightmaps_CreateLightmaps(), Mod_GenerateLightmaps_CreateLights(), Mod_GenerateLightmaps_CreateLights_ComputeSVBSP(), Mod_GenerateLightmaps_CreateTriangleInformation(), Mod_GenerateLightmaps_UnweldTriangles(), Mod_IDP0_Load(), Mod_IDP2_Load(), Mod_IDP3_Load(), Mod_IDS2_Load(), Mod_INTERQUAKEMODEL_Load(), Mod_LoadQ3Shaders(), Mod_LoadSkinFiles(), Mod_MakeCollisionBIH(), Mod_MakeSortedSurfaces(), Mod_MDLMD2MD3_TraceBox(), Mod_MDLMD2MD3_TraceLine(), Mod_OBJ_Load(), Mod_PSKMODEL_Load(), Mod_Q1BSP_Load(), Mod_Q1BSP_LoadClipnodes(), Mod_Q1BSP_LoadEdges(), Mod_Q1BSP_LoadEntities(), Mod_Q1BSP_LoadFaces(), Mod_Q1BSP_LoadLeaffaces(), Mod_Q1BSP_LoadLeafs(), Mod_Q1BSP_LoadLighting(), Mod_Q1BSP_LoadMapBrushes(), Mod_Q1BSP_LoadNodes(), Mod_Q1BSP_LoadPlanes(), Mod_Q1BSP_LoadSplitSky(), Mod_Q1BSP_LoadSurfedges(), Mod_Q1BSP_LoadTexinfo(), Mod_Q1BSP_LoadTextures(), Mod_Q1BSP_LoadVertexes(), Mod_Q1BSP_LoadVisibility(), Mod_Q1BSP_MakeHull0(), Mod_Q2BSP_Load(), Mod_Q2BSP_LoadBrushes(), Mod_Q2BSP_LoadBrushSides(), Mod_Q2BSP_LoadLeafBrushes(), Mod_Q2BSP_LoadLeafs(), Mod_Q2BSP_LoadLighting(), Mod_Q2BSP_LoadNodes(), Mod_Q2BSP_LoadTexinfo(), Mod_Q2BSP_LoadVisibility(), Mod_Q3BSP_Load(), Mod_Q3BSP_LoadBrushes(), Mod_Q3BSP_LoadBrushSides(), Mod_Q3BSP_LoadBrushSides_IG(), Mod_Q3BSP_LoadEffects(), Mod_Q3BSP_LoadEntities(), Mod_Q3BSP_LoadFaces(), Mod_Q3BSP_LoadLeafBrushes(), Mod_Q3BSP_LoadLeafFaces(), Mod_Q3BSP_LoadLeafs(), Mod_Q3BSP_LoadLightGrid(), Mod_Q3BSP_LoadLightmaps(), Mod_Q3BSP_LoadModels(), Mod_Q3BSP_LoadNodes(), Mod_Q3BSP_LoadPlanes(), Mod_Q3BSP_LoadPVS(), Mod_Q3BSP_LoadTextures(), Mod_Q3BSP_LoadTriangles(), Mod_Q3BSP_LoadVertices(), Mod_ShadowMesh_Alloc(), Mod_ShadowMesh_Finish(), Mod_Sprite_SharedSetup(), Mod_VBSP_LoadEdges(), Mod_VBSP_LoadEntities(), Mod_VBSP_LoadFaces(), Mod_VBSP_LoadPlanes(), Mod_VBSP_LoadSurfedges(), Mod_VBSP_LoadTexinfo(), Mod_VBSP_LoadVertexes(), Mod_ZYMOTICMODEL_Load(), MR_Init(), MVM_init_cmd(), NetConn_Open(), Nicks_CompleteBuildList(), OGG_GetSamplesFloat(), OGG_LoadVorbisFile(), OpenVideo(), PK3_BuildFileList(), PK3_GetEndOfCentralDir(), PNG_LoadImage_BGRA(), PRVM_Fields_f(), PRVM_LoadLNO(), PRVM_MEM_Alloc(), PRVM_PO_Load(), PRVM_Prog_Load(), PRVM_SetTempString(), QW_CL_ParseDownload(), QW_CL_StartUpload(), R_AllocTexturePool(), R_BufferData_Resize(), R_BuildFogHeightTexture(), R_BuildLightMap(), R_BuildNormalizationCube(), R_DecalSystem_SpawnTriangle(), R_DrawModelSurfaces(), R_DrawParticles(), R_Envmap_f(), R_FrameData_Resize(), R_GetCubemap(), R_GetCurrentTexture(), R_InitBloodTextures(), R_InitParticleTexture(), R_LoadCubemap(), R_LoadSkyBox(), R_LoadTextureDDSFile(), R_Main_ResizeViewCache(), R_MakeResizeBufferBigger(), R_MeshQueue_AddTransparent(), R_MeshQueue_RenderTransparent(), R_RTLight_Compile(), R_SaveTextureDDSFile(), R_SetupTexture(), R_ShaderStrCat(), R_Shadow_BounceGrid_ConvertPixelsAndUpload(), R_Shadow_EnlargeLeafSurfaceTrisBuffer(), R_Shadow_MakeTextures(), R_Shadow_PrepareShadowMark(), R_Shadow_PrepareShadowSides(), R_Shadow_ResizeShadowArrays(), R_Shadow_SaveWorldLights(), R_Shadow_UpdateBounceGridTexture(), R_SkinFrame_GenerateTexturesFromQPixels(), R_SkinFrame_LoadExternal_SkinFrame(), R_SkinFrame_LoadInternalBGRA(), R_SkinFrame_LoadInternalQuake(), R_TimeReport_EndFrame(), S_FindName(), S_LoadWavFile(), SCR_CaptureVideo_Avi_BeginVideo(), SCR_CaptureVideo_Ogg_BeginVideo(), SCR_DrawScreen(), SCR_ScreenShot_f(), SHOWLMP_decodeshow(), Snd_CreateRingBuffer(), SV_Map_f(), SV_ReadClientMessage(), SV_ServerOptions(), VM_buf_copy(), VM_buf_cvarlist(), VM_buf_loadfile(), VM_bufstr_add(), VM_CL_ReadPicture(), VM_CL_skel_create(), VM_InitParticleSpawner(), VM_SV_skel_create(), VM_UpdateEdictSkeleton(), W_ConvertWAD3TextureBGRA(), W_GetTextureBGRA(), W_LoadTextureWadFile(), WakeVideo(), XMP_GetSamplesFloat(), and XMP_LoadModFile().
Definition at line 104 of file zone.h.
Referenced by CL_Init(), CL_VM_Init(), Cmd_AddInterpreter(), Cmd_Init(), Collision_Init(), Crypto_Init(), font_start(), FS_Init(), GL_Draw_Init(), GL_Main_Init(), Memory_Init(), Mod_Init(), Mod_LoadModel(), Mod_LoadQ3Shaders(), Mod_Mesh_Create(), MP_Init(), NetConn_Init(), r_textures_start(), S_Init(), SV_Init(), SV_VM_Setup(), and VM_InitParticleSpawner().
Definition at line 93 of file zone.h.
Referenced by Mod_BSP_FatPVS(), Mod_DARKPLACESMODEL_Load(), Mod_IDP3_Load(), Mod_INTERQUAKEMODEL_Load(), Mod_PSKMODEL_Load(), Mod_Q1BSP_Load(), Mod_Q2BSP_Load(), and Mod_ZYMOTICMODEL_Load().
#define Mem_CheckSentinels | ( | data | ) |
#define Mem_CheckSentinelsGlobal | ( | ) |
Definition at line 102 of file zone.h.
Referenced by CL_BeginDownloads(), CL_ParseServerInfo(), CL_SetupWorldModel(), Host_Frame(), Mem_PrintList(), Mem_PrintStats(), MemStats_f(), and QW_CL_RequestNextDownload().
#define Mem_EmptyPool | ( | pool | ) |
Definition at line 106 of file zone.h.
Referenced by CL_ClearState().
#define Mem_Free | ( | mem | ) |
Definition at line 96 of file zone.h.
Referenced by animatemodel(), animatemodel_reset(), AssertBufsize(), BufStr_Del(), BufStr_Expand(), BufStr_Set(), BufStr_Shrink(), CL_Beams_SetupBuiltinTexture(), CL_ExpandCSQCRenderEntities(), CL_ExpandEntities(), CL_IPLog_Add(), CL_Locs_FreeNode(), CL_Particles_LoadEffectInfo(), CL_PasteDemo(), CL_ReadPointFile_f(), CL_StopDownload(), CL_VM_Init(), Cmd_Exec(), Collision_Cache_Reset(), Con_CompleteCommandLine(), Con_ConDump_f(), ConBuffer_Shutdown(), Crypto_d0_free(), decode_image(), EntityFrame4_AddCommitEntity(), EntityFrame4_FreeDatabase(), EntityFrame4_GetReferenceEntity(), EntityFrame5_ExpandEdicts(), EntityFrame5_FreeDatabase(), EntityFrame_FreeDatabase(), EntityFrameQW_FreeDatabase(), Font_Attach(), Font_LoadFont(), Font_LoadMap(), Font_Postprocess_Update(), Font_UnloadFont(), fontfilecache_Free(), fontfilecache_FreeAll(), fractalnoise(), FS_ClearSearchPath(), FS_Close(), FS_CRCFile(), FS_Deflate(), FS_Inflate(), FS_Init_SelfPack(), FS_ListGameDirs(), FS_LoadPackPAK(), FS_LoadPackPK3FromFD(), FS_OpenPackedFile(), FS_Search(), FS_Seek(), FS_SysOpen(), FS_UnloadPacks_dlcache(), FS_VPrintf(), gl_backend_shutdown(), gl_main_newmap(), gl_main_shutdown(), GrowBuf(), hmac(), Image_Compress(), Image_FixTransparentPixels_f(), Image_GetStockPicSize(), Image_Resample32Lerp(), Image_WriteTGABGRA(), incmap_post_process(), JPEG_LoadImage_BGRA(), JPEG_SaveImage_to_Buffer(), listdirectory(), LoadFont(), loadimagepixelsbgra(), loadtextureimage(), Log_ConPrint(), Log_Start(), M_Setup_Draw(), Mem_ExpandableArray_AllocRecord(), Mem_ExpandableArray_FreeArray(), Mod_Alias_CalculateBoundingBox(), Mod_AllocLightmap_Free(), Mod_BSP_FatPVS(), Mod_BSP_MakePortals(), Mod_BuildBaseBonePoses(), Mod_BuildVBOs(), Mod_BuildVertexRemapTableFromElements(), Mod_FreeSkinFiles(), Mod_GenerateLightmaps_CreateLightmaps(), Mod_GenerateLightmaps_CreateLights_ComputeSVBSP(), Mod_GenerateLightmaps_DestroyLightmaps(), Mod_GenerateLightmaps_DestroyLights(), Mod_GenerateLightmaps_DestroyTriangleInformation(), Mod_IDP0_Load(), Mod_IDP2_Load(), Mod_INTERQUAKEMODEL_Load(), Mod_LoadModel(), Mod_LoadQ3Shaders(), Mod_LoadSkinFiles(), Mod_MakeCollisionBIH(), Mod_MakeSortedSurfaces(), Mod_MDLMD2MD3_TraceBox(), Mod_MDLMD2MD3_TraceLine(), Mod_OBJ_Load(), Mod_PSKMODEL_Load(), Mod_Q1BSP_Load(), Mod_Q1BSP_LoadLighting(), Mod_Q1BSP_LoadSplitSky(), Mod_Q1BSP_LoadTextures(), Mod_Q2BSP_Load(), Mod_Q2BSP_LoadBrushes(), Mod_Q2BSP_LoadTexinfo(), Mod_Q3BSP_LoadBrushes(), Mod_Q3BSP_LoadFaces(), Mod_Q3BSP_LoadLightGrid(), Mod_Q3BSP_LoadLightmaps(), Mod_ShadowMesh_Finish(), Mod_ShadowMesh_Free(), Mod_Skeletal_AnimateVertices_AllocBuffers(), Mod_Skeletal_FreeBuffers(), Mod_Sprite_SharedSetup(), Mod_UnloadCustomMaterial(), Mod_ZYMOTICMODEL_Load(), NetConn_Close(), OGG_FreeSfx(), OGG_GetSamplesFloat(), OGG_LoadVorbisFile(), OGG_StopChannel(), Palette_Load(), Palette_LoadQ2Colormap(), Palette_SetupSpecialPalettes(), PK3_BuildFileList(), PK3_GetEndOfCentralDir(), PNG_LoadImage_BGRA(), PRVM_ED_ClearEdict(), PRVM_ED_Free(), PRVM_Fields_f(), PRVM_GarbageCollection(), PRVM_LoadLNO(), PRVM_PO_Destroy(), PRVM_PO_Load(), PRVM_Prog_Load(), PRVM_Prog_Reset(), PRVM_SetTempString(), QW_CL_ParseDownload(), QW_CL_RequestNextDownload(), QW_CL_StopUpload_f(), R_BufferData_NewFrame(), R_BufferData_Reset(), R_BuildFogHeightTexture(), R_BuildLightMap(), R_BuildNormalizationCube(), R_DecalSystem_Reset(), R_DecalSystem_SpawnTriangle(), R_DrawModelSurfaces(), R_DrawParticles(), R_Envmap_f(), R_FrameData_NewFrame(), R_FrameData_Reset(), R_FreeTexture(), R_FreeTexturePool(), R_GetCurrentTexture(), R_GLSL_CompilePermutation(), R_InitBloodTextures(), R_InitParticleTexture(), R_LoadCubemap(), R_LoadQWSkin(), R_LoadSkyBox(), R_LoadTextureDDSFile(), R_Main_FreeViewCache(), R_Main_ResizeViewCache(), R_MakeResizeBufferBigger(), R_MeshQueue_AddTransparent(), R_MeshQueue_RenderTransparent(), R_RTLight_Uncompile(), R_SaveTextureDDSFile(), R_SetupTexture(), R_Shadow_BounceGrid_FreeHighPixels(), R_Shadow_EnlargeLeafSurfaceTrisBuffer(), R_Shadow_LoadLightsFile(), R_Shadow_LoadWorldLights(), R_Shadow_LoadWorldLightsFromMap_LightArghliteTyrlite(), R_Shadow_MakeTextures(), R_Shadow_PrepareShadowMark(), R_Shadow_PrepareShadowSides(), R_Shadow_ResizeShadowArrays(), R_Shadow_SaveWorldLights(), r_shadow_shutdown(), R_SkinFrame_GenerateTexturesFromQPixels(), R_SkinFrame_LoadExternal_SkinFrame(), R_SkinFrame_LoadInternalBGRA(), R_Textures_Frame(), R_TimeReport_EndFrame(), S_FreeSfx(), S_LoadWavFile(), S_Shutdown(), S_Update(), SCR_CaptureVideo_Avi_EndVideo(), SCR_CaptureVideo_Ogg_EndVideo(), SCR_DrawScreen(), SCR_ScreenShot_f(), SHOWLMP_decodeshow(), SndSys_Shutdown(), SV_Loadgame_f(), SV_Map_f(), SV_ParticleEffectIndex(), SV_Prepare_CSQC(), SV_ReadClientMessage(), SV_SpawnServer(), UnlinkVideoTexture(), UnloadMapChain(), VM_buf_copy(), VM_buf_cvarlist(), VM_bufstr_free(), VM_CL_ReadPicture(), VM_CL_skel_delete(), VM_loadfromfile(), VM_RemoveEdictSkeleton(), VM_SV_skel_delete(), VM_UpdateEdictSkeleton(), W_GetLumpName(), W_GetTextureBGRA(), W_LoadTextureWadFile(), W_UnloadAll(), WAV_FreeSfx(), XMP_FreeSfx(), XMP_GetSamplesFloat(), XMP_LoadModFile(), and XMP_StopChannel().
#define Mem_FreePool | ( | pool | ) |
Definition at line 105 of file zone.h.
Referenced by CL_Shutdown(), Cmd_Shutdown(), Crypto_Shutdown(), Font_CloseLibrary(), FS_Shutdown(), Mod_FreeQ3Shaders(), Mod_UnloadModel(), PRVM_Prog_Reset(), r_textures_shutdown(), S_Terminate(), and VM_InitParticleSpawner().
Definition at line 94 of file zone.h.
Referenced by Cbuf_LinkString(), CL_ClearTempEntities(), EntityState5_ReadUpdate(), FindFont(), Mod_BSP_RecursiveNodePortals(), Mod_MakeCollisionBIH(), Mod_Mesh_AddSurface(), Mod_Mesh_AddTriangle(), Mod_Mesh_GetTexture(), Mod_Mesh_IndexForVertex(), Mod_OBJ_Load(), Mod_Q1BSP_LoadFaces(), Mod_Q2BSP_LoadTexinfo(), Mod_ShadowMesh_Finish(), Mod_VBSP_LoadFaces(), PRVM_MEM_IncreaseEdicts(), R_Shadow_PrepareLights_AddSceneLight(), TaskQueue_Enqueue(), and VM_CL_R_PolygonVertex().
Definition at line 95 of file zone.h.
Referenced by Mod_DARKPLACESMODEL_Load(), and Mod_PSKMODEL_Load().
#define Mem_strdup | ( | pool, | |
s ) |
Definition at line 97 of file zone.h.
Referenced by Cmd_RestoreInitState(), Cmd_SaveInitState(), FS_SysOpen(), Mod_LoadQ3Shaders(), R_InitShaderModeInfo(), and ShaderModeInfo_GetShaderText().
#define POOLFLAG_TEMP 1 |
Definition at line 43 of file zone.h.
Referenced by Mem_PrintList(), Mem_PrintStats(), and Memory_Init().
#define Z_Free | ( | data | ) |
Definition at line 164 of file zone.h.
Referenced by _Thread_CreateThread(), _Thread_DestroyCond(), _Thread_DestroyMutex(), _Thread_WaitThread(), CL_CloseVideo(), CL_FinishTimeDemo(), Cmd_Alias_f(), Cmd_ClearCSQCCommands(), Cmd_RestoreInitState(), Cmd_UnAlias_f(), Crypto_ClearHostKey(), Crypto_ClearHostKeys(), Curl_ClearRequirements(), Curl_EndDownload(), Curl_FindPackURL(), Cvar_Delete(), Cvar_Get(), Cvar_LockDefaults_f(), Cvar_RegisterVariable(), Cvar_SetQuick_Internal(), dpvsimpledecode_close(), dpvsimpledecode_open(), FS_FreeSearch(), GetMapList(), hz_bitstream_read_blocks_free(), hz_bitstream_read_close(), Image_Compress(), jam_close(), jam_open(), Key_Parse_CommonKeys(), Key_SetBinding(), LHNET_CloseSocket(), LHNET_OpenSocket_Connectionless(), LHNET_Read(), LHNET_Shutdown(), LibAvW_OpenVideo(), LoadSubtitles(), Mod_DARKPLACESMODEL_Load(), Mod_Decompile_OBJ(), Mod_Decompile_SMD(), Mod_ZYMOTICMODEL_Load(), R_Shadow_DrawModelShadowMaps(), SCR_DrawCurlDownload(), SCR_InfobarHeight(), SCR_PopLoadingScreen(), stringlistappend(), stringlistfreecontents(), stringlistsort(), uri_to_string_callback(), and VM_uri_get().
#define Z_Malloc | ( | size | ) |
Definition at line 161 of file zone.h.
Referenced by _Thread_CreateBarrier(), _Thread_CreateCond(), _Thread_CreateMutex(), _Thread_CreateThread(), CL_FinishTimeDemo(), Cmd_Alias_f(), CompressedImageCache_Add(), Crypto_StoreHostKey(), Curl_Begin(), Curl_GetDownloadInfo(), Curl_RequireFile(), Cvar_Get(), Cvar_Link(), Cvar_LockDefaults_f(), Cvar_RegisterVirtual(), Cvar_SetQuick_Internal(), dpvsimpledecode_open(), FS_Search(), GetMapList(), Host_InitSession(), hz_bitstream_read_blocks_new(), hz_bitstream_read_blocks_read(), hz_bitstream_read_open(), Image_Compress(), jam_open(), Key_SetBinding(), LHNET_OpenSocket_Connectionless(), LHNET_Write(), LibAvW_OpenVideo(), Mod_DARKPLACESMODEL_Load(), Mod_Decompile_OBJ(), Mod_Decompile_SMD(), Mod_Skeletal_AnimateVertices_AllocBuffers(), Mod_ZYMOTICMODEL_Load(), R_Shadow_DrawModelShadowMaps(), SCR_PushLoadingScreen(), stringlistappend(), Sys_SDL_GetClipboardData(), and VM_uri_get().
#define Z_strdup | ( | s | ) |
Definition at line 163 of file zone.h.
Referenced by Cvar_Get(), Cvar_RegisterVariable(), Cvar_RegisterVirtual(), and Cvar_SaveInitState().
void * _Mem_Alloc | ( | mempool_t * | pool, |
void * | data, | ||
size_t | size, | ||
size_t | alignment, | ||
const char * | filename, | ||
int | fileline ) |
Definition at line 369 of file zone.c.
References _Mem_Free(), memheader_t::baseaddress, mempool_t::chain, Clump_AllocBlock(), Con_DPrintf(), developer_memory, developer_memoryreportlargerthanmb, memheader_t::fileline, memheader_t::filename, cvar_t::integer, memheader_t::list, List_Add(), mem_mutex, Mem_PrintList(), Mem_PrintStats(), MEMHEADER_SENTINEL_FOR_ADDRESS, min, mempool_t::name, NULL, olddata, memheader_t::pool, mempool_t::realsize, memheader_t::sentinel, memheader_t::size, size, Sys_Error(), Thread_LockMutex, Thread_UnlockMutex, mempool_t::totalsize, and cvar_t::value.
Referenced by _Mem_strdup().
mempool_t * _Mem_AllocPool | ( | const char * | name, |
unsigned | flags, | ||
mempool_t * | parent, | ||
const char * | filename, | ||
int | fileline ) |
Definition at line 500 of file zone.c.
References _Mem_CheckSentinelsGlobal(), mempool_t::chain, Clump_AllocBlock(), developer_memorydebug, dp_strlcpy, mempool_t::fileline, mempool_t::filename, flags, mempool_t::flags, cvar_t::integer, List_Create(), Mem_PrintList(), Mem_PrintStats(), MEMHEADER_SENTINEL_FOR_ADDRESS, mempool_t::name, name, mempool_t::next, NULL, mempool_t::parent, poolchain, mempool_t::realsize, mempool_t::sentinel1, mempool_t::sentinel2, Sys_Error(), and mempool_t::totalsize.
Definition at line 599 of file zone.c.
References data, memheader_t::fileline, memheader_t::filename, MEMHEADER_SENTINEL_FOR_ADDRESS, NULL, memheader_t::sentinel, memheader_t::size, and Sys_Error().
Referenced by _Mem_CheckSentinelsGlobal().
Definition at line 628 of file zone.c.
References _Mem_CheckSentinels(), mempool_t::chain, mempool_t::fileline, mempool_t::filename, List_For_Each_Entry, MEMHEADER_SENTINEL_FOR_ADDRESS, mempool_t::next, poolchain, mempool_t::sentinel1, mempool_t::sentinel2, and Sys_Error().
Referenced by _Mem_AllocPool(), and _Mem_FreePool().
Definition at line 567 of file zone.c.
References _Mem_EmptyPool(), _Mem_FreeBlock(), mempool_t::chain, developer_memorydebug, mempool_t::fileline, mempool_t::filename, cvar_t::integer, List_First_Entry, List_Is_Empty(), MEMHEADER_SENTINEL_FOR_ADDRESS, mempool_t::next, NULL, mempool_t::parent, poolchain, mempool_t::sentinel1, mempool_t::sentinel2, and Sys_Error().
Referenced by _Mem_EmptyPool().
Definition at line 482 of file zone.c.
References _Mem_FreeBlock(), Con_DPrintf(), data, developer_memorydebug, cvar_t::integer, Mem_IsAllocated(), NULL, and Sys_Error().
Referenced by _Mem_Alloc().
Definition at line 530 of file zone.c.
References _Mem_CheckSentinelsGlobal(), _Mem_FreeBlock(), _Mem_FreePool(), mempool_t::chain, Clump_FreeBlock(), developer_memorydebug, mempool_t::fileline, mempool_t::filename, cvar_t::integer, List_First_Entry, List_Is_Empty(), MEMHEADER_SENTINEL_FOR_ADDRESS, mempool_t::next, NULL, mempool_t::parent, poolchain, mempool_t::sentinel1, mempool_t::sentinel2, and Sys_Error().
Referenced by _Mem_FreePool().
Definition at line 865 of file zone.c.
References _Mem_Alloc(), dp_strlcpy, NULL, and strlen().
void * Mem_ExpandableArray_AllocRecord | ( | memexpandablearray_t * | l | ) |
Definition at line 695 of file zone.c.
References memexpandablearray_array_t::allocflags, memexpandablearray_t::arrays, memexpandablearray_array_t::data, i, max, memexpandablearray_t::maxarrays, Mem_Alloc, Mem_Free, memexpandablearray_t::mempool, memexpandablearray_t::numarrays, memexpandablearray_array_t::numflaggedrecords, memexpandablearray_t::numrecordsperarray, and memexpandablearray_t::recordsize.
Referenced by BufStr_FindCreateReplace(), Mod_BSP_RecursiveNodePortals(), Mod_FindName(), Mod_LoadQ3Shaders(), Q3Shader_AddToHash(), R_GLSL_FindPermutation(), R_LoadTextureDDSFile(), R_LoadTextureRenderBuffer(), R_Mesh_CreateMeshBuffer(), R_RenderTarget_Get(), R_SetupTexture(), R_Shadow_NewWorldLight(), R_SkinFrame_Find(), VM_buf_create(), and W_LoadTextureWadFile().
void Mem_ExpandableArray_FreeArray | ( | memexpandablearray_t * | l | ) |
Definition at line 683 of file zone.c.
References memexpandablearray_t::arrays, memexpandablearray_array_t::data, i, memexpandablearray_t::maxarrays, Mem_Free, and memexpandablearray_t::numarrays.
Referenced by gl_backend_shutdown(), gl_main_shutdown(), Mod_BSP_MakePortals(), r_textures_shutdown(), and W_UnloadAll().
void Mem_ExpandableArray_FreeRecord | ( | memexpandablearray_t * | l, |
void * | record ) |
Definition at line 743 of file zone.c.
References memexpandablearray_array_t::allocflags, memexpandablearray_t::arrays, memexpandablearray_array_t::data, i, memexpandablearray_t::numarrays, memexpandablearray_array_t::numflaggedrecords, memexpandablearray_t::numrecordsperarray, memexpandablearray_t::recordsize, and Sys_Error().
Referenced by BufStr_Del(), Mod_PurgeUnused(), R_FreeTexture(), R_GLSL_Restart_f(), R_Mesh_DestroyMeshBuffer(), R_RenderTarget_FreeUnused(), and R_Shadow_FreeWorldLight().
size_t Mem_ExpandableArray_IndexRange | ( | const memexpandablearray_t * | l | ) |
Definition at line 763 of file zone.c.
References memexpandablearray_array_t::allocflags, memexpandablearray_t::arrays, i, memexpandablearray_t::numarrays, memexpandablearray_array_t::numflaggedrecords, and memexpandablearray_t::numrecordsperarray.
Referenced by BufStr_FindCreateReplace(), BufStr_Flush(), gl_backend_devicelost(), GL_Mesh_ListVBOs(), Mod_BSP_FinalizePortals(), Mod_ClearUsed(), Mod_FindName(), mod_newmap(), Mod_Print_f(), Mod_PurgeUnused(), Mod_Reload(), mod_shutdown(), mod_start(), PRVM_LeakTest(), R_CompleteLightPoint(), R_GLSL_Restart_f(), R_RenderTarget_FreeUnused(), R_RenderTarget_Get(), R_Shadow_BounceGrid_AssignPhotons_Task(), R_Shadow_BounceGrid_CheckEnable(), R_Shadow_BounceGrid_UpdateSpacing(), R_Shadow_ClearWorldLights(), R_Shadow_DrawCoronas(), R_Shadow_DrawLightSprites(), R_Shadow_EditLights_DrawSelectedLightProperties(), R_Shadow_EditLights_EditAll_f(), R_Shadow_EditLights_Reload_f(), R_Shadow_GetRTLightInfo(), R_Shadow_PrepareLights(), R_Shadow_SaveWorldLights(), R_Shadow_SelectLightInView(), R_Shadow_UncompileWorldLights(), r_textures_devicelost(), r_textures_devicerestored(), SV_Loadgame_f(), SV_Savegame_to(), W_GetTextureBGRA(), and W_UnloadAll().
void Mem_ExpandableArray_NewArray | ( | memexpandablearray_t * | l, |
mempool_t * | mempool, | ||
size_t | recordsize, | ||
int | numrecordsperarray ) |
Definition at line 675 of file zone.c.
References memexpandablearray_t::mempool, memexpandablearray_t::numrecordsperarray, and memexpandablearray_t::recordsize.
Referenced by BufStr_Flush(), gl_backend_start(), gl_main_start(), Mod_BSP_MakePortals(), Mod_Init(), Mod_LoadQ3Shaders(), PRVM_Prog_Load(), R_Shadow_Init(), r_textures_start(), W_GetTextureBGRA(), and W_LoadTextureWadFile().
void * Mem_ExpandableArray_RecordAtIndex | ( | const memexpandablearray_t * | l, |
size_t | index ) |
Definition at line 780 of file zone.c.
References memexpandablearray_array_t::allocflags, memexpandablearray_t::arrays, memexpandablearray_array_t::data, i, index, NULL, memexpandablearray_t::numarrays, memexpandablearray_t::numrecordsperarray, and memexpandablearray_t::recordsize.
Referenced by BufStr_FindCreateReplace(), BufStr_Flush(), gl_backend_devicelost(), GL_Mesh_ListVBOs(), Mod_BSP_FinalizePortals(), Mod_ClearUsed(), Mod_FindName(), mod_newmap(), Mod_Print_f(), Mod_PurgeUnused(), Mod_Reload(), mod_shutdown(), mod_start(), PRVM_LeakTest(), R_BlendView(), R_CompleteLightPoint(), R_GLSL_Restart_f(), R_RenderTarget_FreeUnused(), R_RenderTarget_Get(), R_Shadow_BounceGrid_AssignPhotons_Task(), R_Shadow_BounceGrid_CheckEnable(), R_Shadow_BounceGrid_UpdateSpacing(), R_Shadow_ClearWorldLights(), R_Shadow_DrawCoronas(), R_Shadow_DrawLightSprites(), R_Shadow_EditLights_DrawSelectedLightProperties(), R_Shadow_EditLights_EditAll_f(), R_Shadow_GetRTLightInfo(), R_Shadow_PrepareLights(), R_Shadow_SaveWorldLights(), R_Shadow_SelectLightInView(), R_Shadow_UncompileWorldLights(), r_textures_devicelost(), r_textures_devicerestored(), SV_Loadgame_f(), SV_Savegame_to(), VM_buf_copy(), VM_buf_create(), VM_buf_cvarlist(), VM_buf_del(), VM_buf_getsize(), VM_buf_implode(), VM_buf_loadfile(), VM_buf_sort(), VM_buf_writefile(), VM_bufstr_add(), VM_bufstr_find(), VM_bufstr_free(), VM_bufstr_get(), VM_bufstr_set(), VM_uri_get(), W_GetTextureBGRA(), and W_UnloadAll().
Definition at line 652 of file zone.c.
References mempool_t::chain, data, List_For_Each_Entry, Mem_IsAllocated(), mempool_t::next, poolchain, and target.
Referenced by _Mem_Free(), and Mem_IsAllocated().
|
inlinestatic |
Returns the current size of an allocation.
Definition at line 122 of file zone.h.
References data.
Referenced by Mod_BSP_FatPVS(), and Mod_ShadowMesh_AddMesh().
Definition at line 882 of file zone.c.
References b, Mem_AllocPool, mem_bigendian, mem_mutex, NULL, poolchain, POOLFLAG_TEMP, sentinel_seed, tempmempool, Thread_CreateMutex, Thread_HasThreads(), and zonemempool.
Referenced by Host_Init().
Definition at line 907 of file zone.c.
References buf, CF_SHARED, Cmd_AddCommand(), COM_ParseToken_Console(), com_token, Cvar_RegisterVariable(), Cvar_SetValueQuick(), developer_memory, developer_memorydebug, developer_memoryreportlargerthanmb, f, fclose(), fgets(), fopen(), MemList_f(), MemStats_f(), min, sys_memsize_physical, sys_memsize_virtual, and cvar_t::value.
Referenced by Host_Init().
Definition at line 897 of file zone.c.
References mem_mutex, NULL, and Thread_DestroyMutex.
Referenced by Host_Shutdown().
|
extern |
Definition at line 90 of file zone.c.
Referenced by _Mem_Alloc(), _Mem_FreeBlock(), Host_Init(), and Memory_Init_Commands().
|
extern |
Definition at line 91 of file zone.c.
Referenced by _Mem_AllocPool(), _Mem_EmptyPool(), _Mem_Free(), _Mem_FreePool(), Clump_AllocBlock(), Clump_FreeBlock(), Host_Init(), and Memory_Init_Commands().
|
extern |
|
extern |
Definition at line 34 of file zone.c.
Referenced by Memory_Init(), OGG_GetSamplesFloat(), OGG_LoadVorbisFile(), and S_LoadWavFile().
|
extern |
Definition at line 794 of file zone.c.
Referenced by AssertBufsize(), CheckPendingDownloads(), CL_Beams_SetupBuiltinTexture(), CL_CutDemo(), CL_IPLog_Load(), CL_Particles_LoadEffectInfo(), CL_ReadPointFile_f(), CL_StopDownload(), CL_VM_Init(), Cmd_AddInterpreter(), Cmd_CompleteAliasBuildList(), Cmd_CompleteBuildList(), Cmd_Exec(), Cmd_Init(), Con_ConDump_f(), Con_Init(), Curl_FindPackURL(), Cvar_CompleteBuildList(), decode_image(), fixtransparentpixels(), fractalnoise(), FS_CRCFile(), FS_Deflate(), FS_Inflate(), FS_Init_SelfPack(), FS_LoadPackPAK(), FS_Search(), FS_Seek(), FS_VPrintf(), GetMapList(), gl_main_newmap(), GrowBuf(), hmac(), Image_Compress(), Image_GenerateDitherPattern(), Image_GenerateNoTexture(), Image_GenerateWhite(), Image_GetEmbeddedPicBGRA(), Image_GetStockPicSize(), Image_Resample32Lerp(), Image_WriteTGABGRA(), JPEG_LoadImage_BGRA(), JPEG_SaveImage_to_Buffer(), listdirectory(), LoadConChars_BGRA(), LoadFont(), loadimagepixelsbgra(), LoadLMP_BGRA(), LoadPCX_BGRA(), LoadTGA_BGRA(), LoadWAL_BGRA(), Log_ConPrint(), M_Setup_Draw(), Memory_Init(), Mod_BuildBaseBonePoses(), Mod_BuildVBOs(), Mod_BuildVertexRemapTableFromElements(), Mod_GenerateLightmaps_CreateLightmaps(), Mod_GenerateLightmaps_CreateLights(), Mod_GenerateLightmaps_CreateLights_ComputeSVBSP(), Mod_IDP0_Load(), Mod_IDP2_Load(), Mod_LoadModel(), Mod_LoadQ3Shaders(), Mod_LoadSkinFiles(), Mod_MDLMD2MD3_TraceBox(), Mod_MDLMD2MD3_TraceLine(), Mod_OBJ_Load(), Mod_PSKMODEL_Load(), Mod_Q1BSP_LoadLighting(), Mod_Q1BSP_LoadMapBrushes(), Mod_Q1BSP_LoadSplitSky(), Mod_Q2BSP_LoadBrushes(), Mod_Q2BSP_LoadTexinfo(), Mod_Q3BSP_LoadBrushes(), Mod_Q3BSP_LoadFaces(), Mod_Q3BSP_LoadLightmaps(), Nicks_CompleteBuildList(), Palette_Load(), Palette_LoadQ2Colormap(), Palette_SetupSpecialPalettes(), PK3_BuildFileList(), PK3_GetEndOfCentralDir(), PNG_LoadImage_BGRA(), PRVM_Fields_f(), PRVM_LoadLNO(), R_BuildNormalizationCube(), R_Envmap_f(), R_InitBloodTextures(), R_InitParticleTexture(), R_LoadCubemap(), R_LoadQWSkin(), R_LoadSkyBox(), R_LoadTextureDDSFile(), R_SaveTextureDDSFile(), R_SetupTexture(), R_Shadow_LoadLightsFile(), R_Shadow_LoadWorldLights(), R_Shadow_LoadWorldLightsFromMap_LightArghliteTyrlite(), R_Shadow_MakeTextures(), R_Shadow_SaveWorldLights(), R_SkinFrame_GenerateTexturesFromQPixels(), R_SkinFrame_LoadExternal_SkinFrame(), R_SkinFrame_LoadInternalBGRA(), SCR_CaptureVideo_Avi_BeginVideo(), SCR_CaptureVideo_Ogg_BeginVideo(), SCR_DrawScreen(), SCR_ScreenShot_f(), SV_Loadgame_f(), SV_ParticleEffectIndex(), SV_ReadClientMessage(), SV_SpawnServer(), VM_CL_ReadPicture(), VM_loadfromfile(), W_ConvertWAD3TextureBGRA(), and W_GetTextureBGRA().
|
extern |
Definition at line 796 of file zone.c.
Referenced by Cmd_RestoreInitState(), Cmd_SaveInitState(), Con_Init(), Key_History_Init(), Memory_Init(), and TaskQueue_Enqueue().