Hi PolyML people,

I'm interested in trying to shrink the size of my binary/heap file;

I have 18604 lines of library code;
the first 6922 lines give a 2.6 MB heap;
the next 1200 lines on top of this give a 15 MB heap.
I then have 7500 lines of program that push the heap up to 138 MB.
(on some Linux' this becomes over 200MB!)

I'm doing garbage collection before writing the heap (although it sounds
like this is now done automatically); and I can't quite tell how I'm
getting this rather nasty blow up in heap size.

I suspect my use of substructures, I often have things like:

signature N1 ...
signature N2 = sig structure n1 : N1 ... end

functor N2Fun(n1 : N1 and ...) : N2 = struct
  structure n1 = n1;
  ...
end;

structure n1 : N1 = ...

structure n2a = functor(n1 : N1 and ...) : N2;
structure n2b = functor(n1 : N1 and ...) : N2;

is the code for the substructure n1 literally getting copied each time?

Even with this I find it hard to imagine how I'd generate 120 MB of
machine code from 7500 lines of ML...

I noticed some forget functions in the PolyML compiler; is there some
clever way to say all I care about is stuff reachable from calling some
specified function?

suggestions very welcome,

best,
lucas
_______________________________________________
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

Reply via email to