From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 12 00:28:59 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 A7D8637B401 for ; Sat, 12 Apr 2003 00:28:59 -0700 (PDT) Received: from cecov.masternet.it (cecov.masternet.it [194.184.65.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D18A43FD7 for ; Sat, 12 Apr 2003 00:28:58 -0700 (PDT) (envelope-from gmarco@scotty.masternet.it) Received: from usul.scotty.masternet.it (freebsd.giovannelli.com [194.184.65.139]) by cecov.masternet.it (8.12.9/8.12.9) with ESMTP id h3C7T50Y064298; Sat, 12 Apr 2003 09:29:05 +0200 (CEST) (envelope-from gmarco@scotty.masternet.it) Message-Id: <5.2.0.9.2.20030412092523.019de658@194.184.65.7> X-Sender: gmarco@194.184.65.7 (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Sat, 12 Apr 2003 09:30:27 +0200 To: "M. Warner Losh" From: Gianmarco Giovannelli In-Reply-To: <20030412.003411.28085408.imp@bsdimp.com> References: <5.2.0.9.2.20030412080941.016d0978@194.184.65.7> <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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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 07:28:59 -0000 At 12/04/2003, M. Warner Losh wrote: >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. To me too... Perhaps a private optimization of the Linux folks on their compiler (but it is strange it is the same on a lot of Linux distro, like debian, rh ...) OpenBSD 3.1 (gcc version 2.95.3 20010125 (prerelease)) acts like FreeBSD. Perhaps you should know if NetBSD is like the other *BSD or it is in the other way. >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. Thanks Warner for your tips ... I'll forward immediately to developers team of the emulator to see if we can arrange a viable solutions of this problem. Thanks very much again. Best Regards, Gianmarco Giovannelli , "Unix expert since yesterday" http://www.gufi.org/~gmarco