Created
June 16, 2014 20:45
-
-
Save torokati44/57ce81df31a58f98b47e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#define SIZE 4096 | |
int main() | |
{ | |
int *ptr = (int *)malloc(SIZE * SIZE * sizeof(int)); | |
for (int x = 0; x < SIZE; ++x) | |
{ | |
for (int y = 0; y < SIZE; ++y) | |
{ | |
ptr[y*SIZE + x] = 42; // egyik | |
// ptr[x*SIZE + y] = 42; // másik | |
} | |
} | |
free(ptr); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment