Le 17/11/2015 01:38, Scott Kostyshak a écrit :
1 << 19 is a 1 with 19 zeros after it, in binary notation, so is equivalent
to 2^19 = 512K but much faster to calculate. This trick is used extensively
in debug.h.
Thanks for this explanation, Richard. Now I understand.
I'm still curious how 512K was chosen.
It is completely arbitrary :) This is actually a lower bound for the
amount of memory used, since it does not take into account the extra
memory required by docstring and QCache themselves.
I will try to find time to tweak this setting, but I am not sure what
use case is the best for that. The important thing for now is that there
is an upper bound on the memory we use for the cache, due to the LRU
algorithm in QCache.
JMarc