coduin / epiphany-bsp

BSP implementation for the Parallella; the world's smallest supercomputer
https://jwbuurlage.github.io/epiphany-bsp/
GNU General Public License v3.0
27 stars 14 forks source link

Prevent overlap between stack and malloc space in e-core memory #29

Closed usewits closed 8 years ago

usewits commented 9 years ago

On mallocs we can check if our malloc memory range and the stack overlap. This can however not be done on stack allocations. To prevent overlap we can take two measures: 1) Give a warning if distance between malloc range and stack is less than some predefined constant 2) Add a magic int at the end of our malloc range. By checking if this int is preserved one can say with high certainty whether or not the stack has overlapped with the malloc range at some point in time.