diff options
author | Fox Caminiti <fox@foxcam.net> | 2022-08-04 12:33:54 -0400 |
---|---|---|
committer | Fox Caminiti <fox@foxcam.net> | 2022-08-04 12:33:54 -0400 |
commit | bccb1d61907fea45c5e84b29499989f7cee104a5 (patch) | |
tree | 8e70ecab3bce134d2b5100cfd67f37dee2dccda3 /memory.cpp | |
parent | 8875d0226f0d38a1e5ef946e56cd15810627f5ac (diff) |
loaded bitmap wrap buffer seems stable
Diffstat (limited to 'memory.cpp')
-rw-r--r-- | memory.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -29,3 +29,24 @@ Memory_NormalizedPosition(void *StartingPointer, uint32 Amount, uint32 Size, voi Result = (real32)PointerLocationSize / (real32)TotalSize; return Result; } + +static void +Debug_Memory_Assert_Cohesion(memory *Memory, memory_table *Table) +{ +#if DEBUG + for (uint32 i = 0; i < Table->NumberOfPointers; i++) { + cached_bitmap *CurrentBitmap = &Memory->Bitmap[i]; + Assert(CurrentBitmap->Data); + for (uint32 a = 0; a < Table->NumberOfPointers; a++) { + if (a == i) { + continue; + } + cached_bitmap *OtherBitmap = &Memory->Bitmap[a]; + if (OtherBitmap->Data == CurrentBitmap->Data) { + Assert(0); + } + } + } +#else +#endif +} |