| 
  | 
Message-ID: <2292191.aRXLXkqSa3@tjmaciei-mobl5>
Date: Sat, 01 Nov 2025 08:11:50 -0700
From: Thiago Macieira <thiago@...ieira.org>
To: Paul Eggert <eggert@...ucla.edu>, Florian Weimer <fw@...eb.enyo.de>
Cc: Alejandro Colomar <alx@...nel.org>, libc-alpha@...rceware.org,
 musl@...ts.openwall.com, "A. Wilcox" <AWilcox@...cox-tech.com>,
 Lénárd Szolnoki <cpp@...ardszolnoki.com>,
 Collin Funk <collin.funk1@...il.com>,
 Arthur O'Dwyer <arthur.j.odwyer@...il.com>,
 Jonathan Wakely <jwakely@...hat.com>, "Paul E. McKenney" <paulmck@...nel.org>
Subject: Re: Re: realloci(): A realloc() variant that works in-place
On Saturday, 1 November 2025 05:57:56 Pacific Daylight Time Florian Weimer 
wrote:
> This would not help C++ because C++ doesn't have this kind of in-place
> adjust-all-pointers operation.  There's just copy and move, and both
> need non-overlapping old and new storage at the same time.
Indeed. It's not unprecedented: we are discussing adding an extension point 
for the non-trivial relocation operation (that is, for those class types that 
need an out-of-line, complex operation to atomically move the contents from 
source to destination and destroy the source).
However, this is yet another extension point because it doesn't obviate the 
need for the above. I don't think it will happen because of the complexity of 
the task and how few developers will get it right. And that's in addition to 
the update to the core language rules on pointer arithmetic.
That's why I said I don't oppose this change to the pointer rules in 
principle, only if it is done *instead of* realloci().
-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Principal Engineer - Intel Data Center - Platform & Sys. Eng.
Download attachment "signature.asc" of type "application/pgp-signature" (871 bytes)
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.