I am having a problem with what I think is a memory leak in my program. I am creating a vector of chars, and then resizing it. I am stepping through the code using the debugger, so I can see that I am resizing it to 250. The code I am using to do this is as follows:
But when I check the size afterwards it turns out to be over 4 billion (4GB). It seems to have allocated all of the remaining virtual memory on the machine.Code:vector<char> mask; mask.resize(prfLength + 1);
I have tried using valgrind to isolate the problem. But the errors I am getting are not really telling me anything. Can anyone recommend any other tools that I can use to try to find what the problem is?