Opened 18 years ago

Closed 15 years ago

Last modified 15 years ago

#284 closed Bugs (fixed)

pool::purge_memory() does not reset next_size

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 Marshall Clow)

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.


Attachments (1)

boost_pool.patch (1.4 KB ) - added by Marcus Lindblom <macke@…> 15 years ago.
Patch that adresses this bug

Download all attachments as: .zip

Change History (10)

comment:1 by fizzgig, 16 years ago

Logged In: YES 
user_id=197414
Originator: NO

This bug is still here. A workaround is to call set_next_size() after purge memory. However, it should be a very easy fix.

comment:2 by Thomas Witt, 15 years ago

Milestone: Boost 1.34.1
Severity: Problem
Version: Nonerelease 1.34.0

comment:3 by Thomas Witt, 15 years ago

Cc: witt@… added

comment:4 by Thomas Witt, 15 years ago

Milestone: Boost 1.34.1Boost 1.35.0

comment:5 by Marcus Lindblom <macke@…>, 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.

by Marcus Lindblom <macke@…>, 15 years ago

Attachment: boost_pool.patch added

Patch that adresses this bug

comment:6 by lang@…, 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 Marshall Clow, 15 years ago

Component: Nonepool
Description: modified (diff)

comment:8 by Marshall Clow, 15 years ago

Resolution: Nonefixed
Status: assignedclosed

(In [41286]) Bug fixes #284, #836, #991

comment:9 by Eric Niebler, 15 years ago

(In [41399]) Merged revisions 41268-41398 via svnmerge from https://svn.boost.org/svn/boost/trunk

........

r41270 | dgregor | 2007-11-20 21:50:21 -0800 (Tue, 20 Nov 2007) | 1 line

Fixes #1456

........

r41271 | johnmaddock | 2007-11-21 01:39:00 -0800 (Wed, 21 Nov 2007) | 1 line

Added super/subscript styling as per boost-docs mailing list discussion.

........

r41272 | johnmaddock | 2007-11-21 01:46:36 -0800 (Wed, 21 Nov 2007) | 1 line

Fix << iostream operator for the NTL bindings.

........

r41273 | anthonyw | 2007-11-21 02:44:22 -0800 (Wed, 21 Nov 2007) | 1 line

changed platform split to allow bjam to track includes and check dependencies

........

r41274 | schoepflin | 2007-11-21 03:00:18 -0800 (Wed, 21 Nov 2007) | 2 lines

Added myself to the platform maintainers file.

........

r41276 | bgubenko | 2007-11-21 03:43:00 -0800 (Wed, 21 Nov 2007) | 1 line

fix typo in the marking of function_types library tests

........

r41277 | johnmaddock | 2007-11-21 04:09:28 -0800 (Wed, 21 Nov 2007) | 1 line

Change warning suppression, to suppress warnings for VC8 as well.

........

r41278 | johnmaddock | 2007-11-21 06:03:16 -0800 (Wed, 21 Nov 2007) | 1 line

