Where to set MPLab X PIC32 heap size

In order to set the heap size, use MPLab Harmony 3, click on System in theĀ Project Graph, then open the tree as follows:

and setĀ *Heap Size (bytes)*to the desired value.

Additionally, you need to set the heap size in the project options => XC32 options => xc32-ld options: