How to divide a memory space on DDR.

Recently,I work with a FPGA+TX2 platform.FPGA is used to provide image data with PCIE,so I need a pyhsical memory to save data on TX2.I am wonder how to find a safe and idle physical memory,then I can give its address to FPGA.
My idea is :
1.As the system startup a piece of memory will divide which will not be used by other process after that.
2.After the system startup I can find a safe and idle memory.
However,I do not know how to realize these two methods and have no idea if these two methods can do that.

Please use DMA APIs to allocate memory in system memory to which your FPGA based PCIe end point can do read and writes.

Dear Chay1991,

You can reserve memory in the DTS using no-map attribute and provide the base address to FPGA. You have to make sure the memory chunk you require is contiguous. You can find available memory chunks in /proc/iomem.

Use command:

cat /proc/iomem | grep System