John Carmack applauds D's pure attribute

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Mar 7 07:44:23 PST 2012


On Wed, Mar 07, 2012 at 02:26:28AM -0800, Walter Bright wrote:
> On 3/6/2012 9:59 PM, Sean Kelly wrote:
> >Slice ten bytes out of the middle of a ten MB buffer and the entire
> >buffer sticks around.
[...]

Isn't there some way of dealing with this? I mean, if the GC marks the
highest & lowest pointers that point to a 10MB block, it should be able
to free up the unused parts. (Though I can see how this can be tricky,
since the GC would have to understand which pointers involve arrays, so
that it doesn't truncate long slices, etc.).


T

-- 
Marketing: the art of convincing people to pay for what they didn't need
before which you can't deliver after.


More information about the Digitalmars-d mailing list