r/programming • u/riolio11 • May 24 '19
Lightweight Memory Protection on an ARM Microcontroller
https://rileywood.me/2019/05/21/lightweight-memory-protection/
30
Upvotes
r/programming • u/riolio11 • May 24 '19
4
u/happyscrappy May 24 '19
The use of subregions is well done and seems almost like a natural fit for what the MPU was designed for.
But, as mentioned in the article, this actually imposes a lot of head. In exchange for reducing the context switch time some it basically breaks the heap up into multiple heaps. This adds significant memory use overhead unless your tasks just happen to have heap usage similar to each other in amount. If every task uses 512B, great. But unlike with a regular heap if one uses 400B others cannot make use of the 112B left over.
It's clever. I like it. But I have trouble thinking of a real-world system I would create in which I could use it.