#13731: Fix libsingular memory management
------------------------------------------------------------------+---------
       Reporter:  nbruin                                          |         
Owner:  rlm     
           Type:  defect                                          |        
Status:  new     
       Priority:  major                                           |     
Milestone:  sage-5.6
      Component:  memleak                                         |    
Resolution:          
       Keywords:                                                  |   Work 
issues:          
Report Upstream:  Reported upstream. Developers acknowledge bug.  |     
Reviewers:          
        Authors:                                                  |     Merged 
in:          
   Dependencies:                                                  |      
Stopgaps:          
------------------------------------------------------------------+---------

Comment (by nbruin):

 Replying to [comment:45 SimonKing]:
 > {{{
 > M src/omalloc/omAllocDecl.h
 > M src/omalloc/omAllocFunc.c
 > M src/omalloc/omMallocSystem.h
 > M src/omalloc/omalloc.c
 > M src/omalloc/pmalloc.h
 > }}}
 > So, first question: Is it correct that all three new files are needed
 for malloc support?

 I didn't make any new files and I only seriously edited things in the
 `omalloc` directory. I may have done some rough hacking in config files to
 ensure that the changes took effect, but I believe that it should be
 possible to do without by someone who know how to pass the correct options
 to configure etc.

 To make the "spkg" I only did a "make clean" and a command to make the dir
 into a spkg. I disabled the "patch application" in spkg-install because
 that made it fail the second time I ran it (which is inconvenient when
 you're editing the package!)

 Note that `malloc_usable_size` for glibc has the same function as
 `malloc_size` on BSD (OSX), so if there's a convenient config option to
 choose between the two you can make the spkg so that it compiles on both.

 The omalloc package is obviously written in such a way that it can build
 in different ways, depending on config options passed at build-time. What
 I did was resurrect one of those options (it didn't provide all the
 functionality that singular needs). It should be possible to adapt my
 changes accordingly. Then it's not essential to conditionally apply the
 patches. It's just that I have zero experience with all the "#ifdef"
 voodoo that seems to be associated with production-quality code.

 I found that "meld" was a very convenient way of browsing the changes I'd
 made (comparing against a pristine directory). It can do a graphically
 displayed diff on an entire tree. It's what I used to make the linux
 package from the OSX one I had.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13731#comment:48>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to