IMHO it's an efficiency decision:
ShrinkAllocationPlist calls the GC, and might be (very) slow.

On 8 February 2011 11:35, Keshav Rao Kini <krk...@ntu.edu.sg> wrote:
> Hello,
>
> Here is the result of some experimentation I did:
>
> gap> x := [];; for i in [1..100] do Add(x, i); od; MemoryUsage(x); 
> MakeImmutable(x);; MemoryUsage(x); ShrinkAllocationPlist(x); MemoryUsage(x);
> 512
> 512
> 416
>
> I'm wondering why ShrinkAllocationPlist isn't called automatically by 
> MakeImmutable, since once I use MakeImmutable() it should be impossible to 
> extend x or even to shrink it, if I understand correctly...
>
> -Keshav
>
> Disclaimer: the boilerplate text at the foot of this email has been added 
> automatically by my mail server. This was not done by my request (rather the 
> opposite) so please disregard it.
>
>
> ________________________________
> CONFIDENTIALITY: This email is intended solely for the person(s) named and 
> may be confidential and/or privileged. If you are not the intended recipient, 
> please delete it, notify us and do not copy, use, or disclose its content. 
> Thank you.
>
> Towards A Sustainable Earth: Print Only When Necessary
> _______________________________________________
> Forum mailing list
> Forum@mail.gap-system.org
> http://mail.gap-system.org/mailman/listinfo/forum
>



-- 
Dmitrii Pasechnik
-----
DISCLAIMER: Any text following this sentence does not constitute a
part of this message, and was added automatically during transmission.

_______________________________________________
Forum mailing list
Forum@mail.gap-system.org
http://mail.gap-system.org/mailman/listinfo/forum

Reply via email to