I was reading the documentation for
std::pointer::add and I came upon this section addressing the requirement that the offset must be contained in an
Most platforms fundamentally can’t even construct such an allocation. For instance, no known 64-bit platform can ever serve a request for 2^63 bytes due to page-table limitations or splitting the address space. However, some 32-bit and 16-bit platforms may successfully serve a request for more than
isize::MAXbytes with things like Physical Address Extension. As such, memory acquired directly from allocators or memory mapped files may be too large to handle with this function.
How common are such systems, and are there any particular use case where such systems might be preferred?
I'm writing a (hopefully performant) data structure which requires some pointer operations, and I'm wondering if I should include a check making sure that I don't overflow an isize. Or, is this case so extreme that it probably wouldn't be worth the overhead?