Boost logo

Boost :

From: scleary_at_[hidden]
Date: 2000-12-04 10:21:00


> [Gary Powell]
> For debugging I'd also like a couple of flags one of which did a
> initialization of the memory to a known value that uninitialized code
would
> likely crash if deferenced, ie 0xDEADCODE and another of which
> did fence post testing, ie, mark the beginning and end of a valid block,
> and test for overwrite on deletion. Then on deletion, re-initialize the
> memory to 0xDCDCDCDC. And last but not least a report of the unfreed
blocks.

I can see different hooks being useful: initialization of memory to
user-defined values, reports of memory usage, memory leaks, etc.

There are several guidelines I'd like to place down now for any such
changes:
  1) There should be *no* penalty for not using them
  2) The user interface should be changed minimally, and should not become
overly-complicated

It may be possible to add a single optional template parameter, which would
supply any necessary debugging/statistical functionality. Just don't add
each debugging flag as a separate template parameter to sized_pool; invent a
"debugging traits" class instead.

        -Steve


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk