News for hackers. Stuff that matters.
Re:Memory Safe Languages in Android 13 by tialaramex on Friday December 02, 2022 @09:54PM (#33840036)
> as of C# 7 you can use fixed to declare static arrays inside structs, however these structs need to be marked as unsafe.

That is exactly what I was talking about.

Re:Memory Safe Languages in Android 13 by pjmlp on Saturday December 03, 2022 @12:53AM (#33841048)
Ah ok, somehow misunderstood that.

However there are actually good reasons for it to be unsafe, although it is debatable if that alone should be it.

One is due to the interactions with the GC, in case it moves the data and there are references to its elements, and stack size.

One way to get around it is to use AoS instead of SoA, which is any the best option if performance is the ultimate goal.