| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0003643 | VTK | (No Category) | public | 2006-08-21 02:34 | 2006-09-17 07:57 | ||||
| Reporter | wenwu yang | ||||||||
| Assigned To | Mathieu Malaterre | ||||||||
| Priority | low | Severity | minor | Reproducibility | always | ||||
| Status | closed | Resolution | no change required | ||||||
| Platform | OS | OS Version | |||||||
| Product Version | |||||||||
| Target Version | Fixed in Version | ||||||||
| Summary | 0003643: an error in function "void* vtkHeap::AllocateMemory(size_t n)" | ||||||||
| Description | In this function, there are the following codes: #... if ( ! this->Current || (this->Position + n) >= this->Current->Size ) { this->Add(blockSize); } #... I think "(this->Position + n) >= this->Current->Size )" should be replaced by "(this->Position + n) > this->Current->Size )". For example, there is a block with "pos=0, size=5", which can satisfy quest of n<=5 but not n<=4. | ||||||||
| Tags | No tags attached. | ||||||||
| Project | |||||||||
| Type | |||||||||
| Attached Files | |||||||||
| Relationships | |
| Relationships |
| Notes | |
|
(0004944) 2006-09-17 07:55 |
I believe the >= is correct. If pos=0 and n=4 and size=4 then yes we need to reallocate. Because size=4 means we satisfy only n= 0,1,2,3 Closing the bug. Only reopen if you can reproduce in a small test. |
|
(0004945) Mathieu Malaterre (developer) 2006-09-17 07:57 |
I believe the code is correct. Ex: pos=0, n=5 and size=5. Then in this case we need to reallocate, because size=5 means we can only satisfy n= 0,1,2,3,4 but not n=5 Closing bug, reopen if you have an example which exhibit the issue. |
| Notes |
| Issue History | |||
| Date Modified | Username | Field | Change |
| 2011-06-16 13:11 | Zack Galbreath | Category | => (No Category) |
| Issue History |
| Copyright © 2000 - 2018 MantisBT Team |