Apply warning fix for VC8 and later only: earlier versions warn about the warning suppression :-(

........

r41279 | schoepflin | 2007-11-21 07:21:53 -0800 (Wed, 21 Nov 2007) | 2 lines

Marked function_types failures depending on stdcall as expected on Tru64/CXX.

........

r41280 | igaztanaga | 2007-11-21 08:18:29 -0800 (Wed, 21 Nov 2007) | 1 line

Added offset_ptr test

........

r41281 | igaztanaga | 2007-11-21 08:19:19 -0800 (Wed, 21 Nov 2007) | 1 line

Fixed offset_ptr issues with volatile values.

........

r41282 | igaztanaga | 2007-11-21 08:39:48 -0800 (Wed, 21 Nov 2007) | 1 line

Changed precalculated sqrt(2) values selection to use enable_if.

........

r41284 | igaztanaga | 2007-11-21 09:32:20 -0800 (Wed, 21 Nov 2007) | 1 line

Added performance Jamfile to the project

........

r41285 | hkaiser | 2007-11-21 09:53:37 -0800 (Wed, 21 Nov 2007) | 1 line

Wave: Fixed #line statements in generated files not to contain Windows paths anymore.

........

r41286 | marshall | 2007-11-21 11:20:15 -0800 (Wed, 21 Nov 2007) | 1 line

Bug fixes #284, #836, #991

........

r41287 | grafik | 2007-11-21 11:29:55 -0800 (Wed, 21 Nov 2007) | 1 line

Fix search for Boost.Build so that it only finds the approved version.

........

r41288 | djowel | 2007-11-21 14:24:37 -0800 (Wed, 21 Nov 2007) | 1 line

updated the master css

........

r41289 | matias | 2007-11-21 20:55:54 -0800 (Wed, 21 Nov 2007) | 1 line

Explicit failure markup for Bimap

........

r41290 | matias | 2007-11-21 21:18:38 -0800 (Wed, 21 Nov 2007) | 1 line

remove wrong placed typename

........

r41297 | joaquin | 2007-11-21 23:59:28 -0800 (Wed, 21 Nov 2007) | 1 line

included an exe filename modifying rule to avoid interference problems with Vista UAC (fixes #1429)

........

r41299 | djowel | 2007-11-22 00:39:46 -0800 (Thu, 22 Nov 2007) | 1 line

bug fix

........

r41300 | schoepflin | 2007-11-22 01:32:15 -0800 (Thu, 22 Nov 2007) | 3 lines

Marked failures for kolmogorov_max_flow_test and max_flow_test in the graph library as expected for cxx and acc.

........

r41301 | johnmaddock | 2007-11-22 01:59:38 -0800 (Thu, 22 Nov 2007) | 1 line

Added try...catch around TSS initialisation.

........

r41302 | johnmaddock | 2007-11-22 02:38:48 -0800 (Thu, 22 Nov 2007) | 1 line

Fixes #501 #1334.

........

r41303 | bgubenko | 2007-11-22 03:33:09 -0800 (Thu, 22 Nov 2007) | 1 line

fix typo in r41302 causing validation error

........

r41304 | rogeeff | 2007-11-22 11:44:12 -0800 (Thu, 22 Nov 2007) | 1 line

Try to make it work in release build

........

r41305 | rogeeff | 2007-11-22 11:56:58 -0800 (Thu, 22 Nov 2007) | 1 line

new file

........

r41308 | rogeeff | 2007-11-22 12:56:07 -0800 (Thu, 22 Nov 2007) | 2 lines

negative chars test added some statements added to the online_test

........

r41310 | rogeeff | 2007-11-22 13:57:16 -0800 (Thu, 22 Nov 2007) | 1 line

issue with class base test cases addressed

........

r41311 | anthonyw | 2007-11-22 14:01:30 -0800 (Thu, 22 Nov 2007) | 1 line

Removed thread::self in favour of allowing interruption through a thread::id; no longer requires DuplicateHandle

........

r41312 | rogeeff | 2007-11-22 14:06:59 -0800 (Thu, 22 Nov 2007) | 1 line

comments cleanup

........

r41313 | grafik | 2007-11-22 18:57:42 -0800 (Thu, 22 Nov 2007) | 1 line

Produce less regression reports to reduce the cycle time for test reporting.

........

r41314 | grafik | 2007-11-22 18:58:14 -0800 (Thu, 22 Nov 2007) | 1 line

Produce less regression reports to reduce the cycle time for test reporting.

........

r41315 | joaquin | 2007-11-22 23:57:15 -0800 (Thu, 22 Nov 2007) | 1 line

added .exe suffix missing at rev 41297

........

r41317 | johnmaddock | 2007-11-23 09:05:25 -0800 (Fri, 23 Nov 2007) | 1 line

Remove the log files, we don't need these in SVN Trunk.

........

r41318 | grafik | 2007-11-23 12:43:38 -0800 (Fri, 23 Nov 2007) | 1 line

Add --skip-script-download option to run.py to avoid repeated regression script downloads. Thanks to _m_ for the changes.

........

r41319 | bemandawes | 2007-11-23 14:55:48 -0800 (Fri, 23 Nov 2007) | 1 line

Add the instructions formerly in the (now deleted) runner sub-directory

........

r41320 | anthonyw | 2007-11-23 15:09:36 -0800 (Fri, 23 Nov 2007) | 1 line

Integrate TSS with thread data; test to ensure cleanup done for native threads as well as boost::thread-launched threads now runs for pthread API as well as win32 API

........

r41324 | grafik | 2007-11-23 18:16:50 -0800 (Fri, 23 Nov 2007) | 1 line

Allow use of "conditional" to multiply a condition that already has the full condition in it.

........

r41325 | igaztanaga | 2007-11-24 01:44:30 -0800 (Sat, 24 Nov 2007) | 1 line

Marked msvc-8.0-wm5 as unusable

........

r41326 | niels_dekker | 2007-11-24 03:51:03 -0800 (Sat, 24 Nov 2007) | 1 line

Checked the result of value_init test function, hoping to pinpoint exactly for what particular type T value_initialized<T> might fail, on some platforms

........

r41327 | johnmaddock | 2007-11-24 04:25:25 -0800 (Sat, 24 Nov 2007) | 1 line

Apply patches for building regex on WinCE see: http://lists.boost.org/Archives/boost/2007/11/130839.php

........

r41328 | bemandawes | 2007-11-24 05:15:03 -0800 (Sat, 24 Nov 2007) | 1 line

Bring required compilers list closer into sync with actual testers and list discussion

........

r41330 | bemandawes | 2007-11-24 06:59:08 -0800 (Sat, 24 Nov 2007) | 1 line

Remove mingw plus some compilers no longer being tested from required list

........

r41331 | nasonov | 2007-11-24 07:22:52 -0800 (Sat, 24 Nov 2007) | 1 line

minor changes

........

r41333 | bemandawes | 2007-11-24 08:39:30 -0800 (Sat, 24 Nov 2007) | 1 line

Change long name inspection to follow ISO 9660:1997, thus replacing all length requirements with a single 207 maximum path length requirement.

........

r41338 | garcia | 2007-11-24 10:19:22 -0800 (Sat, 24 Nov 2007) | 2 lines

A bunch of review dates have been added.

........

r41339 | johnmaddock | 2007-11-24 10:34:17 -0800 (Sat, 24 Nov 2007) | 1 line

Changed meaning of "at_end" needs copy-constructor fix.

........

r41341 | noel_belcourt | 2007-11-24 11:09:56 -0800 (Sat, 24 Nov 2007) | 6 lines

Replace mpi wrappers with native pathscale compilers. Fixed how we invoke f77 (pathf90 -f77).

Thanks to Alain Miniussi for reporting this.

........

r41342 | igaztanaga | 2007-11-24 11:47:58 -0800 (Sat, 24 Nov 2007) | 1 line

Added workaround for systems without SEM_FAILED and semaphores based on filesystem

........

r41343 | rogeeff | 2007-11-24 11:49:24 -0800 (Sat, 24 Nov 2007) | 5 lines

switch to nasic_cstring.hpp instead of fwd header added failed expression to the system error system_error is caught and reported in cpp_main.ipp 64 bit compatibility issue in debug.ipp fixed missing headers in algorithm.hpp added

........

r41344 | davedeakins | 2007-11-24 12:30:50 -0800 (Sat, 24 Nov 2007) | 1 line

Define the BOOST_NO_SWPRINTF macro for WinCE. WinCE's CRT does not have a conforming swprintf signature.

........

r41348 | igaztanaga | 2007-11-24 16:55:14 -0800 (Sat, 24 Nov 2007) | 1 line

Marked pathscale and vacpp as unusable for Interprocess/Intrusive

........

r41350 | davedeakins | 2007-11-24 20:30:02 -0800 (Sat, 24 Nov 2007) | 1 line

A few corrections to the WinCE patches

........

r41352 | dave | 2007-11-25 01:02:01 -0800 (Sun, 25 Nov 2007) | 2 lines

Attempt SunPro workaround

........

r41353 | guwi17 | 2007-11-25 05:34:20 -0800 (Sun, 25 Nov 2007) | 6 lines

  • fix and close #1237
  • symmetric resize used wrong internal resize method -- Dese und die folgenden Zeilen werden ignoriert --

M symmetric.hpp

........

r41355 | bemandawes | 2007-11-25 05:56:09 -0800 (Sun, 25 Nov 2007) | 1 line

Remove extra ) from prior commit

........

r41356 | danieljames | 2007-11-25 06:10:05 -0800 (Sun, 25 Nov 2007) | 2 lines

Deleting the BoostCon* files. Fixes #1256

........

r41357 | bemandawes | 2007-11-25 07:08:28 -0800 (Sun, 25 Nov 2007) | 1 line

clear # 1230, mbstate uninitialized

........

r41358 | igaztanaga | 2007-11-25 07:18:04 -0800 (Sun, 25 Nov 2007) | 1 line

Marked intel-linux-8.* as unusable for Interprocess and Intrusive

........

r41359 | johnmaddock | 2007-11-25 07:47:58 -0800 (Sun, 25 Nov 2007) | 1 line

Oops, previous commit messed up POSIX timing code, now fixed.

........

r41361 | johnmaddock | 2007-11-25 08:26:36 -0800 (Sun, 25 Nov 2007) | 1 line

Redirection file.

........

r41362 | grafik | 2007-11-25 09:06:17 -0800 (Sun, 25 Nov 2007) | 1 line

Move buildbot support to sandbox until we decide what to do with it.

........

r41363 | grafik | 2007-11-25 09:12:42 -0800 (Sun, 25 Nov 2007) | 1 line

Some cleanup of tools documentation. Add boostbook redir file. Delete duplicate time_string.hpp. Repoint regression instructions to web site.

........

r41364 | johnmaddock | 2007-11-25 09:23:25 -0800 (Sun, 25 Nov 2007) | 1 line

Fix date.

........

r41378 | bemandawes | 2007-11-25 11:56:10 -0800 (Sun, 25 Nov 2007) | 1 line

remove hp_cxx-71_006_tru64 as required.

........

r41380 | grafik | 2007-11-25 12:10:10 -0800 (Sun, 25 Nov 2007) | 1 line

Add --build-type option to root build. Two choices possible at the moment "minimal" and "complete". With minimal as the default we only build the common release variant. The old behavior of building many variants is available with "complete".

........

r41381 | fcacciola | 2007-11-25 12:26:14 -0800 (Sun, 25 Nov 2007) | 1 line

Cast to base added to avoid a call to the convertir constructor/assignment (see Tickes 1419 and 1420)

........

r41383 | burbelgruff | 2007-11-25 13:16:46 -0800 (Sun, 25 Nov 2007) | 1 line

Revert to old sizeof based solution for retrieving the type from a typeof hack. This is in order to overcome problems with the code analysis module introduced in Visual Studio 2005.

........

r41384 | davedeakins | 2007-11-25 13:53:26 -0800 (Sun, 25 Nov 2007) | 1 line

Added a primitive tmpnam function for WinCE (which does not supply any kind of tmpnam in its CRT)

........

r41385 | nasonov | 2007-11-25 14:28:16 -0800 (Sun, 25 Nov 2007) | 3 lines

Pass unsigned type to lcast_put_unsigned.

........

r41387 | nasonov | 2007-11-25 15:08:50 -0800 (Sun, 25 Nov 2007) | 2 lines

Support for string with non-default char_traits and allocator.

........

r41391 | davedeakins | 2007-11-25 22:36:55 -0800 (Sun, 25 Nov 2007) | 1 line

Nearly all test for the intrusive library pass on the MSVC8/WM5 platform.

........

r41394 | joaquin | 2007-11-26 03:52:03 -0800 (Mon, 26 Nov 2007) | 1 line

added missing traits template arg to a lexical_stream instantiation

........

r41395 | anthonyw | 2007-11-26 04:17:45 -0800 (Mon, 26 Nov 2007) | 1 line

workaround for Borland compiler

........

r41396 | anthonyw | 2007-11-26 05:29:15 -0800 (Mon, 26 Nov 2007) | 1 line

Don't compare native_handle_t against 0 --- do appropriate checks in create_native_thread for platforms where pthread_t is not comparable

........

r41397 | joaquin | 2007-11-26 05:48:36 -0800 (Mon, 26 Nov 2007) | 1 line

ADL-based swap call moved to an utility function (after mistaken attempt at rev 41220 to solve name-hiding issues)

........

r41398 | anthonyw | 2007-11-26 07:44:07 -0800 (Mon, 26 Nov 2007) | 1 line

fixed import/export declarations so new once code works with pthread-win32

........

Note: See TracTickets for help on using tickets.