Peter Wang
a87ee2a7a9
Use mmap for Boehm GC in threaded grades on Linux.
...
The glibc implementation of malloc (commonly used on Linux) can use sbrk
to acquire more memory, and so does Boehm GC in its default configuration
on Linux. When both allocators are invoked simultaneously from different
threads then memory corruption may result.
configure.ac:
Add --enable-gc-mmap option.
Make --enable-gc-munmap imply --enable-gc-mmap.
Detect mmap and set MR_HAVE_MMAP.
Detect sbrk and set MR_HAVE_SBRK.
On Linux (and potentially other platforms), build Boehm GC for
threaded grades with -DUSE_MMAP if mmap was found.
Mmake.common.in:
Add ENABLE_BOEHM_USE_MMAP.
runtime/mercury_conf.h.in:
Add MR_HAVE_MMAP, although it is not used anywhere yet.
Add MR_HAVE_SBRK. It is only for used by the test program.
tests/hard_coded/Mmakefile:
tests/hard_coded/thread_sbrk.exp:
tests/hard_coded/thread_sbrk.exp2:
tests/hard_coded/thread_sbrk.m:
Add test program.
NEWS:
Announce changes.
(cherry picked from commit d63a294e1f )
2014-08-29 13:44:15 +10:00
..
2012-09-04 11:42:53 +00:00
2013-10-02 20:54:06 +10:00
2011-10-17 04:31:33 +00:00
2011-10-17 04:31:33 +00:00
2011-05-20 04:16:58 +00:00
2012-06-20 13:13:34 +00:00
2012-06-20 13:13:34 +00:00
2011-04-13 13:19:42 +00:00
2014-03-31 14:52:38 +11:00
2011-08-01 07:06:21 +00:00
2011-09-12 16:29:55 +00:00
2013-10-29 17:30:39 +11:00
2014-08-29 13:44:15 +10:00
2014-03-20 17:01:15 +11:00
2014-06-25 17:32:58 +10:00
2014-03-25 12:34:01 +11:00
2014-03-21 14:56:36 +11:00
2011-09-06 05:20:45 +00:00
2014-03-20 17:01:15 +11:00
2011-09-06 05:20:45 +00:00
2014-03-20 17:01:15 +11:00
2012-02-13 00:11:57 +00:00
2014-06-25 17:32:58 +10:00
2012-10-24 04:59:55 +00:00
2011-05-20 04:16:58 +00:00
2011-07-05 03:34:39 +00:00
2012-08-06 02:11:24 +00:00
2011-10-17 04:31:33 +00:00
2014-06-30 16:13:10 +10:00
2014-03-20 18:01:55 +11:00
2011-08-09 11:07:37 +00:00
2012-12-23 21:37:31 +00:00
2013-09-30 20:16:43 +10:00
2011-05-20 04:16:58 +00:00
2011-07-13 01:22:54 +00:00
2011-05-21 13:59:07 +00:00
2011-08-01 07:06:21 +00:00
2012-02-13 00:11:57 +00:00
2012-02-13 00:11:57 +00:00
2014-03-21 14:56:36 +11:00
2013-10-29 17:30:39 +11:00
2011-10-17 04:31:33 +00:00
2014-03-21 14:56:36 +11:00
2014-03-21 14:56:36 +11:00
2011-10-26 14:08:45 +00:00
2014-03-20 17:01:15 +11:00
2011-11-23 10:53:01 +00:00
2014-07-18 12:59:12 +10:00
2014-07-18 12:59:12 +10:00
2014-03-21 14:56:36 +11:00
2014-06-25 17:32:58 +10:00
2011-09-12 16:29:55 +00:00
2011-09-06 05:20:45 +00:00
2013-03-21 18:27:17 +11:00
2014-03-21 14:56:36 +11:00
2011-10-19 11:57:54 +00:00
2012-08-06 02:11:24 +00:00
2011-05-20 04:16:58 +00:00
2011-11-05 15:58:16 +00:00
2011-11-05 15:58:16 +00:00
2014-03-20 17:01:15 +11:00
2011-11-14 06:02:37 +00:00
2011-11-12 12:29:21 +00:00
2011-10-17 04:31:33 +00:00
2014-06-27 10:16:38 +10:00
2014-06-25 17:32:58 +10:00
2012-10-24 04:59:55 +00:00
2012-10-24 04:59:55 +00:00
2014-03-20 17:01:15 +11:00
2012-06-05 18:19:33 +00:00
2011-05-20 04:16:58 +00:00
2014-03-25 15:03:13 +11:00
2014-03-20 17:01:15 +11:00
2011-05-20 04:16:58 +00:00
2012-03-26 06:57:34 +00:00
2012-03-26 06:57:34 +00:00
2011-09-06 05:20:45 +00:00
2014-03-21 15:03:47 +11:00
2011-05-20 04:16:58 +00:00
2011-05-20 04:16:58 +00:00
2014-06-25 17:32:58 +10:00
2013-04-05 17:12:09 +11:00
2013-04-05 17:12:09 +11:00
2012-06-20 13:13:34 +00:00
2012-06-20 13:13:34 +00:00
2011-10-26 14:08:45 +00:00
2014-06-25 17:32:58 +10:00
2011-09-26 04:30:48 +00:00
2011-05-20 04:16:58 +00:00
2011-05-20 04:16:58 +00:00
2014-03-20 17:01:15 +11:00
2012-02-13 00:11:57 +00:00
2012-01-09 03:31:08 +00:00
2012-10-24 04:59:55 +00:00
2011-06-16 06:42:19 +00:00
2011-10-27 14:14:10 +00:00
2014-03-21 14:56:36 +11:00
2011-12-14 03:26:01 +00:00
2011-05-20 04:16:58 +00:00
2012-09-19 13:41:43 +00:00
2011-08-22 07:56:10 +00:00
2014-07-07 14:43:42 +10:00
2013-06-20 18:13:41 +10:00
2014-01-22 08:55:58 +11:00