# Why check\_allocs warns about reliability?

**URL:** https://discourse.julialang.org/t/why-check-allocs-warns-about-reliability/137660
**Category:** General Usage
**Tags:** allocations, alloccheck
**Created:** [June 16, 2026, 6:32pm UTC](https://discourse.julialang.org/t/why-check-allocs-warns-about-reliability/137660 "2026-06-16T18:32:38Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Benny](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Benny](https://discourse.julialang.org/u/Benny)
#### Post date: [June 16, 2026, 6:32pm UTC](https://discourse.julialang.org/t/why-check-allocs-warns-about-reliability/137660/1 "2026-06-16T18:32:38Z")

</div>

The docstring for `check_allocs` in AllocCheck.jl warns, in part:

> If you rely on allocation-free code for safety/correctness, it is not sufficient to verify check\_allocs in test code and expect that the corresponding call in production will not allocate at runtime. For this case, you must use `@check_allocs` instead.

Does that mean `check_allocs` only checks 1 specified call signature while `@check_allocs` will statically check all runtime calls of the annotated method definition, or does `@check_allocs` actually have a superior allocation check than `check_allocs` somehow?
