# Why/where does this allocate?

**URL:** <https://discourse.julialang.org/t/why-where-does-this-allocate/122607>\
**Category:** Performance\
**Created:** [November 13, 2024, 8:17pm UTC](https://discourse.julialang.org/t/why-where-does-this-allocate/122607 "2024-11-13T20:17:28Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![DatName](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datname/32/418_2.png) [@DatName](https://discourse.julialang.org/u/DatName)\
**Post date:** [November 14, 2024, 2:27am UTC](https://discourse.julialang.org/t/why-where-does-this-allocate/122607/6 "2024-11-14T02:27:12Z")

</div>

I think this might be similar to [this](https://discourse.julialang.org/t/allocations-with-write-tcpsocket-x/68865). If I remember correctly, `wait()` checks with the scheduler if any other tasks or libuv “events” are ready, and will switch to them / call libuv callbacks, so you might see allocations from those tasks here (but I might be terribly wrong, you have to check). There is this `Ref{}` allocation when you write to IO, so maybe thats it?

---

_[View the full topic](https://discourse.julialang.org/t/why-where-does-this-allocate/122607)._
