Code segment unload: Difference between revisions

(Smalltalk)
Line 72:
 
There are some specific details that will allow some finer control of garbage collection in special circumstances, but the average Perl 6 programmer will not need to know about or deal with them.
 
=={{header|Phix}}==
For compiled programs there is little you could do to reclaim the space of code segments as written to the PE/ELF executable,
other than to perhaps "daisy-chain" executables. You could wrap FreeLibrary/dlcose as per OpenOneDLL() in builtins/VM/pcfunc.e.
 
For interpreted programs however, the code is built and executed in dynamically allocated memory, and in fact "p -test" runs
some 60 separate test programs, some of which are deliberately memory-intensive. For each one the compiler allocates a full
execution environment, including code space, a call stack, and new heap, and tears it all down and reclaims the memory on
completion. That process is, fairly obviously, quite involved and not for the faint hearted, but clearly doable.
 
=={{header|Python}}==
7,795

edits