在哪里可以找到用于减少 MSVC++/Windows 上的二进制文件大小的分析器?

发布于 2024-12-11 02:48:01 字数 179 浏览 1 评论 0 原文

我有很多使用拨号的用户。另外我还要支付带宽费用。我有兴趣致力于缩小我的应用程序以帮助解决这两个问题;现在它的温度约为 200k,但如果它在 100-150k 范围内那就太好了。

但是,我不知道二进制文件中的哪些结构和位置使用了最大的大小,这使得调整变得困难。

是否存在任何免费的分析器可以帮助解决二进制大小问题?

I've got a lot of users who use dial up. Plus I'm paying for bandwidth. I'm interested in working on getting my app smaller to help on both these concerns; it sits at about 200k right now but it would be nice if it was in the 100-150k range.

However, I have no idea what constructs and locations in my binary are using the most size, which makes this difficult to tune for.

Does any free profiler exist which helps target binary size problems?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

嘿嘿嘿 2024-12-18 02:48:01

Visual Studio 有一个选项可以生成映射文件,该文件将显示分配给程序每个部分的地址。在项目属性中,Linker->Debugging->Generate Map File

Visual Studio has an option to generate a map file which will show you the addresses assigned to each part of your program. In the project properties, Linker->Debugging->Generate Map File.

べ繥欢鉨o。 2024-12-18 02:48:01

当我在嵌入式平台上使用 C/C++ 进行开发时,我曾经能够看到链接器的结果,尤其是 data/rodata/bss/code 部分的大小(请参阅 http://en.wikipedia.org/wiki/Data_segment 如果你不明白这些词)然后我可以深入研究特定区域寻找大元素。

通过谷歌搜索“code size optimization c++”,我发现了一个现有的SO问题:减少C++代码大小这似乎准确地表达了我的意思:“avr-gcc 生成一个映射文件,这样你就可以查看它并看看是什么占用了这么多空间。”

通过谷歌搜索“code size profiler c++”,我找到了有关代码大小的页面:http://www.murrayc.com/blog/permalink/2006/02/15/c-code-size/ 带有有趣的评论,而不是导致DWARF 实用程序也可以做到这一点:http://reality.sgiweb.org/davea /dwarf.html

现在轮到您深入研究这些结果了!祝你好运 !

When I was developping in C/C++ for an embedded platform, I used to be able to see the linker's results, especially the sizes of the data/rodata/bss/code sections (see http://en.wikipedia.org/wiki/Data_segment if you don't understand those words) and then I could dive into a specific area to find the big elements.

By googling "code size optimization c++", I found an existing SO question : Reducing C++ code size which seems to speak exactly of what I mean : "avr-gcc generate a map file so you can look at it and see what is taking up so much space."

By googling "code size profiler c++ " I found this page about code size : http://www.murrayc.com/blog/permalink/2006/02/15/c-code-size/ with an interesting comment than leads to DWARF utilities which could be able to do that too : http://reality.sgiweb.org/davea/dwarf.html

Now it's your turn to dive into those results ! Good luck !

不念旧人 2024-12-18 02:48:01

GCC 提供了一个用于减小大小的选项 (-Os),请参阅 gcc(1)。不确定 Visual Studio 是否提供类似的东西。

我还猜测您已经将压缩的二进制文件发送给您的客户。

GCC provides an option (-Os) for size reduction, see gcc(1). Not sure if Visual Studio provides something similar.

I'm also guessing you're already shipping compressed binaries to your clients.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文