Skip to content

Commit

Permalink
fix alignment calculation..
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen committed Dec 25, 2024
1 parent e297703 commit f048746
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/snmalloc/pal/pal_solaris.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ namespace snmalloc
SNMALLOC_ASSERT(size >= minimum_alloc_size);
UNUSED(state_using);

uintptr_t alignment = static_cast<uintptr_t>(
(bits::next_pow2_bits(size) + page_size - 1) & ~(page_size - 1));
uintptr_t alignment =
static_cast<uintptr_t>((size + page_size - 1) & ~(page_size - 1));

auto prot =
!mitigations(pal_enforce_access) ? PROT_READ | PROT_WRITE : PROT_NONE;
Expand Down

0 comments on commit f048746

Please sign in to comment.