points by nickwanninger 4 days ago | 0 comments
My PhD thesis is on this topic, and I had an ASPLOS paper on handle based memory support in unmanaged languages (C/C++) through LLVM a few years ago: https://nickw.io/papers/asplos24-alaska.pdf
The overhead we saw there is suprisingly just from instruction and branch overhead from using software handles - I have ongoing work to do it in hardware and the overheads are much lower.
The objects discussed in this article would probably be better called "descriptors". They're very much analogous to file descriptors in UNIX: the API returns an integer index into a table, which contains the actual data being referenced. The memory address of the table or its members remains opaque to calling code, and there is no way to access outside the bounds of the table.