• Advertisement

Archived

This topic is now archived and is closed to further replies.

MMGR (Paul Nettle) question regarding using malloc() [ANSWERED]

This topic is 5041 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Perhaps someone here will know the answer, I've been searching around and havn't been able to find any information that evaluates into an answer for me. I want to use malloc while using mmgr, is this possible somehow? When I try to do it mmgr will assert and stop my program from running. Any ideas? Thanks! MindEngine Development http://medev.sourceforge.net [edited by - neurokaotix on April 4, 2004 6:26:42 PM]

Share this post


Link to post
Share on other sites
Advertisement
What kind of assert() are you getting? Seems to work fine for me.

Share this post


Link to post
Share on other sites
Inside the function m_validateAllocUnit(const sAllocUnit *allocUnit)


// If you hit this assert, then you should know that this allocation unit has been damaged. Something (possibly the

// owner?) has overrun the allocation unit (modified a few bytes after the end). You can interrogate the variable

// ''allocUnit'' to see statistics and information about this damaged allocation unit.

m_assert(*post == static_cast<long>(postfixPattern));


This is triggered by the use of malloc() inside of a separate dll.

MindEngine Development
http://medev.sourceforge.net

Share this post


Link to post
Share on other sites
That''s not an issue with using malloc(). You''ve hit one of the corrupt memory block assertions, so you probably have a buffer overrun somewhere else or you''re not segregating memory allocations and deallocations between your exe and your dll properly.

Share this post


Link to post
Share on other sites

  • Advertisement