Skip to content

Commit 8a37078

Browse files
jberdineFacebook Github Bot
authored andcommitted
Core.Std.Gc
Reviewed By: cristianoc Differential Revision: D4232440 fbshipit-source-id: 1b392c4
1 parent e5b41a6 commit 8a37078

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

infer/src/backend/InferPrint.re

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,10 +1224,10 @@ let module AnalysisResults = {
12241224
/** apply [f] to [arg] with the gc compaction disabled during the execution */
12251225
let apply_without_gc f arg => {
12261226
let stat = Gc.get ();
1227-
let space_oh = stat.Gc.space_overhead;
1228-
Gc.set {...stat, Gc.space_overhead: 10000};
1227+
let space_oh = stat.space_overhead;
1228+
Gc.set {...stat, space_overhead: 10000};
12291229
let res = f arg;
1230-
Gc.set {...stat, Gc.space_overhead: space_oh};
1230+
Gc.set {...stat, space_overhead: space_oh};
12311231
res
12321232
};
12331233

infer/src/backend/timeout.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ let timeout_action _ =
8484
raise (SymOp.Analysis_failure_exe (FKtimeout))
8585

8686
let () =
87-
(* Can't use Core since it wraps signal handlers with a catch-all exception handler that exits *)
87+
(* Can't use Core since it wraps signal handlers and alarms with catch-all exception handlers that
88+
exit, while we need to propagate the timeout exceptions. *)
89+
let module Gc = Caml.Gc in
8890
let module Sys = Caml.Sys in
8991
match Config.os_type with
9092
| Config.Unix | Config.Cygwin ->

infer/src/base/Config.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,8 +1387,8 @@ let post_parsing_initialization () =
13871387
let set_minor_heap_size nMb = (* increase the minor heap size to speed up gc *)
13881388
let ctrl = Gc.get () in
13891389
let words_of_Mb nMb = nMb * 1024 * 1024 * 8 / Sys.word_size in
1390-
let new_size = max ctrl.Gc.minor_heap_size (words_of_Mb nMb) in
1391-
Gc.set { ctrl with Gc.minor_heap_size = new_size }
1390+
let new_size = max ctrl.minor_heap_size (words_of_Mb nMb) in
1391+
Gc.set { ctrl with minor_heap_size = new_size }
13921392
in
13931393
set_minor_heap_size 8 ;
13941394

infer/src/base/Utils.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ module Caml = Core.Std.Caml
1818
module Char = Core.Std.Char
1919
module Filename = Core.Std.Filename
2020
module Fn = Core.Std.Fn
21+
module Gc = Core.Std.Gc
2122
module In_channel = Core.Std.In_channel
2223
module Int = Core.Std.Int
2324
module Option = Core.Std.Option

infer/src/base/Utils.mli

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ module Caml = Core.Std.Caml
1818
module Char = Core.Std.Char
1919
module Filename = Core.Std.Filename
2020
module Fn = Core.Std.Fn
21+
module Gc = Core.Std.Gc
2122
module In_channel = Core.Std.In_channel
2223
module Int = Core.Std.Int
2324
module Option = Core.Std.Option

0 commit comments

Comments
 (0)