On Apr 12, 9:44 pm, parisse <[EMAIL PROTECTED]> wrote:

<SNIP>

Hi Bernard,

> >  * unknown memory leak issues [Did you ever run valgrind? If not I
> > would highly recommend it]
>
> yes
<SNIP>

Ok. What about the following then?

[EMAIL PROTECTED] bin]$ /usr/local/valgrind-3.3.0/bin/valgrind --
tool=memcheck --leak-resolution=high ./icas
==14493== Memcheck, a memory error detector.
==14493== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et
al.
==14493== Using LibVEX rev 1804, a library for dynamic binary
translation.
==14493== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==14493== Using valgrind-3.3.0, a dynamic binary instrumentation
framework.
==14493== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et
al.
==14493== For more details, rerun with: -v
==14493==
Using locale /usr/local/share/locale/
Help file aide_cas not found
// Unable to find keyword file doc/en/keywords
Added 0 synonyms
Welcome to giac readline interface
(c) 2001,2007 B. Parisse & others
Homepage http://www-fourier.ujf-grenoble.fr/~parisse/giac.html
Released under the GPL license 2.0 or above
See http://www.gnu.org for license details
-------------------------------------------------
Press CTRL and D simultaneously to finish session
Type ?commandname for help
0>> 1+1
2

// Time 0.33
1>> ==14493==
==14493== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 23 from
1)
==14493== malloc/free: in use at exit: 14,896,431 bytes in 1,615
blocks.
==14493== malloc/free: 7,838 allocs, 6,223 frees, 15,279,507 bytes
allocated.
==14493== For counts of detected errors, rerun with: -v
==14493== searching for pointers to 1,615 not-freed blocks.
==14493== checked 6,629,940 bytes.
==14493==
==14493== LEAK SUMMARY:
==14493==    definitely lost: 6,888 bytes in 685 blocks.
==14493==      possibly lost: 6,886 bytes in 166 blocks.
==14493==    still reachable: 14,882,657 bytes in 764 blocks.
==14493==         suppressed: 0 bytes in 0 blocks.
==14493== Rerun with --leak-check=full to see details of leaked
memory.

In detail:

==14568== LEAK SUMMARY:
==14568==    definitely lost: 4,184 bytes in 166 blocks.
==14568==    indirectly lost: 2,704 bytes in 519 blocks.
==14568==      possibly lost: 6,886 bytes in 166 blocks.
==14568==    still reachable: 14,882,657 bytes in 764 blocks.
==14568==         suppressed: 0 bytes in 0 blocks.

The big one is likely the pari stack:

==14576== 10,000,000 bytes in 1 blocks are still reachable in loss
record 1,229 of 1,229
==14576==    at 0x4C9C828: malloc (vg_replace_malloc.c:207)
==14576==    by 0x8BF887A: (within /home/mabshoff/usr/local/bin/icas)

There are plenty of

==14576== 81,940 bytes in 5 blocks are still reachable in loss record
1,227 of 1,229
==14576==    at 0x4C9D004: operator new(unsigned) (vg_replace_malloc.c:
224)
==14576==    by 0x807A2D1: (within /home/mabshoff/usr/local/bin/icas)
==14576==    by 0x9E343A: pthread_once (in /lib/libpthread-2.5.so)
==14576==    by 0x807D810: (within /home/mabshoff/usr/local/bin/icas)
==14576==    by 0x84DEF97: (within /home/mabshoff/usr/local/bin/icas)
==14576==    by 0x85DDEB6: (within /home/mabshoff/usr/local/bin/icas)
==14576==    by 0x8D6B274: (within /home/mabshoff/usr/local/bin/icas)
==14576==    by 0x805374C: (within /home/mabshoff/usr/local/bin/icas)
==14576==    by 0x8D6B1BA: (within /home/mabshoff/usr/local/bin/icas)
==14576==    by 0x8ACD90: (below main) (in /lib/libc-2.5.so)

or things like:

==14576== 25 bytes in 1 blocks are possibly lost in loss record 826 of
1,229
==14576==    at 0x4C9D004: operator new(unsigned) (vg_replace_malloc.c:
224)
==14576==    by 0x4D52BFA: std::string::_Rep::_S_create(unsigned,
unsigned, std::allocator<char> const&) (in /usr/lib/libstdc++.so.
6.0.8)
==14576==    by 0x4D539F4: (within /usr/lib/libstdc++.so.6.0.8)
==14576==    by 0x4D53C06: std::string::string(char const*,
std::allocator<char> const&) (in /usr/lib/libstdc++.so.6.0.8)
==14576==    by 0x85D5135: (within /home/mabshoff/usr/local/bin/icas)
==14576==    by 0x8D6B274: (within /home/mabshoff/usr/local/bin/icas)
==14576==    by 0x805374C: (within /home/mabshoff/usr/local/bin/icas)
==14576==    by 0x8D6B1BA: (within /home/mabshoff/usr/local/bin/icas)
==14576==    by 0x8ACD90: (below main) (in /lib/libc-2.5.so)

Now, I used the latest binary and didn't build from source. A couple
observations:

 * you stick your own copy libstdc++.so.6 into $GIAC/lib and I
consider that a bad, bad idea since libstdc++.so depends on kernel
headers.
 * icas as well as xcas are both statically linked against pari,
CoCoALib and some other mathematical libs. Since both of them link
against those libraries why not link dynamically and save the space?
 * Note that the interface says "Released under the GPL license 2.0 or
above" and not GPL V3

Cheers,

Michael
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to