# Libcanard with static memory

**URL:** <https://forum.opencyphal.org/t/libcanard-with-static-memory/1607>\
**Category:** Libcanard\
**Created:** [March 8, 2022, 10:28am UTC](https://forum.opencyphal.org/t/libcanard-with-static-memory/1607 "2022-03-08T10:28:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jblesa](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/jblesa/32/1046_2.png) [@jblesa](https://forum.opencyphal.org/u/jblesa)\
**Post date:** [March 8, 2022, 10:28am UTC](https://forum.opencyphal.org/t/libcanard-with-static-memory/1607/1 "2022-03-08T10:28:04Z")

</div>

Hello,

I’m trying to integrate the libcanard in my system and I need to use only static memory. I’ve seen that an memory\_allocate and memory\_free mathods are needed in canardInit. My idea was to do a pool or a similar mechanins in order to implement these methods but the memory allocations have diferent sizes (it depends on the payload size, etc).

Do you have any idea of how to implement it? Do you know a similar project?

---

<div class="post-metadata">

**Author:** ![pavel.kirienko](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/pavel.kirienko/32/9_2.png) [@pavel.kirienko](https://forum.opencyphal.org/u/pavel.kirienko)\
**Post date:** [March 8, 2022, 10:29am UTC](https://forum.opencyphal.org/t/libcanard-with-static-memory/1607/2 "2022-03-08T10:29:37Z")

</div>

Yes, this is what you need:

> **[GitHub - pavel-kirienko/o1heap: Constant-complexity deterministic memory...](https://github.com/pavel-kirienko/o1heap)**
>
> Constant-complexity deterministic memory allocator (heap) for hard real-time high-integrity embedded systems - GitHub - pavel-kirienko/o1heap: Constant-complexity deterministic memory allocator (he...
