Path: csiph.com!weretis.net!feeder8.news.weretis.net!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: The return value of realloc(p,0) Date: Sun, 03 Sep 2023 01:45:37 -0700 Organization: A noiseless patient Spider Lines: 34 Message-ID: <86zg23r6fi.fsf@linuxsc.com> References: <86edjju668.fsf@linuxsc.com> <86wmxas6ty.fsf@linuxsc.com> <86sf7xspk3.fsf@linuxsc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: dont-email.me; posting-host="6ef63087f855104b64afdd13e03f4862"; logging-data="896175"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/SfRkZuoqIr9Em1UU9YMb/t57o2x8ddQs=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:B7/rSy2v2WAM3dnLtpNAhxt8OOg= sha1:/h23ah9qHIBgkyXFaW2Ao8kE3nE= Xref: csiph.com comp.lang.c:173729 scott@slp53.sl.home (Scott Lurndal) writes: > Tim Rentsch writes: > >> Vir Campestris writes: >> >> >> In a 64-bit address space, there are a lot more addresses than >> there are bytes of memory, even virtual bytes of memory. All but >> a very small fraction of 64-bit addresses cannot map to actual >> memory, because there is no room on the address bus (figuratively >> speaking). > > Current processors support between 44 and 52 bits of physical > address, and for the most part, the same on the virtual address > space as well. ARMv8 allows the VA space to be anywhere > from 16 bits to 52 bits on a per-translation-context) basis; > where smaller VA sizes can significantly decrease translation > table walk cost (i.e. by skipping levels). > > With DDR5 and HBM we're seeing terabytes of DRAM on the bus. Still plenty of address space left over. > With CXL (and Intel's PUMA chip) the physical address bus > will be fully utilized (all 64 bits) in the not so distant > future, if perhaps sparsely by using higher order bits to > identify nodes on the fabric. I think the key word there is sparsely. A very small fraction of a 64-bit address space suffices, and that needn't be all contiguous either - it's easy to handle a modest number of distinct areas, without too much burden either in space or time.