diff --git a/src/julia_internal.h b/src/julia_internal.h index f27d066608c88..23f46aaf41c51 100644 --- a/src/julia_internal.h +++ b/src/julia_internal.h @@ -150,8 +150,8 @@ void gc_sweep_sysimg(void); static const int jl_gc_sizeclasses[] = { #ifdef _P64 8, -#elif MAX_ALIGN == 8 - // ARM and PowerPC have max alignment of 8, +#elif MAX_ALIGN > 4 + // ARM and PowerPC have max alignment larger than pointer, // make sure allocation of size 8 has that alignment. 4, 8, #else diff --git a/test/cmdlineargs.jl b/test/cmdlineargs.jl index 6f5427b388290..50e5a32c17b5d 100644 --- a/test/cmdlineargs.jl +++ b/test/cmdlineargs.jl @@ -277,11 +277,16 @@ let exename = `$(Base.julia_cmd()) --startup-file=no` @test popfirst!(got) == " - function f(x)" @test popfirst!(got) == " 80 []" if Sys.WORD_SIZE == 64 + # P64 pools with 64 bit tags @test popfirst!(got) == " 32 Base.invokelatest(g, 0)" @test popfirst!(got) == " 48 Base.invokelatest(g, x)" - else + elseif 12 == (() -> @allocated ccall(:jl_gc_allocobj, Ptr{Cvoid}, (Csize_t,), 8))() + # See if we have a 12-byte pool with 32 bit tags (MAX_ALIGN = 4) @test popfirst!(got) == " 24 Base.invokelatest(g, 0)" @test popfirst!(got) == " 36 Base.invokelatest(g, x)" + else # MAX_ALIGN >= 8 + @test popfirst!(got) == " 16 Base.invokelatest(g, 0)" + @test popfirst!(got) == " 48 Base.invokelatest(g, x)" end @test popfirst!(got) == " 80 []" @test popfirst!(got) == " - end"