Skip to content

Commit

Permalink
cr suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
TianlongLiang authored and loganek committed Feb 24, 2025
1 parent e72338b commit 851a26d
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions core/shared/platform/common/posix/posix_memmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,6 @@ os_mprotect(void *addr, size_t size, int prot)
int map_prot = PROT_NONE;
uint64 page_size = (uint64)getpagesize();
uint64 request_size = (size + page_size - 1) & ~(page_size - 1);
// printf("mprotect addr: %p, size: %llu, prot: %d\n", addr, request_size,
// prot);

if (!addr)
return 0;
Expand All @@ -285,10 +283,6 @@ os_mprotect(void *addr, size_t size, int prot)
if (prot & MMAP_PROT_EXEC)
map_prot |= PROT_EXEC;

if (mprotect(addr, request_size, map_prot) == -1) {
printf("mprotect failed\n");
}

return mprotect(addr, request_size, map_prot);
}

Expand Down

0 comments on commit 851a26d

Please sign in to comment.