File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 9
9
extern "C" {
10
10
#endif
11
11
12
+ JL_DLLEXPORT uint64_t jl_get_pg_size (void )
13
+ {
14
+ return GC_PAGE_SZ ;
15
+ }
16
+
12
17
// Try to allocate memory in chunks to permit faster allocation
13
18
// and improve memory locality of the pools
14
19
#ifdef _P64
Original file line number Diff line number Diff line change @@ -22,6 +22,12 @@ function run_nonzero_page_utilization_test()
22
22
@test any (page_utilization .> 0 )
23
23
end
24
24
25
+ function run_pg_size_test ()
26
+ page_size = @ccall jl_get_pg_size ():: UInt64
27
+ # supported page sizes: 4KB and 16KB
28
+ @test page_size == (1 << 12 ) || page_size == (1 << 14 )
29
+ end
30
+
25
31
# !!! note:
26
32
# Since we run our tests on 32bit OS as well we confine ourselves
27
33
# to parameters that allocate about 512MB of objects. Max RSS is lower
31
37
run_gctest (" gc/linkedlist.jl" )
32
38
run_gctest (" gc/objarray.jl" )
33
39
run_gctest (" gc/chunks.jl" )
40
+ end
41
+
42
+ @testset " GC page metrics" begin
34
43
run_nonzero_page_utilization_test ()
44
+ run_pg_size_test ()
35
45
end
36
46
37
47
@testset " Base.GC docstrings" begin
You can’t perform that action at this time.
0 commit comments