About GC

Alexandr Druzhinin drug2004 at bk.ru
Sun Feb 24 07:32:37 PST 2013


24.02.2013 21:26, Alexandr Druzhinin пишет:
> In the following code http://dpaste.dzfl.pl/f4ae16aa
> memory consumption depends on DATA_SIZE value. Bigger value bigger
> consumption - it's natural. Consumption starts from some value and
> continue to some threshold. After reachin this threshold comsumption
> doesn't enlarge. This threshold depends on DATA_SIZE value and some
> others. My question is how can I find this threshold to know is this
> value suitable for real using or I should change something in my code.
> Is there some guarantee that this threshold will be less than real
> memory on the box? How can I control this threshold?
>
> P.S. or may be I do something wrong in the snippet?

as I understand the threshold is reached when gc starts freeing the same 
amount of memory as it allocates? and because of it consumption 
stabilizes? So adjusting or restriction of this threshold in more 
complex applications is something very hard. And it's possible that if 
application suddenly gets data more than before application may crashes 
because this threshold oversize than available memory?


More information about the Digitalmars-d-learn mailing list