markcornwell / pilar

incremental development of scheme compiler
1 stars 0 forks source link

Heap integrity check #12

Open markcornwell opened 9 years ago

markcornwell commented 9 years ago

Might be helpful to add a heap integrity check. Current heap design creates some difficulties with that since can't guage integrity by looking at the stack alone. For example, looking at the first value on the stack you cannot tell if it is the length field of a vector, or the car cell of a cons node. That information is not in the heap, but in the tag bits embedded inside the ptr that points into the heap. What is our strategy for checking the integrity of the heap? How do we detect errors with minimal runtime effects?