View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0021711 | Open CASCADE | OCCT:Foundation Classes | public | 2010-04-22 19:38 | 2012-01-10 16:02 |
Reporter | Assigned To | ||||
Priority | normal | Severity | trivial | ||
Status | closed | Resolution | fixed | ||
OS | All | ||||
Fixed in Version | 6.4.0 | ||||
Summary | 0021711: Assignment operator for maps in NCollection unnecessarily increases buckets array | ||||
Description | Map data structures in NCollection share common bug: in operator =, the target map is resized using number of buckets of source map instead of its actual content (extent). This leads to the fact that when map is copied, the resulting map has buckets re-allocated to the next threshold value; this leads to unnecessary allocation of memory. The test executable demonstrating this behavior is attached. Its output on current OCCT is: :KAS:dev:abvdoc> testmap Testing NCollection_Map Initial number of buckets: 101 Copy 0000002: number of buckets = 2003 Copy #4: number of buckets = 10007 Copy #6: number of buckets = 37003 Copy 0000008: number of buckets = 65003 Copy #10: number of buckets = 209953 Copy #12: number of buckets = 995329 Copy 0000014: number of buckets = 995329 Copy 0000016: number of buckets = 995329 Copy 0000018: number of buckets = 995329 Copy 0000020: number of buckets = 995329 Testing TCollection_Map Initial number of buckets: 101 Copy 0000002: number of buckets = 101 Copy #4: number of buckets = 101 Copy #6: number of buckets = 101 Copy 0000008: number of buckets = 101 Copy #10: number of buckets = 101 Copy #12: number of buckets = 101 Copy 0000014: number of buckets = 101 Copy 0000016: number of buckets = 101 Copy 0000018: number of buckets = 101 Copy 0000020: number of buckets = 101 Note that maps in TCollection does not suffer from such problem. | ||||
Additional information and documentation updates | Documentation remark, added by ABV 2010-08-03 14:05:28: Improvements: The bug in copy function (operator =) of all map data structures in NCollection has been fixed: the target map was resized using number of buckets of source map instead of its actual content (extent). This led to unnecessary growth of allocated memory whenever map was copied. | ||||
Tags | No tags attached. | ||||
Test case number | |||||
Date Modified | Username | Field | Change |
---|---|---|---|
2010-04-28 19:52 | bugmaster | Assigned To | bugmaster => abv |
2010-04-28 19:52 | bugmaster | Status | new => assigned |
2010-04-28 19:52 | bugmaster | Status | assigned => tested |
2010-07-28 16:12 | bugmaster | Status | tested => verified |
2011-08-02 11:23 | bugmaster | Category | OCCT:FDC => OCCT:Foundation Classes |
2012-01-10 16:02 |
|
Description Updated | |
2012-01-10 16:02 |
|
Additional Information Updated |