From owner-freebsd-current Fri Jan 5 03:11:45 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id DAA29652 for current-outgoing; Fri, 5 Jan 1996 03:11:45 -0800 (PST) Received: from tfs.com (tfs.com [140.145.250.1]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id DAA29647 for ; Fri, 5 Jan 1996 03:11:42 -0800 (PST) Received: from critter.tfs.com by tfs.com (smail3.1.28.1) with SMTP id m0tYA3g-0003wFC; Fri, 5 Jan 96 03:11 PST Received: from localhost.tfs.com (localhost.tfs.com [127.0.0.1]) by critter.tfs.com (8.6.12/8.6.12) with SMTP id MAA00483; Fri, 5 Jan 1996 12:11:39 +0100 X-Authentication-Warning: critter.tfs.com: Host localhost.tfs.com didn't use HELO protocol cc: Lars Fredriksen , current@freebsd.org Subject: Re: malloc bug in current? In-reply-to: Your message of "Thu, 04 Jan 1996 23:13:39 +0100." <1267.820793619@critter.tfs.com> Date: Fri, 05 Jan 1996 12:11:38 +0100 Message-ID: <481.820840298@critter.tfs.com> From: Poul-Henning Kamp Sender: owner-current@freebsd.org Precedence: bulk Lars can you try this patch instead ? Index: malloc.c =================================================================== RCS file: /home/ncvs/src/lib/libc/stdlib/malloc.c,v retrieving revision 1.8 diff -u -r1.8 malloc.c --- malloc.c 1995/12/18 12:03:54 1.8 +++ malloc.c 1996/01/05 07:44:40 @@ -362,7 +362,7 @@ * Allocate a number of pages from the OS */ static caddr_t -map_pages(int pages, int update) +map_pages(int pages) { caddr_t result,tail; @@ -379,7 +379,7 @@ last_index = ptr2index(tail) - 1; malloc_brk = tail; - if (update && last_index >= malloc_ninfo && !extend_pgdir(last_index)) + if ((last_index + 1) >= malloc_ninfo && !extend_pgdir(last_index)) return 0;; return result; @@ -664,7 +664,7 @@ /* Map new pages */ if (!p) - p = map_pages(size,1); + p = map_pages(size); if (p) { -- Poul-Henning Kamp | phk@FreeBSD.ORG FreeBSD Core-team. http://www.freebsd.org/~phk | phk@login.dknet.dk Private mailbox. whois: [PHK] | phk@ref.tfs.com TRW Financial Systems, Inc. Future will arrive by its own means, progress not so.