[EMAIL PROTECTED] writes:
> Hi!
>
> We are currently developing a MT server (pthreads based, the main thread
> does accept() and push_back to a vector that the threads pick up work from,
> the threads share a global hash_map of cached information protected by a
> pthread_rwlock) and we seem to have an issue with confliting memory allocators
> (locking).
>
> Our server is based purely on STL and we can get desent performance if we
> compile it using the GCC/libstd++ flag __USE_MALLOC but this seems to lead
> to high level of memory defragmentation since the server is bogged down
> after a while of high load. From time to time we alse get memory leaks that
> we can't pinpoint to anything else than fragmentation...
>
> Has anyone had this problem? I am sending this to the MySQL list since it
> seems like the problem arises in combination with the mysql client library.
> How does mysql allocate memory (treadsafety) and how could this collide with
> the approach that the STL/GCC 3.0.1 does things?
>
> Thanks!
>
> /Stefan
Hi!
It is very well known that most C++ compilers have huge problems with
threads when used in conjuction with C++ exceptions.
GNU has this problem even agravated, as even if you do not use C++
exceptions, libstdc++ does, so you will have problems.
The only solution is not to use C++ exceptions and not to use
libstdc++ with GNU C++.
--
Regards,
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic <[EMAIL PROTECTED]>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ www.mysql.com
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php