ADD_DEFINITIONS("-DGC_USE_DLOPEN_WRAP")
ENDIF(enable_redirect_malloc)
+OPTION(enable_munmap "Return page to the OS if empty for N collections" ON)
+IF(enable_munmap)
+ ADD_DEFINITIONS("-DUSE_MMAP -DUSE_MUNMAP")
+ENDIF(enable_munmap)
+
OPTION(enable_large_config "Optimize for large heap or root set" NO)
IF(enable_large_config)
ADD_DEFINITIONS("-DLARGE_CONFIG")
OPTION(enable_checksums "Report erroneously cleared dirty bits" NO)
IF(enable_checksums)
- IF(enable_threads)
+ IF(enable_munmap OR enable_threads)
MESSAGE("CHECKSUMS not compatible with USE_MUNMAP or threads")
ENDIF(enable_threads)
ADD_DEFINITIONS("-DCHECKSUMS")
AC_ARG_ENABLE(munmap,
[AC_HELP_STRING([--enable-munmap=N],
- [return page to the os if empty for N collections])],
+ [Return page to the OS if empty for N collections
+ (default: 6)])],
MUNMAP_THRESHOLD=$enableval)
-if test x$enable_munmap != x -a x$enable_munmap != xno; then
+if test x$enable_munmap != xno; then
AC_DEFINE([USE_MMAP], 1,
[Define to use mmap instead of sbrk to expand the heap.])
AH_TEMPLATE([USE_WINALLOC],
AC_DEFINE([USE_MUNMAP], 1,
[Define to return memory to OS with munmap calls
(see doc/README.macros).])
- if test "${MUNMAP_THRESHOLD}" = "yes"; then
+ if test x$MUNMAP_THRESHOLD = x -o x$MUNMAP_THRESHOLD = xyes; then
MUNMAP_THRESHOLD=6
fi
AC_DEFINE_UNQUOTED([MUNMAP_THRESHOLD], [${MUNMAP_THRESHOLD}],
substantial performance cost; use only for debugging
of the incremental collector])])
if test x$enable_checksums = xyes; then
- if test x$enable_munmap != x -a x$enable_munmap != xno \
- -o x$THREADS != xnone; then
+ if test x$enable_munmap != xno -o x$THREADS != xnone; then
AC_MSG_ERROR([CHECKSUMS not compatible with USE_MUNMAP or threads])
fi
AC_DEFINE([CHECKSUMS], 1,
Parallel marker is enabled by default; it could be disabled by
"--disable-parallel-mark" option.
-Memory unmapping could be enabled via "--enable-munmap".
+Memory unmapping could be turned off by "--disable-munmap" option.
Borland Tools
-------------
symptom is that GC_dump() shows much of the heap as black-listed.
3. Heap fragmentation. This should never result in unbounded growth, but
it may account for larger heaps. This is most commonly caused by allocation
- of large objects. On some platforms it can be reduced by building with
- `-DUSE_MUNMAP`, which will cause the collector to unmap memory corresponding
- to pages that have not been recently used.
+ of large objects.
4. Per object overhead. This is usually a relatively minor effect, but
it may be worth considering. If the collector recognizes interior pointers,
object sizes are increased, so that one-past-the-end pointers are correctly