ecpg thead-safe memory management + cleanup

Поиск
Список
Период
Сортировка
От ITAGAKI Takahiro
Тема ecpg thead-safe memory management + cleanup
Дата
Msg-id 20070928144641.FB87.ITAGAKI.TAKAHIRO@oss.ntt.co.jp
обсуждение исходный текст
Ответ на Various ecpg cleanup  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
Ответы Re: ecpg thead-safe memory management + cleanup  (Michael Meskes <meskes@postgresql.org>)
Список pgsql-patches
Here is a patch to get memory management to thread-safe.
The auto_allocs global variable is split into per-thread variables
and accessed separately in each thread.

This patch is including the previous cleanup patch I sent because
I found pthread_once() for Win32 has a bug; it was not thread-safe.
I move the initialization of the mutexes and the init-once functions
to the loading of libecpg (DllMain).

* Fix memory management in multi-thread programs.
  The regression test for it is put on thread/alloc.pgc .
* Release all prepared statements on disconnection to avoid memory leaks
  even if users forget to DEALLOCATE their statements before disconnection.
* Remove memset(0) from ECPGalloc() because calloc() has already done it.
* Add const to some global variables.
* More thread-safety for Win32. (pthread_mutex_lock and pthread_once)
* Add more pthread emulation codes for Win32 to reduce #ifdef WIN32.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center


Вложения

В списке pgsql-patches по дате отправления:

Предыдущее
От: ITAGAKI Takahiro
Дата:
Сообщение: Various ecpg cleanup
Следующее
От: "Jaime Casanova"
Дата:
Сообщение: too many variants of relation_open