From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 11 23:34:24 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3D80F37B401 for ; Fri, 11 Apr 2003 23:34:24 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 67FCA43FA3 for ; Fri, 11 Apr 2003 23:34:23 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.8/8.12.3) with ESMTP id h3C6YMA7033366; Sat, 12 Apr 2003 00:34:22 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 12 Apr 2003 00:34:11 -0600 (MDT) Message-Id: <20030412.003411.28085408.imp@bsdimp.com> To: gmarco@scotty.masternet.it From: "M. Warner Losh" In-Reply-To: <5.2.0.9.2.20030412080941.016d0978@194.184.65.7> References: <5.2.0.9.2.20030411223601.053eaeb8@194.184.65.7> <20030411.230438.53067150.imp@bsdimp.com> <5.2.0.9.2.20030412080941.016d0978@194.184.65.7> X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: hackers@freebsd.org Subject: Re: gcc iussue or ... ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2003 06:34:24 -0000 OK. Looks like you are creating an array of PacketReader objects. It looks like this array has a non-default constructor for its buffer object (hard to tell for sure, but it appears that way). This is causing it to wind up in the data section. I'm not sure why other systems aren't resulting in this. That seems odd to me. Better if you hack CArray to have, instead of its LB intearnalArray[c] a LB *internalArray and have it new/delete in its ctor/dtor. That likely would reduce the size a *LOT*. template CArray::CArray(std::string s): maxxx(c), error(0), arrayName(s), fn(NULL) { internalArray = new LB[c]; } But using a template for this is code-space wasteful since you get a separate class generated for each size of the array that you want to instantiate. Warner