Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Apr 2003 09:30:27 +0200
From:      Gianmarco Giovannelli <gmarco@scotty.masternet.it>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        hackers@freebsd.org
Subject:   Re: gcc iussue or ... ?
Message-ID:  <5.2.0.9.2.20030412092523.019de658@194.184.65.7>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <const int c, class LB> CArray<c, LB>::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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5.2.0.9.2.20030412092523.019de658>