我目前正在学习汇编语言编程,参考了Kip Irvine的《x86处理器汇编语言》。在第3.4.12节中,作者如下所述:
The
.DATA?
directive declares uninitialized data. When defining a large block of uninitialized data, the.DATA?
directive reduces the size of a compiled program. For example, the following code is declared efficiently:
.data smallArray DWORD 10 DUP(0) ; 40 bytes .data? bigArray DWORD 5000 DUP(?) ; 20,000 bytes, not initialized
The following code, on the other hand, produces a compiled program 20,000 bytes larger:
.data smallArray DWORD 10 DUP(0) ; 40 bytes bigArray DWORD 5000 DUP(?) ; 20,000 bytes
我希望在程序编译后能看到每个版本代码的内存占用情况,这样我就可以亲自看到.data?
的影响,但我不确定如何做到。