From owner-freebsd-current Fri Apr 30 11:36:52 1999 Delivered-To: freebsd-current@freebsd.org Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id 47AF215466 for ; Fri, 30 Apr 1999 11:36:49 -0700 (PDT) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.9.3/8.9.1) with ESMTP id LAA14877; Fri, 30 Apr 1999 11:36:49 -0700 (PDT) (envelope-from jdp@polstra.com) Received: (from jdp@localhost) by vashon.polstra.com (8.9.3/8.9.1) id LAA15989; Fri, 30 Apr 1999 11:36:48 -0700 (PDT) (envelope-from jdp@polstra.com) Message-ID: X-Mailer: XFMail 1.3 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <16614.925496668@critter.freebsd.dk> Date: Fri, 30 Apr 1999 11:36:48 -0700 (PDT) Organization: Polstra & Co., Inc. From: John Polstra To: Poul-Henning Kamp Subject: Re: Any action on PR 10570 ? getting closer to 65K :-( Cc: freebsd-current@FreeBSD.ORG Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Poul-Henning Kamp wrote: > In message , John Polstra writes: >> >>You're being totally unrealistic. You can't create >2^32 of >>_anything_ on an i386 without running out of memory. > > Well, John, you can, the newer ones will address 2^36 bytes of memory > and even a i386 can address 2^32 bytes or 2^35 bits... > > But hair splitting aside, If we're going to split hairs, how about this: To make a reference count exceed 2^32, you need to have >2^32 different pointers pointing to it. A pointer takes 2^2 bytes on the i386. So that's 2^34 bytes of memory you'd need just to store the pointers. You'd better hope you don't get a panic on that mother! It might take quite awhile to write a 16 GByte crash dump. :-) > you certainly cannot create 2^32 routes without having other > significant problems, and while I agree with Rod that the overflow > should be checked, I think it should be done with a KASSERT() if not > just with a comment. A check would be worthwhile to detect bugs in the code (increments without matching decrements). If you want to check for bona-fide overflows, you'd best be prepared to check every counter in the system. John --- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Self-interest is the aphrodisiac of belief." -- James V. DeLong To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message