List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:April 15 1999 12:38pm
Subject:Re: Memory leaking like a sieve in mysql client api.
View as plain text  
>>>>> "Benjamin" == Benjamin Scherrey <scherrey@stripped> writes:

Benjamin> Well it appears that I spoke too hastily. Using mysql_close() with seperate
Benjamin> free'ing seemed to fix my problem on the HP but not on intel Linux where I
> get
Benjamin> segmentation faults after re-initializing the previously free'd MYSQL*. I
> don't
Benjamin> know if I'm just getting lucky on the HPUx or if there's platform specific
> code in
Benjamin> the client library code or who knows what! I'm presently working on a smaller
> piece
Benjamin> of sample code that demonstrates the problem (and possible disparity between
Benjamin> platforms) more clearly.

Benjamin> Meanwhile, can someone at the MySQL group give some policy information on
Benjamin> reclaiming then reallocating MYSQL instances? Is free() supposed to be used
> or is
Benjamin> mysql_close() supposed to do everything for me (which it isn't)? The goal is
> to be
Benjamin> able to establish multiple connections to various database servers, close
> them,
Benjamin> reclaim their memory, reinitialize them, and so on and so forth...

If you are using mysql_init(), then mysql_close() should free the
memory!

I have demonstrated this in my previous mail;  If you can construct a
complete program that fails, please mail it to me and I will help you
correct the problem!

Regards,
Monty
Thread
Memory leaking like a sieve in mysql client api.Benjamin Scherrey15 Apr
  • Re: Memory leaking like a sieve in mysql client api.Benjamin Scherrey15 Apr
  • Re: Memory leaking like a sieve in mysql client api.Benjamin Scherrey15 Apr
  • Re: Memory leaking like a sieve in mysql client api.Benjamin Scherrey15 Apr
  • Re: Memory leaking like a sieve in mysql client api.Benjamin Scherrey15 Apr
    • Re: Memory leaking like a sieve in mysql client api.Michael Widenius15 Apr
  • Memory leaking like a sieve in mysql client api.Michael Widenius15 Apr
  • Re: Memory leaking like a sieve in mysql client api.Benjamin Scherrey15 Apr
    • Re: Memory leaking like a sieve in mysql client api.Michael Widenius16 Apr
      • Re: Memory leaking like a sieve in mysql client api..16 Apr
        • Re: Memory leaking like a sieve in mysql client api.Michael Widenius17 Apr
Re: Memory leaking like a sieve in mysql client api.Fred Lindberg15 Apr
Re: Memory leaking like a sieve in mysql client api.Fred Lindberg15 Apr