[phobos] Clear appending cache?
Andrei Alexandrescu
andrei at erdani.com
Thu Nov 18 13:42:56 PST 2010
I think we should actively discourage manual release of memory from the
GC heap. We should instead facilitate use of malloc and free.
Andrei
On 11/18/10 1:33 PM, Steve Schveighoffer wrote:
> I plan to fix 1 soon (as discussed in your bug report).
>
> I forgot about 2, but the runtime function that deletes an array should
> remove it from the cache. (this is an easy fix).
>
> To get you running, this would be the contents of the requested function
> (must put the function in rt/lifetime.d):
>
> __blkcache[] = BlkInfo.init;
>
> -Steve
>
>
> *From:* David Simcha <dsimcha at gmail.com>
> *To:* Discuss the phobos library for D <phobos at puremagic.com>
> *Sent:* Thu, November 18, 2010 4:15:50 PM
> *Subject:* [phobos] Clear appending cache?
>
> Can someone who knows better than me how it works (probably Steve)
> please put a function in druntime to clear the current thread's
> array appending cache? I need this for two reasons:
>
> 1. To make sure arrays I'm done with get GC'd.
>
> 2. To make it safe(r) to free arrays manually.
>
>
>
>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
More information about the phobos
mailing list