Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mpfr leak in RealField (from matrix/strassen.pyx) #532

Closed
sagetrac-mabshoff mannequin opened this issue Aug 30, 2007 · 1 comment
Closed

mpfr leak in RealField (from matrix/strassen.pyx) #532

sagetrac-mabshoff mannequin opened this issue Aug 30, 2007 · 1 comment
Assignees

Comments

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Aug 30, 2007

From Sage 2.8.3rc3:

==24738== 16 bytes in 1 blocks are possibly lost in loss record 525 of 2,259
==24738==    at 0x4A05809: malloc (vg_replace_malloc.c:149)
==24738==    by 0x165368BD: mpfr_init2 (in /tmp/Work2/sage-2.8.3.rc3/devel/sage-main/build/sage/rings/real_mpfr.so)
==24738==    by 0x16503260: __pyx_f_9real_mpfr_9RealField___init__ (real_mpfr.c:1410)
==24738==    by 0x45A321: type_call (typeobject.c:436)
==24738==    by 0x4156A2: PyObject_Call (abstract.c:1860)
==24738==    by 0x47DB71: PyEval_CallObjectWithKeywords (ceval.c:3433)
==24738==    by 0x18836269: initpolynomial_element (polynomial_element.c:21764)
==24738==    by 0x49F762: _PyImport_LoadDynamicModule (importdl.c:53)
==24738==    by 0x49D63E: import_submodule (import.c:2394)
==24738==    by 0x49DB11: load_next (import.c:2214)
==24738==    by 0x49DD6E: import_module_level (import.c:2002)
==24738==    by 0x49E1A4: PyImport_ImportModuleLevel (import.c:2066)

Cheers,

Michael

Component: memleak

Issue created by migration from https://trac.sagemath.org/ticket/532

@sagetrac-mabshoff sagetrac-mabshoff mannequin added this to the sage-2.9 milestone Aug 30, 2007
@sagetrac-mabshoff sagetrac-mabshoff mannequin added t: bug labels Aug 30, 2007
@sagetrac-mabshoff sagetrac-mabshoff mannequin self-assigned this Aug 30, 2007
@sagetrac-mabshoff sagetrac-mabshoff mannequin modified the milestones: sage-2.9, sage-2.8.4 Sep 1, 2007
@sagetrac-mabshoff sagetrac-mabshoff mannequin changed the title mkfr leak in RealField (from matrix/strassen.pyx) mpfr leak in RealField (from matrix/strassen.pyx) Sep 6, 2007
@williamstein williamstein modified the milestones: sage-2.8.4, sage-2.9 Sep 7, 2007
@sagetrac-cwitty
Copy link
Mannequin

sagetrac-cwitty mannequin commented Oct 11, 2007

comment:5

This is because polynomial_element.pyx has a global (well, module-level) variable holding a RealField:

RR = RealField()

(As a module-level variable, this never gets freed.)

Each RealField holds two RealNumbers (._zero_element and ._one_element), so they never get freed either.

@sagetrac-cwitty sagetrac-cwitty mannequin closed this as completed Oct 11, 2007
@sagetrac-mabshoff sagetrac-mabshoff mannequin removed this from the sage-2.9 milestone Oct 11, 2007
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant