Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use madvise() to return memory to OS on Cosmo
Issue #666 (bdwgc). Optionally, if -D FORCE_MPROTECT_BEFORE_MADVISE is passed to CFLAGS_EXTRA, mprotect(PROT_NONE) is called before madvise(MADV_DONTNEED). * os_dep.c [USE_MUNMAP && !USE_WINALLOC && !SN_TARGET_PS3 && COSMO] (block_unmap_inner): Call madvise(MADV_DONTNEED) instead of mmap(PROT_NONE). * os_dep.c [USE_MUNMAP && !USE_WINALLOC && !SN_TARGET_PS3 && COSMO && FORCE_MPROTECT_BEFORE_MADVISE] (block_unmap_inner): Call mprotect(PROT_NONE). * os_dep.c [USE_MUNMAP && !USE_WINALLOC && !SN_TARGET_PS3 && !FORCE_MPROTECT_BEFORE_MADVISE&& COSMO] (GC_remap): Do nothing instead of mprotect(PROT_READ|PROT_WRITE). * os_dep.c [USE_MUNMAP && !USE_WINALLOC && COSMO && FORCE_MPROTECT_BEFORE_MADVISE] (GC_remap): Call mmap(PROT_READ|PROT_WRITE).
- Loading branch information