エキスパートCプログラミングp183より
#include
#include
int main(){
int Mb=0;
while (malloc(1<<20)) ++Mb;
printf("Allocated %d Mb total\n",Mb);
return 0;
}
% cc -xarch=v9 tmal2.c ; a.out
Allocated 9023 Mb total
% cc tmal2.c ; a.out
Allocated 2042 Mb total
% gcc tmal2.c ; a.out
Allocated 2042 Mb total