# Eliminating runtime WARNING message

**URL:** <https://forum.crystal-lang.org/t/eliminating-runtime-warning-message/3626>\
**Category:** Help & Support\
**Created:** [August 21, 2021, 6:13pm UTC](https://forum.crystal-lang.org/t/eliminating-runtime-warning-message/3626 "2021-08-21T18:13:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jzakiya](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/jzakiya/32/278_2.png) [@jzakiya](https://forum.crystal-lang.org/u/jzakiya)\
**Post date:** [August 21, 2021, 6:13pm UTC](https://forum.crystal-lang.org/t/eliminating-runtime-warning-message/3626/1 "2021-08-21T18:13:50Z")

</div>

I was (re)testing more code with 1.1.1 and still see an annoying runtime WARNING still being outputted that I would love to see eliminated.

When I run this code:

> <https://gist.github.com/jzakiya/2b65b609f091dcbb6f792f16c63a8ac4>

with very large UInt64 inputs I get these repeated WARNINGs about the allocation of very large blocks of memory, as shown in this example.

```auto
➜ crystal-projects CRYSTAL_WORKERS=8 ./twinprimes_ssoz 1299966672300000 1298760077778888
threads = 8
using Prime Generator parameters for P13
segment size = 802816 resgroups; seg array is [1 x 12544] 64-bits
twinprime candidates = 59666763915; resgroups = 40179639
each of 1485 threads has nextp[2 x 2207426] array
setup time = 0.089996 secs
perform twinprimes ssoz sieve
7 of 1485 twinpairs doneGC Warning: Repeated allocation of very large block (appr. size 35319808):
        May lead to memory leak and poor performance
10 of 1485 twinpairs doneGC Warning: Repeated allocation of very large block (appr. size 35319808):
        May lead to memory leak and poor performance
14 of 1485 twinpairs doneGC Warning: Repeated allocation of very large block (appr. size 35319808):
        May lead to memory leak and poor performance
23 of 1485 twinpairs doneGC Warning: Repeated allocation of very large block (appr. size 35319808):
        May lead to memory leak and poor performance
25 of 1485 twinpairs doneGC Warning: Repeated allocation of very large block (appr. size 35319808):
        May lead to memory leak and poor performance
30 of 1485 twinpairs doneGC Warning: Repeated allocation of very large block (appr. size 35319808):
        May lead to memory leak and poor performance
34 of 1485 twinpairs doneGC Warning: Repeated allocation of very large block (appr. size 35319808):
        May lead to memory leak and poor performance

```

For much smaller values it doesn’t produce those warnings.

Is there a way to currently turn off those warnings, either at compile or runtime?

This is with Crystal 1.1.1 on Linux, and I have 16GB of memory on my laptop.

---

<div class="post-metadata">

**Author:** ![asterite](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/asterite/32/60_2.png) [@asterite](https://forum.crystal-lang.org/u/asterite)\
**Post date:** [August 21, 2021, 6:47pm UTC](https://forum.crystal-lang.org/t/eliminating-runtime-warning-message/3626/2 "2021-08-21T18:47:54Z")

</div>

There’s this: [Add a way to supress the warnings from the GC · Issue #4441 · crystal-lang/crystal · GitHub](https://github.com/crystal-lang/crystal/issues/4441)

---

<div class="post-metadata">

**Author:** ![jzakiya](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/jzakiya/32/278_2.png) [@jzakiya](https://forum.crystal-lang.org/u/jzakiya)\
**Post date:** [August 21, 2021, 7:04pm UTC](https://forum.crystal-lang.org/t/eliminating-runtime-warning-message/3626/3 "2021-08-21T19:04:41Z")

</div>

Thanks @asterite that worked suppressing warnings as shown.

```auto
GC_LARGE_ALLOC_WARN_INTERVAL=1000 CRYSTAL_WORKERS=8 ./twinprimes_ssoz 1299966672300000 1298760077778888

```

EDIT: Had to increase to 1500 (\> number threads used) to eliminate all warnings.
