Hi,
I am completely new to the world of kernel. So my question may sound trivial to some. But here is my query:
I am completely new to the world of kernel. So my question may sound trivial to some. But here is my query:
It is possible to turn off the heap randomization ( malloced region would return same address in each run)
by doing the following (as a super user):
echo 0 > /proc/sys/kernel/randomize_va_space
Now, my questions are:
a) How is this general mechanism of parameterization implemented in kernel i.e. just by writing something to the file the whole system behavior changes ? eg here when i do a malloc from user space, does the kernel read this file before allocating the same chunk of memory in every run ?
b) After turning off the randomization, I am running my user space program 10,1000,10,000 times and I am doing malloc 5 times. And I am printing out the malloced address every time . So, for 10 runs all the 5 different addresses remain same across runs. But for 1000 and 10,000 runs, I see two unique entries for each malloc ? What could be the reason for this ?
Thanks And Regards,
Vivek Thakkar
Don't get soaked. Take a quick peek at the forecast
with theYahoo! Search weather shortcut.