From owner-freebsd-bugs Fri Feb 16 12:49:59 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id MAA04411 for bugs-outgoing; Fri, 16 Feb 1996 12:49:59 -0800 (PST) Received: from halloran-eldar.lcs.mit.edu (halloran-eldar.lcs.mit.edu [18.26.0.159]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id MAA04403 for ; Fri, 16 Feb 1996 12:49:56 -0800 (PST) Received: by halloran-eldar.lcs.mit.edu; (5.65/1.1.8.2/19Aug95-0530PM) id AA21188; Fri, 16 Feb 1996 15:49:42 -0500 Date: Fri, 16 Feb 1996 15:49:42 -0500 From: "Garrett A. Wollman" Message-Id: <9602162049.AA21188@halloran-eldar.lcs.mit.edu> To: Steven Wallace Cc: freebsd-bugs@freebsd.org Subject: malloc() prob in 2.1R? In-Reply-To: <199602162007.MAA11841@newport.ece.uci.edu> References: <199602162007.MAA11841@newport.ece.uci.edu> Sender: owner-bugs@freebsd.org Precedence: bulk < said: > 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! Not at all surprising. The memory allocator in 2.1 allocates memory for the next power of two greater than or equal to (size + malloc_overhead). So, the next power of two greater than or equal to (4096 + a_small_amount) is 8192. -current uses a different allocator and doesn't over-allocate in this way. -GAWollman -- Garrett A. Wollman | Shashish is simple, it's discreet, it's brief. ... wollman@lcs.mit.edu | Shashish is the bonding of hearts in spite of distance. Opinions not those of| It is a bond more powerful than absence. We like people MIT, LCS, ANA, or NSA| who like Shashish. - Claude McKenzie + Florent Vollant