| ring r=0,(x(1..500)),dp;
poly p=(x(1)+x(500))^50;
proc ReportMemoryUsage()
{ "Memory currently used by SINGULAR :",memory(0),"Byte (",
int(memory(0) div 1024), "KByte)" +newline+
"Memory currently allocated from system:",memory(1), "Byte (",
int(memory(1) div 1024), "KByte)";
"Maximal memory allocated from system :",memory(2), "Byte (",
int(memory(2) div 1024), "KByte)";
}
ReportMemoryUsage();
==> Memory currently used by SINGULAR : 152896 Byte ( 149 KByte)
==> Memory currently allocated from system: 2236416 Byte ( 2184 KByte)
==> Maximal memory allocated from system : 2236416 Byte ( 2184 KByte)
kill p;
ReportMemoryUsage(); // less memory used: p killed
==> Memory currently used by SINGULAR : 82336 Byte ( 80 KByte)
==> Memory currently allocated from system: 2236416 Byte ( 2184 KByte)
==> Maximal memory allocated from system : 2236416 Byte ( 2184 KByte)
kill r;
ReportMemoryUsage(); // even less memory: r killed
==> Memory currently used by SINGULAR : 70120 Byte ( 68 KByte)
==> Memory currently allocated from system: 2236416 Byte ( 2184 KByte)
==> Maximal memory allocated from system : 2236416 Byte ( 2184 KByte)
|