From owner-freebsd-hackers Sat Mar 16 10: 2:53 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from web.cs.ndsu.nodak.edu (web.cs.ndsu.NoDak.edu [134.129.125.7]) by hub.freebsd.org (Postfix) with ESMTP id 5F28C37B419 for ; Sat, 16 Mar 2002 09:58:41 -0800 (PST) Received: (from tinguely@localhost) by web.cs.ndsu.nodak.edu (8.11.4/8.11.4) id g2GHwek39309; Sat, 16 Mar 2002 11:58:40 -0600 (CST) (envelope-from tinguely) Date: Sat, 16 Mar 2002 11:58:40 -0600 (CST) From: mark tinguely Message-Id: <200203161758.g2GHwek39309@web.cs.ndsu.nodak.edu> To: rc27@cse.Buffalo.EDU, tinguely@web.cs.ndsu.nodak.edu Subject: Re: Memory management bug in FreeBSD 4.5 RELEASE Cc: freebsd-hackers@FreeBSD.ORG In-Reply-To: Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > But why does this not happen after i = 32 ? I hardly see any increase in > memory usage after that. I think you are backstoring pages that hold the allocated memory bucket pointers, not the data itself. in the i < 32 you run out of these pages of pointers to buckets before you hit your data size VM limit. After 32 bits, you are allocating bigger, using fewer buckets, and therefore few pointers to the buckets. you hit your data size VM limit before you exceed the back store of these pointers. you do not check the return code from you malloc, so after you exceed your data size VM limit, your program is just spinning, no more pages of pointers will be squeeze out to swap backstore. dirty a byte in your malloc block to push out all of the allocated data. --mark tinguely. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message