[Symphony] Usage model of sym api's

Peter Moceyunas moce at stretchinc.com
Tue Oct 4 13:12:48 EDT 2011


Hi,

Does the symphony api's support the following  sequence in which 
sym_solve() is call twice on the same "env" ?

env = sym_open_environment();
sym_parse_command_line(env, argc, argv);
sym_load_problem(env);
sym_solve(env);
.
.
add a row and modify the objective function of the "env"
.
sym_solve(env)



When I run this code, I  observe memory leaks

==32580==
==32580== HEAP SUMMARY:
==32580==     in use at exit: 118,944 bytes in 2 blocks
==32580==   total heap usage: 233,570 allocs, 233,568 frees, 
1,511,987,278 bytes allocated
==32580==
==32580== 39,648 bytes in 1 blocks are definitely lost in loss record 1 of 2
==32580==    at 0x47E1A4E: malloc (vg_replace_malloc.c:195)
==32580==    by 0x8089A00: is_feasible_u(LP_PROB*, char) (lp_wrapper.c:710)
==32580==    by 0x807F01E: fathom_branch(LP_PROB*) (lp_genfunc.c:325)
==32580==    by 0x807EBD6: process_chain(LP_PROB*) (lp_genfunc.c:179)
==32580==    by 0x806EE55: solve(TM_PROB*) (tm_func.c:398)
==32580==    by 0x804FD9A: sym_solve(SYM_ENVIRONMENT*) (master.c:916)
==32580==    by 0x804BC99: main (main.c:676)
==32580==
==32580== 79,296 bytes in 1 blocks are definitely lost in loss record 2 of 2
==32580==    at 0x47E1A4E: malloc (vg_replace_malloc.c:195)
==32580==    by 0x8089A17: is_feasible_u(LP_PROB*, char) (lp_wrapper.c:711)
==32580==    by 0x807F01E: fathom_branch(LP_PROB*) (lp_genfunc.c:325)
==32580==    by 0x807EBD6: process_chain(LP_PROB*) (lp_genfunc.c:179)
==32580==    by 0x806EE55: solve(TM_PROB*) (tm_func.c:398)
==32580==    by 0x804FD9A: sym_solve(SYM_ENVIRONMENT*) (master.c:916)
==32580==    by 0x804BC99: main (main.c:676)
==32580==

These leaks got me thinking that maybe calling sym_solve() twice is not 
supported ....
If it is supported, then any ideas on where to look to patch up this 
memory leak ?
I am using version 5.1.7 of symphony ....

Pete






More information about the Symphony mailing list