What EXACTLY is the difference between intel’s and amd’s ISA, if any?

Yes, the ISA is a document / specification, not hardware. Implementing all of it correctly is what makes something an x86 CPU, rather than just something with similarities to x86. See the x86 tag wiki for links to the official docs (Intel’s manuals). Intel and AMD’s implementations of the x86 ISA differ mainly in performance, … Read more

How does pointer comparison work in C? Is it ok to compare pointers that don’t point to the same array?

According to the C11 standard, the relational operators <, <=, >, and >= may only be used on pointers to elements of the same array or struct object. This is spelled out in section 6.5.8p5: When two pointers are compared, the result depends on the relative locations in the address space of the objects pointed … Read more

Address canonical form and pointer arithmetic

The canonical address rules mean there is a giant hole in the 64-bit virtual address space. 2^47-1 is not contiguous with the next valid address above it, so a single mmap won’t include any of the unusable range of 64-bit addresses. +———-+ | 2^64-1 | 0xffffffffffffffff | … | | 2^64-2^47| 0xffff800000000000 +———-+ | | … Read more