#5278: On modern fedora 64 installs, sage exists frequently when omalloc thinks
there is no memory left
---------------------+------------------------------------------------------
 Reporter:  was      |        Owner:  cwitty  
     Type:  defect   |       Status:  new     
 Priority:  blocker  |    Milestone:  sage-3.3
Component:  misc     |   Resolution:          
 Keywords:           |  
---------------------+------------------------------------------------------
Comment (by was):

 > Also, if it thinks it's trying to allocate memory using sbrk,
 > it may also think that it can free memory using sbrk, so this
 > might have introduced a memory leak. (If so, it may still be
 > a good temporary fix... memory leaks are better than immediate crashes,
 IMHO.)

 Singular fails on a call to the OM_MALLOC_FROM_SYSTEM macro.  That macro
 is -- as the name suggests -- just supposed to be malloc *not* sbrk.  And,
 if you just look at the source you see:
 {{{
 #define OM_MALLOC_FROM_SYSTEM   OM_MALLOC_MALLOC
 }}}
 and in some places
 {{{
 #define OM_MALLOC_MALLOC   malloc
 }}}
 but in other places:
 {{{
 #define OM_MALLOC_MALLOC   mALLOc
 }}}
 And mALLOc is define internally in various places to be
 {{{
 dlmalloc.h:#define mALLOc               __libc_malloc
 dlmalloc.h:#define mALLOc               malloc
 }}}
 but it never has anything whatever to do with sbrk as far as I can tell.

 I'm actually puzzled since reading the source it seems to me that
 OM_MALLOC_FROM_SYSTEM should just be malloc.  However, obviously it isn't
 or my hack wouldn't fix the problem.  Notice that using
 OM_MALLOC_FROM_SYSTEM instead of malloc again in my hack does *not* fix
 the problem.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5278#comment:5>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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