Disable MMAP in the malloc and stub madvise.

This commit is contained in:
Yury Delendik 2018-10-11 15:03:26 -05:00
parent 45757ea824
commit 5a0b0ec3aa
2 changed files with 12 additions and 0 deletions

View File

@ -34,7 +34,13 @@ struct bin {
#define C_INUSE ((size_t)1)
#ifndef __wasm__
#define IS_MMAPPED(c) !((c)->csize & (C_INUSE))
#else
#undef MMAP_THRESHOLD
#define MMAP_THRESHOLD ((size_t)-1)
#define IS_MMAPPED(c) (0)
#endif
__attribute__((__visibility__("hidden")))
void __bin_chunk(struct chunk *);

View File

@ -0,0 +1,6 @@
#include <sys/mman.h>
#include "libc.h"
int __madvise(void *addr, size_t len, int advice) { return 0; }
weak_alias(__madvise, madvise);