In fact, it seems unrelated to Gmp. It happens whenever a module is used with ".":
Pike v7.3 release 56 running Hilfe v3.5 (Incremental Pike Frontend)
gc(); _memory_usage()->num_mappings;
(1) Result: 3 (2) Result: 71
for(int i=0; i<1000; i++) compile_string("mixed x = Stdio.File();");
Ok.
gc(); _memory_usage()->num_mappings;
(3) Result: 0 (4) Result: 1071
for(int i=0; i<1000; i++) compile_string("mixed x = master()->resolv("Stdio")->File();");
Ok.
gc(); _memory_usage()->num_mappings;
(5) Result: 0 (6) Result: 1071
/ Marcus Comstedt (ACROSS) (Hail Ilpalazzo!)
Previous text:
2002-09-30 14:23: Subject: Gz testsuite memory usage
Ah-ha. Each time the compiler compiles an expression containing a literal Gmp.mpz creation, it leaks one mapping:
Pike v7.3 release 56 running Hilfe v3.5 (Incremental Pike Frontend)
gc(); _memory_usage()->num_mappings;
(1) Result: 3 (2) Result: 71
for(int i=0; i<1000; i++) compile_string("mixed x = Gmp.mpz(100);");
Ok.
gc(); _memory_usage()->num_mappings;
(3) Result: 0 (4) Result: 1071
/ Marcus Comstedt (ACROSS) (Hail Ilpalazzo!)