# Is it possible to manually manage the memory without having to use C Standard Library?

**URL:** <https://discourse.julialang.org/t/is-it-possible-to-manually-manage-the-memory-without-having-to-use-c-standard-library/89881>\
**Category:** General Usage\
**Created:** [November 7, 2022, 2:17pm UTC](https://discourse.julialang.org/t/is-it-possible-to-manually-manage-the-memory-without-having-to-use-c-standard-library/89881 "2022-11-07T14:17:56Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![jar1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jar1](https://discourse.julialang.org/u/jar1)\
**Post date:** [November 8, 2022, 6:57pm UTC](https://discourse.julialang.org/t/is-it-possible-to-manually-manage-the-memory-without-having-to-use-c-standard-library/89881/15 "2022-11-08T18:57:38Z")

</div>

> [@Sukera](#):
>
> While disabling GC is an option, writing your code in a way that doesn’t require GC to run much (if at all) by reducing allocations in the first place, is as good as managing memory manually with `malloc` et al.

Data structures often allocate without user control, so this may be hard to achieve in many cases. For instance, in Julia I cannot fill a Dict using a preallocated backing buffer; other languages make this easier.

Another example is that `view`s can allocate without user approval and hurt performance [[RFC/ANN] Restacker.jl: A workaround for the heap-allocated-immutable problem?](https://discourse.julialang.org/t/rfc-ann-restacker-jl-a-workaround-for-the-heap-allocated-immutable-problem/35037).

---

_[View the full topic](https://discourse.julialang.org/t/is-it-possible-to-manually-manage-the-memory-without-having-to-use-c-standard-library/89881)._
