freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] I'm having a crashing problem with FreeTDS under OSX
- From: Daniel Parnell <me AT danielparnell.com>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] I'm having a crashing problem with FreeTDS under OSX
- Date: Mon, 9 Mar 2009 07:25:10 +1100
The documentation for both strdup and asprintf say that the memory returned can be deallocated with free.
I tried running something similar to the sample below and it worked as expected. It's really weird!
Daniel
On 08/03/2009, at 10:42 PM, Frediano Ziglio wrote:
2009/3/8 Daniel Parnell <me AT danielparnell.com>:
Here is the version output from gcc
i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5490)
I wasn't aware that FreeTDS used it's own memory allocator.
I've not had any problems like this with any of the installs I've done
in the past (and I've done a lot of them).
Daniel
no, no FreeTDS haven't any special memory allocator, just
malloc/calloc/free. However even strdup and (v)asprintf return
pointers to be freed with free so they should use same allocators. It
would be interesting to understand which libraries your compiler
use... mmm... try to compile a simple program like (mem.c)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
char *s = strdup("hi");
void *p = malloc(100);
free(p);
return 0;
}
with
gcc -o mem -Wall -s -O2 mem.c
and pass result (mem)
freddy77
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
-
Re: [freetds] I'm having a crashing problem with FreeTDS under OSX
, (continued)
-
Re: [freetds] I'm having a crashing problem with FreeTDS under OSX,
James K. Lowden, 03/06/2009
- Re: [freetds] I'm having a crashing problem with FreeTDS under OSX, Frediano Ziglio, 03/06/2009
-
Re: [freetds] I'm having a crashing problem with FreeTDS under OSX,
Daniel Parnell, 03/06/2009
-
Re: [freetds] I'm having a crashing problem with FreeTDS under OSX,
James K. Lowden, 03/07/2009
- Re: [freetds] I'm having a crashing problem with FreeTDS under OSX, Daniel Parnell, 03/07/2009
- Re: [freetds] I'm having a crashing problem with FreeTDS under OSX, Daniel Parnell, 03/07/2009
-
Re: [freetds] I'm having a crashing problem with FreeTDS under OSX,
Daniel Parnell, 03/08/2009
- Re: [freetds] I'm having a crashing problem with FreeTDS under OSX, Frediano Ziglio, 03/08/2009
- Re: [freetds] I'm having a crashing problem with FreeTDS under OSX, Daniel Parnell, 03/08/2009
- Re: [freetds] I'm having a crashing problem with FreeTDS under OSX, Frediano Ziglio, 03/08/2009
- Re: [freetds] I'm having a crashing problem with FreeTDS under OSX, Daniel Parnell, 03/08/2009
- Re: [freetds] I'm having a crashing problem with FreeTDS under OSX, James K. Lowden, 03/08/2009
- Re: [freetds] I'm having a crashing problem with FreeTDS under OSX, Daniel Parnell, 03/08/2009
- Re: [freetds] I'm having a crashing problem with FreeTDS under OSX, Frediano Ziglio, 03/14/2009
- Re: [freetds] I'm having a crashing problem with FreeTDS under OSX, Daniel Parnell, 03/16/2009
-
Re: [freetds] I'm having a crashing problem with FreeTDS under OSX,
James K. Lowden, 03/07/2009
-
Re: [freetds] I'm having a crashing problem with FreeTDS under OSX,
James K. Lowden, 03/06/2009
Archive powered by MHonArc 2.6.24.