4 ms·
This definition of memory safety reminds me of a story of writing a C compiler for LISP machines. As I recall, C pointers were represented in LISP as a tuple of
by lmkg 12y ago
This definition of memory safety reminds me of a story of writing a C compiler for LISP machines. As I recall, C pointers were represented in LISP as a tuple of a reference to a buffer, and an index into that buffer. In other words, the exact same solution as used in this article: All pointers carry with them (explicitly, in this case) information about which "derived" pointers are legal.
- xenophonf 12y agoCheck out http://arcanesentiment.blogspot.com/2012/05/pointer-arithmetic-can-be-safe.html http://arcanesentiment.blogspot.com/2012/05/pointer-arithmet..., which describes Zeta-C's handling of pointers (Zeta-C being a C compiler for Lisp machines). And as a bonus, there's a link to the Zeta-C source code!