How to debug C++ memory errors?
<p>Does valgrind work with STL allocator? I am using STL vector with plain C library in the follwing fashion:</p>

<pre><code>double some_C_functions(int, double*);

std::vector&lt;double&gt; v;
.....
double result = some_C_functions(v.size(), &amp;v[0]);
</code></pre>

<p>What if the C functions tries to overshoot the pointer? Can valgrind detect the error?</p>
