librelist archives

« back to archive

deep_twin in pure Eiffel

deep_twin in pure Eiffel

From:
Paolo Redaelli
Date:
2011-11-04 @ 10:35
A little report on my efforts toward a pure-Eiffel, re/entrant 
implementation of deep_twin.
You may track my efforts on this branch 
https://github.com/tybor/Liberty/tree/deep-twin-in-eiffel
Currently it does not work at all, since even programs as simple as:


class DTT -- Deep twin test
creation make
feature make is
         local x,y: LINKED_LIST[STRING]
         do
             create x.make
             x.add_first("foo") x.add_last("bar")
             y := x.deep_twin
         end
     end

turn the compiler crazy: it allocates all the available memory and 
crashes with a peak memory usage of 3Gb on my 1Gb machine (see this 
https://plus.google.com/111685400840181846627/posts/PvBtRqvpXhb on how 
to improve a "memory starved" machine even I would say that 1mb is 
memory starving)...

So I think I'll change sys/runtime/c/deep_twin.*
Happy hacking
     Paolo