File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,25 @@ function run_pg_size_test()
2828 @test page_size == (1 << 12 ) || page_size == (1 << 14 )
2929end
3030
31+ function issue_54275_alloc_string ()
32+ String (UInt8[' a' for i in 1 : 10000000 ])
33+ end
34+
35+ function issue_54275_test ()
36+ GC. gc (true )
37+ baseline = Base. gc_live_bytes ()
38+ live_bytes_has_grown_too_much = false
39+ for _ in 1 : 10
40+ issue_54275_alloc_string ()
41+ GC. gc (true )
42+ if Base. gc_live_bytes () - baseline > 1_000_000
43+ live_bytes_has_grown_too_much = true
44+ break
45+ end
46+ end
47+ @test ! live_bytes_has_grown_too_much
48+ end
49+
3150# !!! note:
3251# Since we run our tests on 32bit OS as well we confine ourselves
3352# to parameters that allocate about 512MB of objects. Max RSS is lower
4463 run_pg_size_test ()
4564end
4665
66+ @testset " issue-54275" begin
67+ issue_54275_test ()
68+ end
69+
4770@testset " Base.GC docstrings" begin
4871 @test isempty (Docs. undocumented_names (GC))
4972end
You can’t perform that action at this time.
0 commit comments