Skip to content

Commit

Permalink
Fix memory leak on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
michal-zurkowski committed May 17, 2021
1 parent e98b2ff commit 23d7548
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion virtual_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ void *AllocateLargePagesMemory(size_t size) {
}

void DeallocateLargePagesMemory(void **memory) {
VirtualFree(*memory, currently_allocated, MEM_RELEASE);
VirtualFree(*memory, 0, MEM_RELEASE);
*memory = NULL;
allocated_hp = false;
}
Expand Down

0 comments on commit 23d7548

Please sign in to comment.