Fix minor heap size calculation

Summary:
The code to set the minor heap size confused bytes and words, and so was
off by a factor 8.  Fortunately it attempted to set the minor heap to
1MB and got the better value of 8MB instead.

Reviewed By: cristianoc

Differential Revision: D3455937

fbshipit-source-id: 48d0e23
master
Josh Berdine 9 years ago committed by Facebook Github Bot 1
parent 6054b4c6d4
commit e1d49821fd

@ -1074,11 +1074,11 @@ let post_parsing_initialization () =
let set_minor_heap_size nMb = (* increase the minor heap size to speed up gc *)
let ctrl = Gc.get () in
let oneMb = 1048576 in
let new_size = max ctrl.Gc.minor_heap_size (nMb * oneMb)
in Gc.set { ctrl with Gc.minor_heap_size = new_size }
let words_of_Mb nMb = nMb * 1024 * 1024 * 8 / Sys.word_size in
let new_size = max ctrl.Gc.minor_heap_size (words_of_Mb nMb) in
Gc.set { ctrl with Gc.minor_heap_size = new_size }
in
set_minor_heap_size 1 ;
set_minor_heap_size 8 ;
let symops_timeout, seconds_timeout =
let default_symops_timeout = 333 in

Loading…
Cancel
Save