Stephen Connolly
Stephen Connolly

Reputation: 1229

What causes a duplicate memory free operation?

A member of our team has reported an issue on Windows 2008 R2 which reports "duplicate memory free operation". I can't find much about this on the Web. The problem can't be reporoduced on a non-english operating system. Any suggestions?

Upvotes: 0

Views: 1049

Answers (2)

paxdiablo
paxdiablo

Reputation: 882326

It usually means you've freed the same memory twice, which is a big no-no. The reason for this is that freeing the memory returns it to the free pool where it can be allocated for another use.

Now while freeing the same memory twice is not so bad if it can be intercepted and ignored, that's not so easy if it's been allocated to someone else in the meantime. That will mean that the same memory block may be allocated to multiple uses and you're quite likely to get data corruption as a consequence.

Upvotes: 2

Stephen Connolly
Stephen Connolly

Reputation: 1229

DOH - seems that this is some kind of assert that you get only on Windows Checked (i.e. debug) builds of Windows.

Upvotes: 0

Related Questions