[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] memory not released?

From: Robbie Morrison
Subject: Re: [Help-glpk] memory not released?
Date: Wed, 17 Aug 2011 01:12:03 +1200 (NZST)
User-agent: SquirrelMail/1.4.17

Hello Andrew

To:           Michael Chen <address@hidden>
Subject:      Re: [Help-glpk] memory not released?
Message-ID:  <address@hidden>
From:         Andrew Makhorin <address@hidden>
Date:         Sat, 13 Aug 2011 08:40:44 +0400

>> I used glp_create_job() at beginning and glp_delete_job() at end.
>> However, I still get the following warning from valgrind:
>> ==26789== 160 bytes in 1 blocks are still reachable in loss record 1 of 3
>> ==26789==    at 0x4A05E1C: malloc (vg_replace_malloc.c:195)
>> ==26789==    by 0x422949: glp_init_env (glpenv01.c:62)
>> ==26789==    by 0x422AA4: _glp_get_env_ptr (glpenv01.c:127)
>> ==26789==    by 0x4231C0: glp_malloc (glpenv05.c:57)
>> ==26789==    by 0x41AF2A: glp_create_prob (glpapi01.c:104)
>> ==26789==    by 0x4144EF: glpkmps (in
>> ==26789==    by 0x40220D: main
>> ==26789==
>> Does this mean there is a memory leak in glpk implementation? Or I
>> misread the output from valgrind?
> Please see

This question occurs often enough to make it worth adding:

  glp_free_env();    /* free ALL memory allocated to GLPK */

to the end of the introductory example in the API manual.

best wishes, Robbie
Robbie Morrison
PhD student -- policy-oriented energy system simulation
Technical University of Berlin (TU-Berlin), Germany
University email (redirected) : address@hidden
Webmail (preferred)           : address@hidden
[from Webmail client]

reply via email to

[Prev in Thread] Current Thread [Next in Thread]