Does it make sense to implement a garbage collector in a garbage collection language

I want to implement a garbage collector (GC) in Java or Haskell, but does that make sense?

Will I be able to control when my own GC implementation is launched, and not the GC implementation language?

I assume that there can be three types of answers to this question:

  • Set the flag when starting the virtual machine (VM), which disables the implementation language GC.
  • Use a special design that allows me to manage my own memory, for example, use the Continue Transmission Style (CPS) to control my own evaluation strategy.
  • No, use a language without GC.

Looking at them:

  • I prefer the second option, since I can use this construct in all languages.
  • I do not like the first option, because I will also need to manage the memory of my translator.
  • (And I do not prefer the third option, none, but I can not control it)

This is not a duplicate. I am building an interpreter in a language with a garbage collector. Do I need a garbage collector for the interpreter? , since I am not performing to load my interpreter with the underlying GC.

+4
source share
4 answers

? GC , . GC , , . Java GCed. "" .

? . , , , GC, , , . , .

+1

, : .

"" ; , , , , "" . , - JVM, , , ; JVM gc.

- "" , java, JVM gc .

: , . ; . ; "" , "" ?

, , , JVM, , JVM , . , 20- JVM JIT- GC. , " "...

, : "" .

: SE-Radio JRuby JVM, . JRuby ; JVM Ruby...

+6

. , , GC, , - , JVM. : , JVM, , JVM, GC?

, . , , . ,

. GC. , , , . .

+1

Java, GC JVM . GC , . , GC JVM GC, GC .

: GC JVM , GC, GC .

, , GC Java GC, . GC GC, .

0

Source: https://habr.com/ru/post/1676398/


All Articles