Growing memory with broadcast assignment

Figured out the problem. I guess the expression v = Array{Float32}(undef, 105, 80, 4, 50000) does not actually allocate the full block of memory because of the undef initializer. It was therefore allocating as it was used which made the memory footprint grow up to what it would have if the allocation actually happened at the beginning.

1 Like