mirror of
https://github.com/fluencelabs/musl
synced 2025-04-24 14:52:13 +00:00
Disable MMAP in the malloc and stub madvise.
This commit is contained in:
parent
45757ea824
commit
5a0b0ec3aa
@ -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 *);
|
||||
|
6
src/mman/wasm32/madvise.c
Normal file
6
src/mman/wasm32/madvise.c
Normal 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);
|
Loading…
x
Reference in New Issue
Block a user