I am getting segmentation faults when using malloc to allocate 16777216 (16mb) and trying to iterate over that array n times.. I can't seem to find why I am getting segmentation faults..
register *a;
a = malloc(16777216);
int times, i, dummy, timeTaken;
for (times = 0; times < 10000; times++) {
for (i = 0; i < 16777216; i += 1) {
dummy = a[i];
}
}