From owner-cvs-sbin Mon Mar 31 08:43:22 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id IAA26152 for cvs-sbin-outgoing; Mon, 31 Mar 1997 08:43:22 -0800 (PST) Received: (from peter@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id IAA26145; Mon, 31 Mar 1997 08:43:20 -0800 (PST) Date: Mon, 31 Mar 1997 08:43:20 -0800 (PST) From: Peter Wemm Message-Id: <199703311643.IAA26145@freefall.freebsd.org> To: CVS-committers, cvs-all, cvs-sbin Subject: cvs commit: src/sbin/newfs mkfs.c Sender: owner-cvs-sbin@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk peter 97/03/31 08:43:20 Modified: sbin/newfs mkfs.c Log: Fix the mount_mfs case from the last cleanup. The code was (ab)using it's internal malloc() implementation to try and avoid overstepping it's resource limits (yuk!). Remain using libc's malloc(), but check the resource limits right before trying to malloc the ramdisk space and leave some spare memory for libc. In Andrey's words, the internal malloc was "true evil".. Among it's sins is it's ability to allocate less memory than asked for and still return success. stdio would just love that. :-) Reviewed by: ache Revision Changes Path 1.17 +17 -1 src/sbin/newfs/mkfs.c