Kernel stack overflow

(Abishek Ramasubramanian) #1

My partner and I are working on ASST3.3. When running bigfork, we get the following error message:

Brijesh and Zach suggested that we could be running into an indirect recursive loop, but we were not able to locate any place where this might occur in our code. Any help on this would be greatly appreciated.

(Geoffrey Challen) #2

When running in the kernel you have a single-page (4K) fixed-size stack. Recursion is one way to blow it, but the more common way is to allocate a large local variable:

int foo() {
  int huge[8192];

(Carl Nuessle) #3

One case that can cause recursion is getting memory in the get-memory routine path. Say, your get_a_page() routine calls kmalloc(). Where does kmalloc() go to get memory? => eventually, back to get_a_page().