0

I am developing a deamon for my VPS. The program works perfectly in local (that has pthread-2.11.so) but in the vps (witch have pthread-2.5.so) it have a memory leak related to threads (each thread uses too much memory and that memory isn't free after thread termination), a know bug in old pthreads versions.

But CentOS repositories haven't updated their pthread version.

What is the best way of upgrade my pthread.so to version 2.11?

Thanks.

EDIT: Really it isn't a memory leak but it simply use too much more memory in 2.5 than in 2.11 (but when the thread is created its memory use is stable).

Sorry for my bad English.

NeDark
  • 463
  • 1
  • 6
  • 10
  • How many threads are you suing and how much memory are you talking about? It's possible the issue is as simple as a missing pthread_join or pthread_attr_setstacksize. – David Schwartz Aug 27 '11 at 18:47

1 Answers1

3

The version of pthreads is closely related to the version of glibc on the system, and updating glibc on CentOS is infeasible. You may be able to rebuild a pthreads from a newer version of glibc, but I cannot recommend this.

Ignacio Vazquez-Abrams
  • 45,939
  • 6
  • 79
  • 84