# Pynq & maximum allocatable memory (CMA)

**URL:** <https://discuss.pynq.io/t/pynq-maximum-allocatable-memory-cma/1593>\
**Category:** Support\
**Created:** [July 30, 2020, 1:29pm UTC](https://discuss.pynq.io/t/pynq-maximum-allocatable-memory-cma/1593 "2020-07-30T13:29:19Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![Aled\_Cuda](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/aled_cuda/32/4709_2.png) [@Aled\_Cuda](https://discuss.pynq.io/u/Aled_Cuda)\
**Post date:** [May 27, 2023, 3:27am UTC](https://discuss.pynq.io/t/pynq-maximum-allocatable-memory-cma/1593/11 "2023-05-27T03:27:17Z")

</div>

I decided to run this down after working on [https://discuss.pynq.io/t/how-to-allocate-pl-ddr4-on-rfsoc4x2-in-pynq-3-0-1/5586/8](https://discuss.pynq.io/t/how-to-allocate-pl-ddr4-on-rfsoc4x2-in-pynq-3-0-1/5586/8) given that they’re notionally related.

This patch [Add hook for EmbeddedDevice XRT devices to allow moving the PSDDR memory region by ld-cd · Pull Request #1424 · Xilinx/PYNQ · GitHub](https://github.com/Xilinx/PYNQ/pull/1424) allows you to put the default allocator in a reserved memory region. Alternatively you can add an `.xclbin` file alongside your bitstream which has both the PSDDR region at 0 and another region pointing to your reserved region and whenever you want to allocate something in your reserved region specify it manually as a target.

---

_[View the full topic](https://discuss.pynq.io/t/pynq-maximum-allocatable-memory-cma/1593)._
