Opened 18 years ago
Last modified 15 years ago
#284 closed Bugs (fixed)
pool::purge_memory() does not reset next_size — at Version 7
Reported by: | nobody | Owned by: | shammah |
---|---|---|---|
Milestone: | Boost 1.35.0 | Component: | pool |
Version: | Boost 1.34.0 | Severity: | Problem |
Keywords: | Cc: | witt@… |
Description (last modified by )
Calling purge_memory() does not reset next_size in the memory pool implementation. This means that repeatedly allocating then calling purge_memory() causes the pool to allocate a buffer of double the size each time, even though the number of objects remains small. Thanks, Edmund Kapusniak.
Change History (8)
comment:2 by , 15 years ago
Milestone: | → Boost 1.34.1 |
---|---|
Severity: | → Problem |
Version: | None → release 1.34.0 |
comment:3 by , 15 years ago
Cc: | added |
---|
comment:4 by , 15 years ago
Milestone: | Boost 1.34.1 → Boost 1.35.0 |
---|
comment:5 by , 15 years ago
Attached patch adds a new member (start_size) and which is the value of next_size as set in constructor or via set_next_size. It is used to reset next_size in purge_memory.
comment:6 by , 15 years ago
Hi, the attached patch is not completely correct - there is the same problem in method release_memory() and it should be also fixed.
Lada
comment:7 by , 15 years ago
Component: | None → pool |
---|---|
Description: | modified (diff) |
Note:
See TracTickets
for help on using tickets.