diff options
author | Damien Doligez <damien.doligez@gmail.com> | 2016-03-08 11:36:51 +0100 |
---|---|---|
committer | Damien Doligez <damien.doligez@gmail.com> | 2016-03-08 11:36:51 +0100 |
commit | a8d8a2adb86ce276378f06a12b1f8e58cf6b5fd1 (patch) | |
tree | d073d364c421813dcdaab9f1c5f7bfe338d093cd /byterun | |
parent | 07d16450c8554c46d13958d785b2abdd3339545b (diff) | |
parent | 70cfba4445407ebf05fa9772f511ba0d6a775400 (diff) | |
download | ocaml-a8d8a2adb86ce276378f06a12b1f8e58cf6b5fd1.tar.gz |
Merge pull request #497 from jhjourdan/deadcode_MMAP_INTERVAL
Remove dead code related to old MMAP_INTERVAL
Diffstat (limited to 'byterun')
-rw-r--r-- | byterun/gc_ctrl.c | 2 | ||||
-rw-r--r-- | byterun/minor_gc.c | 32 |
2 files changed, 0 insertions, 34 deletions
diff --git a/byterun/gc_ctrl.c b/byterun/gc_ctrl.c index 28423de462..3fbdc14e0c 100644 --- a/byterun/gc_ctrl.c +++ b/byterun/gc_ctrl.c @@ -607,8 +607,6 @@ CAMLprim value caml_runtime_variant (value unit) return caml_copy_string ("d"); #elif defined (CAML_INSTR) return caml_copy_string ("i"); -#elif defined (MMAP_INTERVAL) - return caml_copy_string ("m"); #else return caml_copy_string (""); #endif diff --git a/byterun/minor_gc.c b/byterun/minor_gc.c index ef75bc0f38..9dd644cc93 100644 --- a/byterun/minor_gc.c +++ b/byterun/minor_gc.c @@ -132,37 +132,6 @@ void caml_set_minor_heap_size (asize_t bsz) caml_empty_minor_heap (); } CAMLassert (caml_young_ptr == caml_young_alloc_end); -#ifdef MMAP_INTERVAL - { - static uintnat minor_heap_mapped_bsz = 0; - uintnat new_mapped_bsz; - new_mapped_bsz = Round_mmap_size (bsz); - void *block; - - CAMLassert (caml_young_start != NULL); - if (new_mapped_bsz > minor_heap_mapped_bsz){ - uintnat addbsz = new_mapped_bsz - minor_heap_mapped_bsz; - new_heap = (char *) caml_young_start - addbsz; - block = caml_mmap_heap (new_heap, addbsz, PROT_READ | PROT_WRITE, - MAP_FIXED); - if (block != new_heap){ - if (minor_heap_mapped_bsz == 0){ - caml_fatal_error ("cannot initialize minor heap: mmap failed\n"); - }else{ - caml_raise_out_of_memory (); - } - } - new_heap_base = new_heap; - }else if (new_mapped_bsz < minor_heap_mapped_bsz){ - uintnat subbsz = minor_heap_mapped_bsz - new_mapped_bsz; - (void) caml_mmap_heap (caml_young_start, subbsz, PROT_NONE, - MAP_FIXED | MAP_NORESERVE); - new_heap_base = new_heap = (char *) caml_young_start + subbsz; - }else{ - new_heap_base = new_heap = caml_young_base; - } - } -#else new_heap = caml_aligned_malloc(bsz, 0, &new_heap_base); if (new_heap == NULL) caml_raise_out_of_memory(); if (caml_page_table_add(In_young, new_heap, new_heap + bsz) != 0) @@ -172,7 +141,6 @@ void caml_set_minor_heap_size (asize_t bsz) caml_page_table_remove(In_young, caml_young_start, caml_young_end); free (caml_young_base); } -#endif caml_young_base = new_heap_base; caml_young_start = (value *) new_heap; caml_young_end = (value *) (new_heap + bsz); |