From owner-freebsd-bugs Thu Jul 10 00:06:56 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id AAA11385 for bugs-outgoing; Thu, 10 Jul 1997 00:06:56 -0700 (PDT) Received: from critter.dk.tfs.com ([140.145.230.252]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id AAA11380 for ; Thu, 10 Jul 1997 00:06:50 -0700 (PDT) Received: from critter.dk.tfs.com (localhost [127.0.0.1]) by critter.dk.tfs.com (8.8.6/8.8.5) with ESMTP id IAA06463; Thu, 10 Jul 1997 08:17:01 +0200 (CEST) To: David Greenman cc: freebsd-bugs@FreeBSD.ORG From: Poul-Henning Kamp Subject: Re: kern/4070: cannot access over 64MB memory In-reply-to: Your message of "Wed, 09 Jul 1997 15:00:01 PDT." <199707092200.PAA14688@hub.freebsd.org> Date: Thu, 10 Jul 1997 08:17:01 +0200 Message-ID: <6461.868515421@critter.dk.tfs.com> Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > Malloc is kind of strange when it comes to allocating the virtual address > space and will consume up to twice the amount requested. Well, true, but that is not the case here: The maximum overallocation for any one call to malloc(bytes) is: min(pagesize-1, bytes*2-1) This is because when "bytes" is > pagesize/2, an integral number of pages is allocated, otherwise a 2^n size chunk is allocated. -- Poul-Henning Kamp | phk@FreeBSD.ORG FreeBSD Core-team. http://www.freebsd.org/~phk | phk@login.dknet.dk Private mailbox. whois: [PHK] | phk@tfs.com TRW Financial Systems, Inc. Power and ignorance is a disgusting cocktail.