Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006046Community[OCCT] OCCT:Foundation Classespublic2004-06-04 17:472011-12-15 16:39
Assigned Toabv 
PlatformOSAllOS Version
Product Version 
Target VersionFixed in Version[OCCT] 5.2.0 
Summary0006046: Memory leak in math_StackManager
DescriptionThis bug has been reported on OCC Forum, see 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)
Additional information
and documentation updates
Documentation remark, added by abv 2004-07-06 06:42:41:

Specific (stack-like) memory allocation mechanism used in array classes from
math package (such as math_RealVector) is replaced by usage of standard Open
CASCADE memory manager (from package Standard). This both optimises memory usage
and allows to avoid potential memory leaks (that might happen previously in case
of allocation of big amounts of memory in several arrays simultaneously).
Modified entities:
Package math:

math_StackManager.hxx and .cxx, math_MemoryManagement.hxx: deleted

math_SingleTab.gxx and math_DoubleTab.gxx: calls to math_StackManager functions
replaced by equivalent calls to Standard::Allocate() and Standard::Free()
TagsNo tags attached.
Test case number
Attached Filesgz file icon occ6046-fix-040604.tar.gz (1,416 bytes) 2004-06-04 15:52
? file icon test_bug_stack.tcl (746 bytes) 2004-06-04 15:52
? file icon memory_test.tcl (685 bytes) 2004-06-18 08:41
gz file icon Mytest.cxx.gz (606 bytes) 2004-06-18 12:34
? file icon math_vec.tcl (712 bytes) 2004-06-18 12:36

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2004-06-04 18:00 abv CC => msv
2004-06-07 08:46 bugmaster Assigned To bugmaster => abv
2004-06-07 08:46 bugmaster Status new => assigned
2004-06-07 08:47 bugmaster CC => mkv
2004-06-07 08:47 bugmaster Status assigned => resolved
2004-06-07 12:12 mkv CC => aki
2004-06-18 14:40 bugmaster Status resolved => tested
2004-08-02 18:03 bugmaster Status tested => closed
2004-08-02 18:03 bugmaster Fixed in Version => 5.1.3
2004-08-02 18:03 bugmaster Resolution @0@ => fixed
2011-08-02 11:23 bugmaster Category OCCT:FDC => OCCT:Foundation Classes
2011-12-15 16:38 abv Description Updated View Revisions
2011-12-15 16:38 abv Additional Information Updated View Revisions
2011-12-15 16:39 abv Project Open CASCADE => Community

Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker