Skip to content

Commit

Permalink
vma_ops: Optimize out realloc when size is unchanged
Browse files Browse the repository at this point in the history
  • Loading branch information
LekKit authored Feb 23, 2024
1 parent 53b7dba commit 86d23ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vma_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ void* vma_remap(void* addr, size_t old_size, size_t new_size, uint32_t flags)
#else
if (flags & VMA_FIXED) {
ret = NULL;
} else {
} else if (new_size != old_size) {
ret = realloc(addr, new_size);
}
#endif
Expand Down

0 comments on commit 86d23ba

Please sign in to comment.