From 7956bf6b73ed27ae5e264a4cc60807d5233a9178 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Mon, 1 May 2023 10:52:01 -0400 Subject: [PATCH] Add test for GC chunks --- test/gc.jl | 1 + test/gc/chunks.jl | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 test/gc/chunks.jl diff --git a/test/gc.jl b/test/gc.jl index ba3b5128687a7e..69ed3dfcb9b9cb 100644 --- a/test/gc.jl +++ b/test/gc.jl @@ -17,4 +17,5 @@ end run_gctest("gc/binarytree.jl") run_gctest("gc/linkedlist.jl") run_gctest("gc/objarray.jl") + run_gctest("gc/chunks.jl") end diff --git a/test/gc/chunks.jl b/test/gc/chunks.jl new file mode 100644 index 00000000000000..f49c56071b107f --- /dev/null +++ b/test/gc/chunks.jl @@ -0,0 +1,14 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +# MWE from https://github.com/JuliaLang/julia/issues/49501 +N = 1_000_000 # or larger +T = BigFloat + +struct Q{T} + a::T + b::T +end +let + A = [Q(rand(T), rand(T)) for _ in 1:N] +end +GC.gc()