diff --git a/python/tests/test_mir_equivalence.py b/python/tests/test_mir_equivalence.py index 2dac0a5a..93f06a6a 100644 --- a/python/tests/test_mir_equivalence.py +++ b/python/tests/test_mir_equivalence.py @@ -181,7 +181,7 @@ def live(): def test_a_live_mir_model_holds_far_less_than_upstreams_reservation(): - """Address space, not memory: 20 live MIR-JIT'd models of a two-species + """Address space, not memory: 100 live MIR-JIT'd models of a two-species network. With upstream's 128 MB reservation each held 128 MB; with the default 32 MB, a little over 32. The bound catches a fall back to upstream's size, not the exact setting: a build configured at 0 passes too.""" @@ -190,7 +190,7 @@ def test_a_live_mir_model_holds_far_less_than_upstreams_reservation(): net = os.path.join(DATA, "simple_decay.net") env = {**os.environ, "BNGSIM_CODEGEN_JIT": "mir"} done = subprocess.run( - [sys.executable, "-c", _RESERVE_PROBE, str(net), "20"], + [sys.executable, "-c", _RESERVE_PROBE, str(net), "100"], capture_output=True, text=True, env=env, @@ -200,9 +200,14 @@ def test_a_live_mir_model_holds_far_less_than_upstreams_reservation(): per_model_mb = float(done.stdout.strip().splitlines()[-1]) # Measured on macOS arm64: 32.1 MB a model at the default 32, 128.1 at # upstream's 128 and 0.1 at 0, so a model's other mappings come to about - # 0.1 MB. 40 leaves 8 MB of that for an allocator that maps more, and - # upstream's 128 still fails it by a factor of three. - assert per_model_mb <= 40.0, per_model_mb + # 0.1 MB. The growth is the whole address space's, though, and that holds + # the heap too, about 1.1 MB a live model, which the macos-14 and -15 + # runners map in regions of up to 128 MB, 128-512 MB for 300 MB of + # mallocs (#1402). Two taken among 20 models read as 45.65 MB a model + # against a bound of 40. Over 100, 512 MB is 5.1 MB a model, and 64, + # halfway to upstream's 128 by ratio, leaves room for it, while upstream's + # 128 still fails it by a factor of two. + assert per_model_mb <= 64.0, per_model_mb # ── Issue #1215: running out is a RuntimeError, not the end of the process ───