Skip to content

Commit

Permalink
Fix void* add.
Browse files Browse the repository at this point in the history
  • Loading branch information
lerno committed Aug 31, 2021
1 parent 8b73e1f commit 26f508c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/vmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static inline void* mmap_allocate(Vmem *vmem, size_t to_allocate)
if (blocks_to_allocate > 0)
{
size_t to_commit = blocks_to_allocate * COMMIT_PAGE_SIZE;
void *res = VirtualAlloc(vmem->ptr + vmem->committed, to_commit, MEM_COMMIT, PAGE_READWRITE);
void *res = VirtualAlloc(((char*)vmem->ptr) + vmem->committed, to_commit, MEM_COMMIT, PAGE_READWRITE);
if (!res) FATAL_ERROR("Failed to allocate more memory.");
vmem->committed += to_commit;
}
Expand Down

0 comments on commit 26f508c

Please sign in to comment.