"Craig A. James" <cjames@modgraph-usa.com> writes:
> I guess I misinterpreted the Postgress manual, which says (in 31.9, "C Language Functions"),
> "When allocating memory, use the PostgreSQL functions palloc and pfree
> instead of the corresponding C library functions malloc and free."
> I imagined that perhaps palloc/pfree used mutexes for something. But if I understand you, palloc() and pfree() are
justwrappers around malloc() and free(), and don't (for example) make their own separate calls to brk(2), sbrk(2), or
theirkin.
Correct. palloc/pfree are all about managing the lifetime of memory
allocations, so that (for example) a function can return a palloc'd data
structure without worrying about whether that creates a long-term memory
leak. But ultimately they just use malloc/free, and there's certainly
not any threading or mutex considerations in there.
> No threading anywhere. None of the libraries use threads or mutexes. It's just plain old vanilla C/C++ scientific
algorithms.
Darn, my best theory down the drain.
>> Or it could be a garden variety glibc bug. How up-to-date is your
>> platform?
> I guess this is the next place to look.
Let us know how it goes...
regards, tom lane