mirror of
https://github.com/ToyB-Chan/minimal-heap.git
synced 2026-07-13 21:51:16 +02:00
a
This commit is contained in:
@@ -328,9 +328,11 @@ MIHP_HeapError MIHP_Free(MIHP_Heap* heap, void* ptr)
|
|||||||
|
|
||||||
if (segment->OccupiedSize == 0)
|
if (segment->OccupiedSize == 0)
|
||||||
{
|
{
|
||||||
MIHP_HeapCorruptionInfo corruptionInfo = { 0 };
|
MIHP_HeapCorruptionInfo corruptionInfo;
|
||||||
corruptionInfo.Error = MIHP_HCE_DoubleFree;
|
corruptionInfo.Error = MIHP_HCE_DoubleFree;
|
||||||
corruptionInfo.Ptr = ptr;
|
corruptionInfo.Ptr = ptr;
|
||||||
|
corruptionInfo.ExpectedValue = 0;
|
||||||
|
corruptionInfo.ActualValue = 0;
|
||||||
|
|
||||||
if (heap->Config.OnHeapCorruptionDetectedFn != NULL)
|
if (heap->Config.OnHeapCorruptionDetectedFn != NULL)
|
||||||
heap->Config.OnHeapCorruptionDetectedFn(heap, corruptionInfo);
|
heap->Config.OnHeapCorruptionDetectedFn(heap, corruptionInfo);
|
||||||
|
|||||||
@@ -124,7 +124,7 @@
|
|||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="minimal_heap_test.cpp" />
|
<ClCompile Include="minimal_heap_test.c" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="minimal_heap.h" />
|
<ClInclude Include="minimal_heap.h" />
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
</Filter>
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="minimal_heap_test.cpp">
|
<ClCompile Include="minimal_heap_test.c">
|
||||||
<Filter>Quelldateien</Filter>
|
<Filter>Quelldateien</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user