Memory footprint ?

Amancio Hasty Jr hasty@netcom.com
Sat Jun 12 03:45:00 GMT 1999


Just out of curiosity I wrote a simple c++ hello program.
#include <iostream>
int main() {
 int i;
 for (i = 0; i < 10000 ; i++) {
 cout << "Hello" << "\n";
 }
}
ls -ald /usr/lib/libstd*
-r--r--r-- 1 root wheel 373754 May 7 23:03 /usr/lib/libstdc++.a
lrwxr-xr-x 1 root wheel 14 May 7 23:03 /usr/lib/libstdc++.so -> libstdc++.so.3
-r--r--r-- 1 root wheel 274986 Apr 11 05:26 /usr/lib/libstdc++.so.2
-r--r--r-- 1 root wheel 304674 May 7 23:03 /usr/lib/libstdc++.so.3
-r--r--r-- 1 root wheel 348074 Apr 3 18:28 /usr/lib/libstdc++_p.a
 g++ -o test test.c++ -lstdc++
root 95502 0.0 0.4 1004 468 p0 T 3:36AM 0:00.10 ./test
So the virtual size of the c++ hello program is about 3 times smaller
than the gcj hello program.
	Cheers,
	Amancio


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /