From owner-freebsd-bugs Fri Feb 16 12:59:13 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id MAA05323 for bugs-outgoing; Fri, 16 Feb 1996 12:59:13 -0800 (PST) Received: (from dyson@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id MAA05317 Fri, 16 Feb 1996 12:59:12 -0800 (PST) From: John Dyson Message-Id: <199602162059.MAA05317@freefall.freebsd.org> Subject: Re: malloc() prob in 2.1R? To: swallace@ece.uci.edu (Steven Wallace) Date: Fri, 16 Feb 1996 12:59:11 -0800 (PST) Cc: freebsd-bugs@freebsd.org In-Reply-To: <199602162007.MAA11841@newport.ece.uci.edu> from "Steven Wallace" at Feb 16, 96 12:07:41 pm X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-bugs@freebsd.org Precedence: bulk > > > I just noticed something bizzar on my 2.1R system. > After running out of swap space quicker than I expected, > I tried running a testswap program that simply continues to malloc > a page (4K) of memory until it dies. At any point I suspend the program > and check it with ps, ps reports a VSZ twice which I have allocated > with malloc! On my 2.2-current (as of 11/21), it reports exactly > what I have allocated. > > Is there some VM bug in 2.1R that went unnoticed or a malloc bug in 2.1R? > The BSD malloc uses lots more VM space than it needs to. The unused pages in the VM space wont' get allocated, but there is additional overhead when the space is sparse like that. PHK has developed an improved malloc for -current, and if you want to try a malloc with better perf in many ways than BSD on 2.1, try -lgnumalloc. John Dyson dyson@freebsd.org