Dependencies:   xc.h
Processor:      PIC32MZ2048ECH064
Complier:       XC32 v1.32 
Debugger:       Simulator 
#include <stdio.h>
#include <xc.h>
void main(void) 
    char* buffer = __pic32_alloc_coherent(1024);  // Allocate space in uncached memory, and return the pointer to this memory
    if (buffer) {
           printf(“Memory allocated\n”);    
    else {    // If no memory is available, and no memory allocated
       printf(“Memory not available\n”);
    if (buffer) {
        __pic32_free_coherent(buffer);  // Free the memory
    printf(“Allocated memory is made free”);