diff --git a/src/gc.c b/src/gc.c index 7089bb12fc347..7fac0f130d4f4 100644 --- a/src/gc.c +++ b/src/gc.c @@ -2969,7 +2969,7 @@ size_t gc_count_work_in_queue(jl_ptls_t ptls) JL_NOTSAFEPOINT * have tried to steal from the queue which still has a work item left, but failed to do so, * which violates the semantics of Chase-Lev's work-stealing queue. * - * - Let E1 be the event "master thread writes -1 to gc_master_tid" and E2 be the even + * - Let E1 be the event "master thread writes -1 to gc_master_tid" and E2 be the event * "master thread observes that `gc_n_threads_marking` is zero". Since we're using * sequentially consistent atomics, E1 => E2. Now suppose one thread which is spinning in * `gc_should_mark` tries to enter the mark-loop after E2. In order to do so, it must diff --git a/test/gc.jl b/test/gc.jl index e085c1d8658e5..99b96a5ae1fd2 100644 --- a/test/gc.jl +++ b/test/gc.jl @@ -15,6 +15,13 @@ function run_gctest(file) end end +function run_nonzero_page_utilization_test() + GC.gc() + page_utilization = Base.gc_page_utilization_data() + # at least one of the pools should have nonzero page_utilization + @test any(page_utilization .> 0) +end + # !!! note: # Since we run our tests on 32bit OS as well we confine ourselves # to parameters that allocate about 512MB of objects. Max RSS is lower @@ -24,4 +31,5 @@ end run_gctest("gc/linkedlist.jl") run_gctest("gc/objarray.jl") run_gctest("gc/chunks.jl") + run_nonzero_page_utilization_test() end