Bug 19025 – Better definition of deallocateAll in ContiguousFreeList

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-06-25T19:52:05Z
Last change time
2024-12-01T16:33:59Z
Assigned to
No Owner
Creator
mmcomando
Moved to GitHub: phobos#10343 →

Comments

Comment #0 by mmcomando — 2018-06-25T19:52:05Z
Deallocation of all memory in ContiguousFreeList can be done without using parent.deallocateAll. Buffer used by ContiguousFreeList is always allocated by parent so deallocateAll it should be enought to implement deallocateAll. If I understand everything properly such an implementation would be enought: bool deallocateAll() { bool result = parent.deallocate(support); allocated = 0; return result; } I am not sure but current implementation might be wrong because it is calling parent.deallocateAll() and parent might have been used to allocate some other data not only buffer for ContiguousFreeList.
Comment #1 by robert.schadek — 2024-12-01T16:33:59Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10343 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB