gcc iussue or ... ?
Gianmarco Giovannelli
gmarco at scotty.masternet.it
Sat Apr 12 00:28:59 PDT 2003
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
More information about the freebsd-hackers
mailing list