Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Quite possibly I am misunderstanding, but wouldn't you necessarily get a page fault if you tried to write to an area of memory without first making an entry in a page table (saying that the relevant page is present)?
where are you defining that array? If you do that on the stack (i.e. inside a function) you can run out of stack space and suffer the consequences
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
gcc will put the array on the stack, somewhere within the functions stack frame. The address itself is simple to get:
unsigned int address = (unsigned int) &(array[0]);
nevertheless, its bad practice to create large arrays on the stack in kernel code. Even a set of small arrays can quickly overflow the stack. Using things other than (unsigned) char will only make matters worse by several factors. Unless you know for sure the array will always fit within the stack, do not allocate it there.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]