<p><code>GC_DONT_GC=1</code> disables the boehm garbage collector in <code>nix</code>. There are edge cases that our nix expressions can hit, which cause <code>nix</code> to segfault. Disabling the garbage collector in <code>nix</code> &quot;fixes&quot; this. It's not the best solution, but a workaround.  The proper fix would be to fix <code>nix</code>'s use of the boehm garbage collector. That however is said <em>much</em> easier than actually done.</p>
<p>So <code>GC_DONT_GC=1</code> is a workaround for now, until a better <code>nix</code> release is widely available that doesn't need that environment variable anymore.</p>
<p>This also has nothing to do directly with Plutus or Haskell. It's only needed for the evaluation of the build instructions via <code>nix</code>.</p>

CC BY-SA 4.0
2022-01-20T08:50:47.393Z
2022-01-20T08:50:47.393Z
angerman
<p>I tried to look for this but I didn't find anything specifically explaining why this fixes errors when launching Plutus Playground locally, although I definitely found instructions on how to go over the errors themselves. At some point I read somewhere it is related to the garbage collector. Could someone expand a little bit on this?</p>
<p>Thanks!</p>

CC BY-SA 4.0
2022-01-20T02:45:54.100Z
This really is hard to find, after searching myself.  The best I could find is from this smart fellow. "The GC_DONT_GC is a garbage collector for the heap, to make the evaluator use less ram, GC_DONT_GC=1 just turns it off entirely, so it never GC’s ram during the eval." from http://blog.punkbit.com/hacking/plutus-developer-environment-setup-on-macos-monterey/ 

hat tip to @punkbits
TheStophe
<plutus-pioneer-program><plutus-playground><nix>
What is the GC_DONT_GC=1 variable for when running the Plutus Playground locally?
# What is the GC_DONT_GC=1 variable for when running the Plutus Playground locally?

(Asked by: username_0 on 2022-01-19)

I tried to look for this but I didn't find anything specifically explaining why this fixes errors when launching Plutus Playground locally, although I definitely found instructions on how to go over the errors themselves. At some point I read somewhere it is related to the garbage collector. Could someone expand a little bit on this?

Thanks!

**Tags:** plutus-pioneer-program, plutus-playground, nix
> **Comments:**
> **username_1**: This really is hard to find, after searching myself.  The best I could find is from this smart fellow. "The GC_DONT_GC is a garbage collector for the heap, to make the evaluator use less ram, GC_DONT_GC=1 just turns it off entirely, so it never GC’s ram during the eval." from http://blog.punkbit.com/hacking/plutus-developer-environment-setup-on-macos-monterey/   hat tip to @punkbits  

---

## 1 answers

### Answer by username_2 on 2022-01-20. Score: 3 | Accepted answer

`GC_DONT_GC=1` disables the boehm garbage collector in `nix`. There are edge cases that our nix expressions can hit, which cause `nix` to segfault. Disabling the garbage collector in `nix` "fixes" this. It's not the best solution, but a workaround. The proper fix would be to fix `nix`'s use of the boehm garbage collector. That however is said *much* easier than actually done.

So `GC_DONT_GC=1` is a workaround for now, until a better `nix` release is widely available that doesn't need that environment variable anymore.

This also has nothing to do directly with Plutus or Haskell. It's only needed for the evaluation of the build instructions via `nix`.


---

