rename and fixed missing unlock

This commit is contained in:
2026-06-09 20:37:30 +02:00
parent 41b6dfa9f1
commit 847dfe1484
3 changed files with 7 additions and 4 deletions

View File

@@ -150,7 +150,10 @@ AllocateNewArea:
MIHP_HeapMemoryAreaHeader* newArea = MIHP_CreateHeapMemoryArea(heap, newAreaSize);
if (newArea == NULL)
{
MIHP_UNLOCK_HEAP(&heap->HeapLock);
return NULL;
}
newArea->NextArea = heap->FirstArea;
heap->FirstArea->PreviousArea = newArea;
@@ -164,7 +167,7 @@ AllocateNewArea:
return MIHP_Allocate(heap, size);
}
void* MIHP_Realloc(MIHP_Heap* heap, void* ptr, size_t newSize)
void* MIHP_Reallocate(MIHP_Heap* heap, void* ptr, size_t newSize)
{
if (newSize == 0)
{
@@ -203,7 +206,7 @@ void* MIHP_Realloc(MIHP_Heap* heap, void* ptr, size_t newSize)
if (segment->NextSegment && MIHP_MergeHeapSegments(segment, segment->NextSegment))
{
MIHP_UNLOCK_HEAP(&heap->HeapLock);
return MIHP_Realloc(heap, ptr, newSize);
return MIHP_Reallocate(heap, ptr, newSize);
}
MIHP_UNLOCK_HEAP(&heap->HeapLock);