Re: STL, memory allocation, and cleanup (gcc 3.0?)
Brian May <bam@debian.org> writes:
> elf <elf@florence.buici.com> writes:
>> Questions include:
>>
>> 1) Is there a gcc 3.0 machine I can use to run this test?
>
> I got compile errors. Sorry, I don't know what is wrong either :-)
Missing 'using namespace std;'.
I get:
lyonesse$ c++ --version
2.95.4
lyonesse$ c++ -o t t.cc
lyonesse$ ./t
map_p
malloc 12 -> 0x804dc58
malloc 960 -> 0x804dc68
free 0x804dc58
map_p
malloc 12 -> 0x804dc58
free 0x804dc58
lyonesse$
lyonesse$ PATH=/usr/local/gcc-3.0/bin:$PATH c++ --version
lyonesse$ PATH=/usr/local/gcc-3.0/bin:$PATH c++ -o t3 t.cc
3.0
lyonesse$ ./t3
map_p
malloc 12 -> 0x804c9a0
free 0x804c9a0
map_p
malloc 12 -> 0x804c9a0
free 0x804c9a0
lyonesse$ g++-3.0 --version
3.0.2
lyonesse$ g++-3.0 -o t302 t.cc
lyonesse$ ./t302
map_p
malloc 12 -> 0x804c530
free 0x804c530
map_p
malloc 12 -> 0x804c530
free 0x804c530
lyonesse$
--
http://www.greenend.org.uk/rjk/
Reply to: