Skip to Content.
Sympa Menu

freetds - Re: [freetds] I'm having a crashing problem with FreeTDS under OSX

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] I'm having a crashing problem with FreeTDS under OSX
  • Date: Sun, 8 Mar 2009 12:42:07 +0100

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




Archive powered by MHonArc 2.6.24.

Top of Page