#include <Windows.h>#include "BaseType.h"#include "DDMemMgr.h"Go to the source code of this file.
Compounds | |
| struct | DDMemMgr |
| struct | DDMemMgr_Partition |
Defines | |
| #define | DDMEMMGR_MAX_PARTITIONS 16 |
Typedefs | |
| typedef DDMemMgr_Partition | DDMemMgr_Partition |
| typedef DDMemMgr | DDMemMgr |
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 36 of file DDMemMgr.cpp. |
|
|
|
|
|
|
|
|
Definition at line 56 of file DDMemMgr.cpp. References DDMemMgr::FreeMem, MemMgr, NULL, and DDMemMgr::TotalMem.
|
|
|
Definition at line 76 of file DDMemMgr.cpp. References MemMgr.
00077 {
00078 free(MemMgr);
00079 }
|
|
|
Definition at line 97 of file DDMemMgr.cpp. References DDMemMgr::FreeMem, MemMgr, and uint32.
|
|
||||||||||||
|
Definition at line 166 of file DDMemMgr.cpp. References DDMemMgr_Partition::FreeMem, GE_FALSE, GE_TRUE, geBoolean, and Partition.
|
|
||||||||||||
|
Definition at line 105 of file DDMemMgr.cpp. References DDMemMgr_Partition::Active, DDMEMMGR_MAX_PARTITIONS, DDMemMgr_Partition::FreeMem, DDMemMgr::FreeMem, GE_TRUE, int32, MemMgr, NULL, DDMemMgr::Partitions, and DDMemMgr_Partition::TotalMem.
00106 {
00107 int32 i;
00108 DDMemMgr_Partition *pPartition;
00109
00110 if (Size > MemMgr->FreeMem)
00111 return NULL;
00112
00113 pPartition = MemMgr->Partitions;
00114
00115 for (i=0; i< DDMEMMGR_MAX_PARTITIONS; i++, pPartition++)
00116 {
00117 if (!pPartition->Active)
00118 {
00119 pPartition->TotalMem = Size;
00120 pPartition->FreeMem = Size;
00121 pPartition->Active = GE_TRUE;
00122 MemMgr->FreeMem -= Size;
00123
00124 return pPartition;
00125 }
00126 }
00127
00128 return NULL;
00129 }
|
|
|
Definition at line 134 of file DDMemMgr.cpp. References Partition.
00135 {
00136 memset(Partition, 0, sizeof(DDMemMgr_Partition));
00137 }
|
|
|
Definition at line 158 of file DDMemMgr.cpp. References DDMemMgr_Partition::FreeMem, Partition, and uint32.
|
|
|
Definition at line 150 of file DDMemMgr.cpp. References Partition, DDMemMgr_Partition::TotalMem, and uint32.
|
|
|
Definition at line 142 of file DDMemMgr.cpp. References DDMemMgr_Partition::FreeMem, Partition, and DDMemMgr_Partition::TotalMem.
|
|
|
Definition at line 84 of file DDMemMgr.cpp. References DDMEMMGR_MAX_PARTITIONS, DDMemMgr::FreeMem, int32, MemMgr, DDMemMgr::Partitions, and DDMemMgr::TotalMem.
00085 {
00086 int32 i;
00087
00088 MemMgr->FreeMem = MemMgr->TotalMem;
00089
00090 for (i=0; i<DDMEMMGR_MAX_PARTITIONS; i++)
00091 memset(&MemMgr->Partitions[i], 0, sizeof(DDMemMgr_Partition));
00092 }
|
1.3.2