I'm trying to find the equivalent of int myArray[n], except I don't know what n is without input.
Is the following code supposed to work? (I need to use kmalloc instead of malloc).
int * pages;
//... later, after we find out n...
pages = (int *)kmalloc(npages * sizeof(int));
Debugging using gdb, the value pages[0] doesn't seem to be 0 - is this expected?