From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Cox Subject: Re: the memory model being used in elks? Date: Sun, 10 May 2015 21:27:44 +0100 Message-ID: <20150510212744.60ca87d4@www.etchedpixels.co.uk> References: <20150508201433.GJ8197@example.net> <20150509180333.507d7482@lxorguk.ukuu.org.uk> <20150509174703.GK8197@example.net> <554E48F4.5010406@jodybruchon.com> <20150509183836.GL8197@example.net> <20150510184027.GN8197@example.net> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150510184027.GN8197@example.net> Sender: linux-8086-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" To: u-vpoa@aetey.se Cc: Juan Perez-Sanchez , linux-8086 On Sun, 10 May 2015 20:40:27 +0200 u-vpoa@aetey.se wrote: > On Sun, May 10, 2015 at 10:31:38AM -0500, Juan Perez-Sanchez wrote: > > Compile with flags > > > > -i -H E000 > > > > Flag H controls the size of BSS. > > I see, a minix-like static allocation (I'm guessing this is needed > because ELKS does not yet handle overlapping segments between different > processes so it does not want to allocate a whole segment to each process > per default?). Classic Unix defines the memory map as <--- Data ---><--- BSS ---> | <--- Space ---> | <--- Stack --- > Where the upper divide is SP and the lower one is set by brk() or sbrk(). The space in the middle doesn't all really exist if you have an MMU with any kind of sane paging system. If you have support built for ELKS pattern binaries then you can do resizing at runtime as they are laid out to allow the bss to extend Alan