Re: [PATCHES] putting CHECK_FOR_INTERRUPTS in qsort_comparetup() - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [PATCHES] putting CHECK_FOR_INTERRUPTS in qsort_comparetup()
Date
Msg-id 200607142153.35116.peter_e@gmx.net
Whole thread Raw
In response to Re: [PATCHES] putting CHECK_FOR_INTERRUPTS in qsort_comparetup()  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCHES] putting CHECK_FOR_INTERRUPTS in qsort_comparetup()
List pgsql-hackers
Tom Lane wrote:
> > Doesn't look like it's allocating any nonlocal memory:
> >
> > http://sourceware.org/cgi-bin/cvsweb.cgi/libc/stdlib/qsort.c?rev=1.
> >12&content-type=text/x-cvsweb-markup&cvsroot=glibc
>
> But this file defines _quicksort() not qsort().  I was under the
> impression that the latter is actually a mergesort in glibc ...

The merge sort is here:

http://sourceware.org/cgi-bin/cvsweb.cgi/libc/stdlib/msort.c?rev=1.21&content-type=text/x-cvsweb-markup&cvsroot=glibc

It uses alloca, so we're good here.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: src/tools/pginclude considered harmful (was Re: [PATCHES]
Next
From: Tom Lane
Date:
Subject: Re: [PATCHES] putting CHECK_FOR_INTERRUPTS in qsort_comparetup()