High memory usage in vibe.d application

Anton Fediushin fediushin.anton at yandex.com
Sun Jul 1 05:20:17 UTC 2018


On Saturday, 30 June 2018 at 22:06:50 UTC, Jacob Shtokolov wrote:
> On Friday, 29 June 2018 at 17:40:07 UTC, Anton Fediushin wrote:
>> So, long story short:
>> - Usage of Mallocator instead of theAllocator made it a little 
>> bit better
>> - VibeManualMemoryManagement had no (or little) effect
>> - Manually calling GC.collect had no (or little) effect
>
> You could try to call GC.minimize in pair with GC.collect:
>
> ```
> GC.collect();
> GC.minimize();
> ```
>
> to return all freed memory back to the OS.


With vibe.d this had no effect too.

>
> Not sure that the leakage of this type is possible because if 
> you're running your program on 64bit Linux the probability of 
> it is very low. AFAIK the GC is launched every (almost) time 
> you allocate the memory, and if it finds "dead" pointers, it 
> definitely must clean them out.
>
> Vibe.d may also leak. Have you tried to run the same code 
> without Vibe.d, say, using 
> https://github.com/ikod/dlang-requests as an HTTP client?

Now I tried it and indeed, it's vibe.d's fault. I'm not quite 
sure what causes it and if this problem is known, I'll look into 
that later and open an issue if it doesn't exist already.





More information about the Digitalmars-d-learn mailing list