Date: Fri, 05 Jan 1996 12:11:38 +0100 From: Poul-Henning Kamp <phk@critter.tfs.com> Cc: Lars Fredriksen <fredriks@mcs.com>, current@freebsd.org Subject: Re: malloc bug in current? Message-ID: <481.820840298@critter.tfs.com> In-Reply-To: Your message of "Thu, 04 Jan 1996 23:13:39 %2B0100." <1267.820793619@critter.tfs.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?481.820840298>