阅读背景:

包括促进功能。hpp,不使用它,将二进制文件的大小增加200k。为什么?

来源:互联网 

I'm working on an embedded processor so binary size matters a lot. I am trying to avoid using the standard library. I'd like to use std::function, however. I extracted "function.hpp" from boost, and I'm trying to use that, but simply including function.hpp increases the size of my binary 200k, which makes it bigger than my processor can accept. If I include the standard library, it only increases my binary 60k. I can't figure it out, if I'm not using any of the templates yet, there shouldn't be any overhead. And even if I do, I can't imagine it's 200k worth of code. I'm using gcc 4.7, and I've disabled debugging info from what I can tell "-g0" and turned on optimizations "-O2".I'm working on an embedded processor so binary




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: