# GC.gc() error

**URL:** <https://discourse.julialang.org/t/gc-gc-error/102203>\
**Category:** General Usage\
**Created:** [July 28, 2023, 3:26pm UTC](https://discourse.julialang.org/t/gc-gc-error/102203 "2023-07-28T15:26:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomtom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tomtom/32/5106_2.png) [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Post date:** [July 28, 2023, 3:26pm UTC](https://discourse.julialang.org/t/gc-gc-error/102203/1 "2023-07-28T15:26:46Z")

</div>

got the following error and Julia quitted. Should be the result of calling `GC.gc()`.

any idea how to avoid it? v.1.9.1, Apple silicon M2 Ultra

```julia
mjulia191(74249,0x1e7495e00) malloc: *** error for object 0x48db150c0: pointer being freed was not allocated
mjulia191(74249,0x1e7495e00) malloc: *** set a breakpoint in malloc_error_break to debug

[74249] signal (6): Abort trap: 6
in expression starting at REPL[2]:1
__pthread_kill at /usr/lib/system/libsystem_kernel.dylib (unknown line)
Allocations: 2699795111 (Pool: 2685605337; Big: 14189774); GC: 91
Abort trap: 6

```

---

<div class="post-metadata">

**Author:** ![raman\_kumar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raman_kumar/32/26782_2.png) [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Post date:** [July 28, 2023, 3:51pm UTC](https://discourse.julialang.org/t/gc-gc-error/102203/2 "2023-07-28T15:51:31Z")

</div>

Try `] gc` in julia terminal. May be it is garbage collection issue.

```julia
] gc

```

---

<div class="post-metadata">

**Author:** ![tomtom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tomtom/32/5106_2.png) [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Post date:** [July 28, 2023, 4:00pm UTC](https://discourse.julialang.org/t/gc-gc-error/102203/3 "2023-07-28T16:00:35Z")

</div>

maybe becoz I started Julia with `--check-bounds=no` and carelessly went out of bounds.
