[uClinux-dev] brk(2) and stack pointer

Jamie Lokier jamie@shareable.org
Fri Apr 28 20:03:00 GMT 2006


Shaun Jackman wrote:
> >What's the reason for the check?
> For the typical case where the heap is growing up towards the stack,which 
> is growing down, I wanted to check that the requested heaphasn't collided 
> with the stack.

You could still check that the new block doesn't contain the stack pointer.

That catches the heap growing into the stack, but not the stack
growing into the heap.

-- Jamie



More information about the Newlib mailing list