Zack Weinberg writes:
 > On Mon, Sep 22, 2008 at 3:09 PM, Markus Wanner <[EMAIL PROTECTED]> wrote:
 > > This leads me to think that the STL implementation doesn't provide an O(1)
 > > implementation for size()... savings is avg memory consumption seems to
 > > confirm this, no?
 > 
 > Now that's just bloody weird.  I can't think of any reason size()
 > would need to *allocate memory*.

Assuming that the code for getting memory usage is derived from the
code I wrote a long time ago (output looks similar, so likely); I
expect that the memory consumption differences are just sampling
effects.  It sampled every 1 second or so, and so changes to runtime
can affect when the memory usage is sampled and hence the estimated
memory usage.  Tools like valgrind in it's massif mode will give you
better memory usage comparisons, but result in big slowdowns.
        -Eric



_______________________________________________
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel

Reply via email to