Skip to content

Commit ec8ab49

Browse files
committed
Limit virtual region names to linux
1 parent c057f82 commit ec8ab49

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wasm2c_rt_mem.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ static int os_mmap_commit(void* curr_heap_end_pointer,
315315

316316
# include <sys/mman.h>
317317
# include <unistd.h>
318-
#if !(defined(__APPLE__) && defined(__MACH__))
318+
#if defined(linux)
319319
# include <sys/prctl.h>
320320
#endif
321321

@@ -431,7 +431,7 @@ static void* os_mmap_aligned(void* addr,
431431
}
432432
}
433433

434-
#if !(defined(__APPLE__) && defined(__MACH__))
434+
#if defined(linux)
435435
if (name) {
436436
// Ignore errors here as this is best effort
437437
prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME,

0 commit comments

Comments
 (0)