Memory error out of gc handles

I know I will be shown for a fool here…
My laptop runs Windows 10 , Julia 1.5 32 gigabytesof RAM
Using StaticArrays I cannot allocate a 100 by 100 array


julia> using StaticArrays

julia> @allocated A=@SMatrix zeros(90,90)
64896

julia>  @allocated A=@SMatrix zeros(100,100)
ERROR: syntax: invalid syntax (memory-error out of gc handles)
Stacktrace:
 [1] top-level scope at REPL[49]:1
 [2] macro expansion at C:\Users\john_hearns\.julia\packages\StaticArrays\mlIi1\src\SMatrix.jl:35 [inlined]
 [3] SArray at C:\Users\john_hearns\.julia\packages\StaticArrays\mlIi1\src\SMatrix.jl:32 [inlined]
 [4] macro expansion at C:\Users\john_hearns\.julia\packages\StaticArrays\mlIi1\src\arraymath.jl:10 [inlined]
 [5] _zeros at C:\Users\john_hearns\.julia\packages\StaticArrays\mlIi1\src\arraymath.jl:2 [inlined]
 [6] zeros at C:\Users\john_hearns\.julia\packages\StaticArrays\mlIi1\src\arraymath.jl:1 [inlined]
 [7] macro expansion at C:\Users\john_hearns\.julia\packages\StaticArrays\mlIi1\src\SMatrix.jl:159 [inlined]
 [8] top-level scope at .\timing.jl:267 [inlined]
 [9] top-level scope at .\REPL[49]:0

Answerign my own question, the docs do say that StaticArrays should not be used for larger than 100x100

As a teaching poitn can someone explain why, in simple terms. Thanks.

The README explains it: see the last paragraph in the section

1 Like

Also note that the manual says 100 elements, not 100 by 100 elements - you’ve got 10,000 elements in your 100x100 static array.

1 Like

Thankyou!