Why do my array of structs take up so much memory?

Based on my tests, I’m guessing ValueTypes in the Micro Framework are not true value types as we’re used to on the desktop CLR. At the very least, they are being boxed. And there may be another level of indirection involved too. These costs are incurred in a (quite substantial for an embedded platform) memory overhead.

I’ll be converting to an int[] in my FixedSizedQueue.

Actually, I ended up using UInt32[] and added some extension methods to wrap around the bit bashing.

I poked around a bit in the source code, but couldn’t find anything helpful (and I really don’t know what to look for either).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)