MantisBT
Mantis Bug Tracker Workflow

View Revisions: Issue #6046 All Revisions ] Back to Issue ]
Summary 0006046: Memory leak in math_StackManager
Revision 2011-12-15 16:38 by abv
Description This bug has been reported on OCC Forum, see thread 5991:
http://www.opencascade.org/org/forum/thread_5991 [^]

The problem actually exists, but it is more complicated as it seems: the
mentioned method ReallocateStack is completely wrong by initial intent -- it
reallocates memory moving it to another address, while the pointers to original
memory location are still living (both outside and inside the stack).

It seems that this 'stack manager' has been created in attempt to optimise
memory allocation yet before creation of OCC memory manager. It is better just
to remove it and replace calls to it (found just in two places in the same
package: math_SingleTab and math_DoubleTab) to either standard malloc/free, or
to OCC MAllocate/MFree.

Also file math_MemoryManagement.hxx is not used and should be removed

The fix follows (see attachments)
Revision 2006-06-29 09:15 by abv
Description This bug has been reported on OCC Forum, see thread 5991:
http://www.opencascade.org/org/forum/thread_5991 [^]

The problem actually exists, but it is more complicated as it seems: the
mentioned method ReallocateStack is completely wrong by initial intent -- it
reallocates memory moving it to another address, while the pointers to original
memory location are still living (both outside and inside the stack).

It seems that this 'stack manager' has been created in attempt to optimise
memory allocation yet before creation of OCC memory manager. It is better just
to remove it and replace calls to it (found just in two places in the same
package: math_SingleTab and math_DoubleTab) to either standard malloc/free, or
to OCC MAllocate/MFree.

Also file math_MemoryManagement.hxx is not used and should be removed

The fix follows (see attachments)


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker