[AD] memory allocation

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I trying to make logg work under msvc. I wrote the makefile and made minor modifications to the code. It *almost* works :) There is this problem with allocating memory in different heaps. logg allocates SAMPLE* memory in logg_load(), allegro frees it in destroy_sample(), which leads to a assertion failure or a crash. This is the assert that is trigered in free():
/*
 * If this ASSERT fails, a bad pointer has been passed in. It may be
 * totally bogus, or it may have been allocated from another heap.
 * The pointer MUST come from the 'local' heap.
 */
_ASSERTE(_CrtIsValidHeapPointer(pUserData));

A solution would be using allegro's _al_malloc() in logg, but it is internal. Am I missing something?



--
Milan Mimica
http://sparklet.sf.net




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/