[Scip] Memory management

Martin Bergner mbergner at mathematik.tu-darmstadt.de
Thu Aug 5 15:16:32 MEST 2010


Hello all,

I have some questions regarding memory management in SCIP. Currently, I
always allocate memory with the SCIPalloc*, SCIPrealloc*, SCIPduplicate*
functions. I free the allocated memory with SCIPfree*. I had this
problem before but the stage in which the memory is allocated and freed
seems to matter. This problem appeared with the dynamic arrays where
moving the function calls in the same init/exit functions of e.g. a
presolver. The stage did matter. 

Currently, I'm pretty sure I freed all the memory since valgrind doesn't
show the memory being lost anymore. BMScheckEmptyMemory() however still
shows some memory that wasn't freed. 

There are two questions for me here: If I allocate some memory during
the solving process and want to free it after the solving process has
been finished, which memory allocation function should I use?

How can I debug this kind of memory leak in some nice way? Since the
stage seems to be relevant here, I don't know how to start with that.
Any help is appreciated.

Regards,
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://listserv.zib.de/mailman/private/scip/attachments/20100805/f20549a1/attachment.bin


More information about the Scip mailing list