开发者

GlobalFree() causing user breakpoint... memory block is fixed, not locked, single module, no DLL

At one point in my program I am calling GlobalFree() to release a memory buffer I allocated with Gl开发者_运维百科obalAlloc() using GMEM_FIXED flag. There is nothing that could be locking this block. However, when I call GlobalFree() after referencing the data (and all of the internal data is still the same as it was), the program stops and says it has encountered a user breakpoint from code in the GlobalFree() code.

Any ideas what could cause this?


The heap functions typically call DebugBreak() - which implements a user-breakpoint - when they detect that the heap structures have been damaged.

The implication is you have written past the end (or the beginning) of the allocated area.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