Re: size of libboost_thread-gcc-mt.so
Amerio wrote:
After compiling libboost_thread-gcc-mt.so on debian/gcc-2.95.4, this so weights 195kB [...] Without read_write_mutex the size of gcc/release/shared build is 46K. With read_write_mutex the size is 136K.
Wow, that's a difference!
When I comment out explicit template instantiations in that source file, the library is becomes 76K. The comment says explicit instantination are needed to detect syntax errors in templates but those instantination bloat the library.
Would there be any problem if I comment out the explicit instantations in this file for production code ? Are they in there *only* for syntax checking ???
I think that's the case. Adding #ifndef NDEBUG might be a reasonable solution. Note that if you use all of mutex types, you'll still get the code size penalty, but most likely you won't use all of them.
In this case, what about commiting a new rev in the cvs without this ?
That's up to Boost.Thread maintainers.
Note : In my case, 100kB wasted is large enough to be an issue (running low on free space, embedded system)
I understand. - Volodya
participants (1)
-
Vladimir Prus