two questions about the 3b1
Andy Fyfe
andy at juno.caltech.edu
Sun Aug 19 02:42:11 AEST 1990
In article <24776 at boulder.Colorado.EDU> andersom at tramp.Colorado.EDU (ANDERSON MARC O) writes:
>[1] - Is it just me (or my machine) or does it take all of you 3b1'ers
>a half an hour to compile small stuff with g++? (gnu c++)
The problem might well be "malloc". If you want to see what can happen,
write a program that does
do {
p = malloc(4000);
printf("malloc returns %x\n", p);
} while (p != 0);
and compare this program when linked with libc/shlib to this program linked
with -lmalloc.
At one point I had compiled g++ on my 3b1 (though I got rid of it when I
realized it couldn't compile larger programs for lack of virtual address
space) and I compared the times for the osu version, and the ones I compiled
with the shlib, -lmalloc, and gnu malloc. The difference was, I believe
about an hour versus 4 minutes. (Though the quicker ones got through 3 or
4 fewer source lines before giving me a virtual memory exhausted error.)
If you want to link with -lmalloc and still use the shared library, you
need a program like shcc or the shared ld (that I wrote, but based on shcc)
which you can find in the osu archives as well.
Andy Fyfe andy at csvax.cs.caltech.edu
....!ames!elroy!cit-vax!andy
More information about the Comp.sys.att
mailing list