11.3.3.7 heap

The heap attribute specifies that a section should be designated for use by the C run-time library for dynamic memory allocation. The heap must always be allocated in local data memory (address range 0x0 to 0x7FFE on dsPIC33E/C/F architectures). The following attributes may be used in conjunction with heap and will further specify the allocation:

  • address() specifies an absolute address
  • xmemory specifies X address space, which includes all of region data below the address __YDATA_BASE as defined in the linker script
  • ymemory specifies Y address space, which includes all of region data above the address __YDATA_BASE as defined in the linker script
  • align() specifies alignment of the section starting address