Microchip Technology SW006023-2N Data Sheet

Page of 238
MPLAB
®
 XC32 C/C++ COMPILER
USER’S GUIDE
 2012 Microchip Technology Inc.
DS51686E-page 109
Chapter 7.  Memory Allocation and Access
7.1
INTRODUCTION
There are two broad groups of RAM-based variables: auto/parameter variables, which 
are allocated to some form of stack, and global/static variables, which are positioned 
freely throughout the data memory space. The memory allocation of these two groups 
is discussed separately in the following sections.
7.2
ADDRESS SPACES
Unlike the 8- and 16-bit PIC devices, the PIC32 has a unified programming model. 
PIC32 devices provide a single 32-bit wide address space for all code, data, peripher-
als and Configuration bits.
Memory regions within this single address space are designated for different purposes; 
for example, as memory for instruction code or memory for data. Internally the device 
uses separate buses
1
 to access the instructions and data in these regions, thus allow-
ing for parallel access. The terms program memory and data memory, which are used 
on the 8- and 16-bit PIC devices, are still relevant on PIC32 devices, but the smaller 
parts implement these in different address spaces.
All addresses used by the CPU within the device are virtual addresses. These are 
mapped to physical addresses by the system control processor (CP0).
1.The device can be considered a Harvard architecture in terms of its internal bus arrangement.