by dapperdrake · 1w ago · 0 comments
So, mathematically, pointers still are integers, because "everything" can be encoded as a natural number. Handles like in Windows or UEFI, hardware descriptors like internal to netmap and io_uring for NIC physical memory mapped control registers, 32-bit integer page numbers within sqlite databases, or memory addresses in x86_64 registers. Tagged numbers for counting stuff. Just look at off_t in Linux. Or unix filesescriptor fd numbers into a tiny per-process table of each Linux process. Some with hardware support, some without.
And then stuff like ptrdiff_t in the C abstract machine.
All the same idea. And it "only works", because they are "just numbers".
And then come the implementation details.
No comments yet.