Niels Möller <ni...@lysator.liu.se> writes: I don't have a strong opinion on how to fix this discrepancy between docs and implementation. But I feel rather strongly that mini-gmp shpuldn't make this promise, so code that rely on it will not work with mini-gmp.
It is, in my opinion, not a bug in the code, nor is is a bug in the documentation. What we indended to say in the docs is that a variable which once contained something large then will occupy lots of RAM even if is later is used for only small things. (This in turn was an optimisation as trimming the allocation after each operaton would slow down GMP very, very much.) That's the only thing we should promise, as it has obvious exceptions. It is possible that the docs need clarification. Perhaps a "in most cases" can be inserted somewhere? -- Torbjörn Please encrypt, key id 0xC8601622 _______________________________________________ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs