#include <Windows.h>#include <Assert.h>#include "BaseType.h"Go to the source code of this file.
Typedefs | |
| typedef DDMemMgr | DDMemMgr |
| typedef DDMemMgr_Partition | DDMemMgr_Partition |
Functions | |
| DDMemMgr * | DDMemMgr_Create (uint32 Size) |
| void | DDMemMgr_Destroy (DDMemMgr *MemMgr) |
| void | DDMemMgr_Reset (DDMemMgr *MemMgr) |
| uint32 | DDMemMgr_GetFreeMem (DDMemMgr *MemMgr) |
| DDMemMgr_Partition * | DDMemMgr_PartitionCreate (DDMemMgr *MemMgr, uint32 Size) |
| void | DDMemMgr_PartitionDestroy (DDMemMgr_Partition *Partition) |
| void | DDMemMgr_PartitionReset (DDMemMgr_Partition *Partition) |
| uint32 | DDMemMgr_PartitionGetTotalMem (DDMemMgr_Partition *Partition) |
| uint32 | DDMemMgr_PartitionGetFreeMem (DDMemMgr_Partition *Partition) |
| geBoolean | DDMemMgr_PartitionAllocMem (DDMemMgr_Partition *Partition, uint32 Size) |
|
|
Definition at line 34 of file WireFrame/DDMemMgr.h. |
|
|
Definition at line 35 of file WireFrame/DDMemMgr.h. |
|
|
Definition at line 48 of file D3D7xDrv/DDMemMgr.c. References DDMemMgr::FreeMem, MemMgr, NULL, and DDMemMgr::TotalMem. Referenced by THandle_Startup().
|
|
|
Definition at line 68 of file D3D7xDrv/DDMemMgr.c. References MemMgr. Referenced by FreeAllCaches().
00069 {
00070 assert(MemMgr);
00071
00072 free(MemMgr);
00073 }
|
|
|
Definition at line 93 of file D3D7xDrv/DDMemMgr.c. References DDMemMgr::FreeMem, MemMgr, and uint32. Referenced by THandle_Startup().
|
|
||||||||||||
|
Definition at line 183 of file D3D7xDrv/DDMemMgr.c. References DDMemMgr_Partition::Active, DDMemMgr_Partition::FreeMem, GE_FALSE, GE_TRUE, geBoolean, and Partition. Referenced by D3DCache_AdjustSlots().
|
|
||||||||||||
|
Definition at line 102 of file D3D7xDrv/DDMemMgr.c. References DDMemMgr_Partition::Active, DDMEMMGR_MAX_PARTITIONS, DDMemMgr_Partition::FreeMem, DDMemMgr::FreeMem, GE_TRUE, int32, MemMgr, NULL, DDMemMgr::Partitions, and DDMemMgr_Partition::TotalMem. Referenced by THandle_Startup().
00103 {
00104 int32 i;
00105 DDMemMgr_Partition *pPartition;
00106
00107 assert(MemMgr);
00108
00109 if (Size > MemMgr->FreeMem)
00110 return NULL;
00111
00112 pPartition = MemMgr->Partitions;
00113
00114 for (i=0; i< DDMEMMGR_MAX_PARTITIONS; i++, pPartition++)
00115 {
00116 if (!pPartition->Active)
00117 {
00118 assert(pPartition->TotalMem == 0);
00119 assert(pPartition->FreeMem == 0);
00120
00121 pPartition->TotalMem = Size;
00122 pPartition->FreeMem = Size;
00123 pPartition->Active = GE_TRUE;
00124
00125 MemMgr->FreeMem -= Size;
00126
00127 assert(MemMgr->FreeMem >= 0);
00128
00129 return pPartition;
00130 }
00131 }
00132
00133 return NULL;
00134 }
|
|
|
Definition at line 139 of file D3D7xDrv/DDMemMgr.c. References DDMemMgr_Partition::Active, and Partition. Referenced by FreeAllCaches().
00140 {
00141 assert(Partition);
00142 assert(Partition->Active);
00143
00144 memset(Partition, 0, sizeof(DDMemMgr_Partition));
00145 }
|
|
|
Definition at line 172 of file D3D7xDrv/DDMemMgr.c. References DDMemMgr_Partition::FreeMem, Partition, and uint32. Referenced by D3DCache_WriteToFile().
|
|
|
Definition at line 161 of file D3D7xDrv/DDMemMgr.c. References Partition, DDMemMgr_Partition::TotalMem, and uint32. Referenced by D3DCache_WriteToFile().
|
|
|
Definition at line 150 of file D3D7xDrv/DDMemMgr.c. References DDMemMgr_Partition::Active, DDMemMgr_Partition::FreeMem, Partition, and DDMemMgr_Partition::TotalMem. Referenced by D3DCache_AdjustSlots(), and D3DCache_FreeAllSlots().
|
|
|
Definition at line 78 of file D3D7xDrv/DDMemMgr.c. References DDMEMMGR_MAX_PARTITIONS, DDMemMgr::FreeMem, int32, MemMgr, DDMemMgr::Partitions, and DDMemMgr::TotalMem.
00079 {
00080 int32 i;
00081
00082 assert(MemMgr);
00083
00084 MemMgr->FreeMem = MemMgr->TotalMem;
00085
00086 for (i=0; i<DDMEMMGR_MAX_PARTITIONS; i++)
00087 memset(&MemMgr->Partitions[i], 0, sizeof(DDMemMgr_Partition));
00088 }
|
1.3.2