On 2/6/14, 3:44 AM, Michel Fortin wrote:
On 2014-02-06 04:56:28 +0000, Andrei Alexandrescu
<seewebsiteforem...@erdani.org> said:

On 2/5/14, 4:53 PM, Michel Fortin wrote:
On 2014-02-05 22:19:27 +0000, Andrei Alexandrescu
<seewebsiteforem...@erdani.org> said:

I want to make one positive step toward improving memory allocation in
the D language.

I know. But I find your proposal confusing.

Perhaps this is just one piece in your master plan where everything will
make sense once we have all the pieces. But this piece by itself makes
no sense to me; I have no idea where you're going with it.

Is this the continuation of the old thread where you wanted ideas about
how to eliminate hidden allocations in buildPath? Doesn't sound like it.

Actually buildPath is a good example because it concatenates strings.
It should work transparently with RC and GC strings.

That thread about buildPath started like this: "Walter and I were
talking about eliminating the surreptitious allocations in buildPath".
But reference counting will do nothing to eliminate surreptitious
allocations.

That's exactly right. Currently buildPath uses ~= several times so it will produce allocations that the user is unable to free. If buildPath used reference counting through and through, temporary allocations would be freed eagerly inside buildPath, and the user will have a shot at freeing the end result.

It can't be that problem you're trying to address.

Are you sure you want to debate with me what's in my mind?


Andrei

Reply via email to