View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006046 | Community | OCCT:Foundation Classes | public | 2004-06-04 17:47 | 2011-12-15 16:39 |
Reporter | Assigned To | ||||
Priority | normal | Severity | trivial | ||
Status | closed | Resolution | fixed | ||
OS | All | ||||
Fixed in Version | 5.2.0 | ||||
Summary | 0006046: Memory leak in math_StackManager | ||||
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) | ||||
Additional information and documentation updates | Documentation remark, added by abv 2004-07-06 06:42:41: Improvements: 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() | ||||
Tags | No tags attached. | ||||
Test case number | |||||
Date Modified | Username | Field | Change |
---|---|---|---|
2004-06-04 18:00 |
|
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 |
|
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 |
|
Description Updated | |
2011-12-15 16:38 |
|
Additional Information Updated | |
2011-12-15 16:39 |
|
Project | Open CASCADE => Community |