Code segment unload: Difference between revisions

Smalltalk
No edit summary
(Smalltalk)
Line 78:
=={{header|Scala}}==
As the situation for Scala in a JVM concerned, the in the entry for its sister JVM language, [[#Kotlin]] applies too.
 
=={{header|Smalltalk}}==
Smalltalk runs in an image that can be saved to disk as a snapshot, and later loaded into memory and resumed. The VM (there are multiple implementations) performs garbage collection on this image, and usually also compacts it so that un-needed memory can be returned to the OS. The snapshot-resume cycle might do other kinds of compaction that reduces the image size even further.
 
The different phases of the GC can be explicitly invoced to ''reclaim'' unused memory immediately, but it does not guarantee the reclaimed memory is deemed excessive and therefore will be returned to the OS.
 
=={{header|Racket}}==
Racket has a JIT compiler that translates functions to machine code whenever they are applied. When such a function is garbage-collected, the JITted machine code is released or re-used with it. Therefore, to reclaim some executable code segment, simply drop references to the function.
Anonymous user