Hi,
Where do you make your stack spaces?
What address? and how much?
Where do you put your kernel stack ?
Where do you put your kernel stack ?
http://nicesj.com
With the software, What You Think Is What You Get.(WYTIWYG)
With the software, What You Think Is What You Get.(WYTIWYG)
Re: Where do you put your kernel stack ?
A simple way:sjpark wrote:Where do you make your stack spaces?
What address? and how much?
Code: Select all
void* new_kernel_stack = malloc(STACK_SIZE) + STACK_SIZE;
The usual size for a kernel stack is a small multiple of 4k. If you're using the page allocator you can leave a non-present page in front of it to get an exception when the stack overflows.