Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!haven!umbc3!otter.UMBC.EDU!alex From: alex@otter.UMBC.EDU (alex) Newsgroups: comp.sys.att Subject: Re: 3b1 Swap Space (sizeof) Message-ID: <1805@umbc3.UMBC.EDU> Date: 16 Mar 89 20:28:44 GMT References: <914@koko.UUCP> Sender: newspost@umbc3.UMBC.EDU Distribution: usa Lines: 29 In article <914@koko.UUCP>, jb@koko.UUCP (John Birchfield) writes: > How much swap space is provided as a default on the PC7300 (3b1)? > I have a 3b1 with 2 megs of memory (around 1.7 meg available) and > a 67 meg hard disk. I wrote a program to allocate memory until it > failed and it managed to suck up around 2.3 megs before malloc failed. > It seems to me I should be able to do a little better than that. Well, no actually. The 2.3 megs is limited by the process memory map, which only knows about the (virtual) addresses between 0x80000 and 0x300000. processes live in virtual memory, which is mapped like this: 0 -> 80000 Kernal 80000 -> 300000 Process user space 300000 -> 380000 Shared library space 380000 -> 400000 Dynamic Kernal space All processes live in a world like the one above, and the kernal keeps the worlds from conflicting. Although a process doesn't have to use all of the space allocated to it (unused pages don't exist, sortof.), Multiple copies of the VM map exist, and thats what the swap spacve is for. Malloc stops at 2.3 meg because the user world reserves 100K or so for stack space. (2ef000 comes to mind as an upper limit, but I'm not sure) :alex Alex Crain Systems Programmer alex@umbc3.umbc.edu Univ Md Baltimore County nerwin!alex@umbc3.umbc.edu