On Apr 4, 2008, at 9:27 PM, Michael.Abshoff wrote:
> Robert Bradshaw wrote:
>> Hi All.
>>
>> Cython 0.9.6.13 is available for download at http://cython.org or
>> http://pypi.python.org/pypi/Cython/0.9.6.13. The main improvements to
>> this release are
>>
>> - C++ exception handling (Felix Wu)
>> - (optional) C line numbers in Errors (Gary Furnish)
>> - some circular cimports (Gary Furnish)
>> - (experimental) parse tree transforms (Dag Seljebotn)
>> - struct member functions automatically coerced to function pointers
>> (for easier C++ wrapping)
>> - no unneeded incref on function arguments
>> - allow single-character ascii literals to be used as ints (no need
>> for c'x' notation)
>> - better support for using arrays as pointers
>>
>> There are also several bugfixes and pre-Py3K changes due to Robert
>> Bradshaw, Stefan Behnel, Jum Kleckner, and Chris Perkins. The
>> compiler and package repositories have been merged, and while all
>> history has been preserved it is a completely new repository now.
>>
>> We are looking forward to lots of development at Sage Developer Days
>> 1 (http://wiki.sagemath.org/dev1) and hopefully some Google Summer of
>> Code projects over the summer.
>>
>>   - Robert
>
> Hi guys,
>
> Sage with the new Cython has a lot of leaks exposed by valgrind:
>
> ==9372== LEAK SUMMARY:
> ==9372==    definitely lost: 232,533 bytes in 3,757 blocks.
>
> Those leaks are all considered "possibly lost" or "still reachable"  
> with
> Cython 0.9.6.12, so it seems to be mostly an accounting issue
> [valgrind's accounting of possibly lost vs. still reachable vs.
> definitely lost can vary depending on other leaks, but I will spare  
> you
> the details here].

To clarify, it doesn't sound like there are significantly many new  
leaks, but the accounting has shifted around a bit.

> While we have looked into this in the past at various Sage Days it  
> might
> be a good idea to put this on the agenda for Dev Day 1 since this
> currently adds massive noise to the interesting bits when looking for
> memleaks in Sage. I can add a suppression file, but I would consider
> that only a last resort.

Perhaps one thing that might cut down the noise is disabling  
intern_names and cache_builtins in

http://hg.cython.org/cython/file/b68682070c8e/Cython/Compiler/Options.py

(Also, on that note, I think we want to ship c_line_in_traceback = 1  
with Sage.) I also made the default cleanup level 0 again, as it was  
causing Segfaults in peoples code. Here is the issue:

---- a.pyx ----

import b
foo = b.B()

---- b.pyx ---

class B:
     def __del__(self):
         print "hi"

----

Now B *cannot* be deleted after the module b is cleaned up because  
the string "hi" may have been deallocated (sometimes it seems to  
still work, e.g. if the memory involved hasn't been dirtied by  
anything else).

There's also the issue of the dictionaries that don't go away when  
they should.

- Robert

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to