This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
RE: brk(2) and stack pointer
- From: "Schwarz, Konrad" <konrad dot schwarz at siemens dot com>
- To: "Shaun Jackman" <sjackman at gmail dot com>, "ARM Linux" <linux at arm dot linux dot org dot uk>, "uClinux development list" <uClinux-dev at uclinux dot org>
- Cc: <newlib at sources dot redhat dot com>
- Date: Tue, 2 May 2006 09:36:47 +0200
- Subject: RE: brk(2) and stack pointer
> -----Original Message-----
> From: newlib-owner@sourceware.org
> [mailto:newlib-owner@sourceware.org] On Behalf Of Shaun Jackman
> I'm implementing ARM Linux support for the newlib libc. When
> implementing brk(2), is it reasonable to check that the
> requested end_data_segment is below the stack pointer, or
> should the brk(2) implementation allow for a stack that's
> been allocated below the heap in memory?
I dimly remember that on some Unix variant (perhaps a SysV i386), the
two areas were exchanged (stack just below heap) to reduce the number of
TLB entries required to map both the stack and the data segment.
Regards,
Konrad