------- Additional Comments From dhruvbird at yahoo dot com 2005-04-13 12:11 ------- (In reply to comment #1) > Created an attachment (id=8615) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8615&action=view) > free_list:: static removal >
Hi, What has been done seems ok, but there is just one thing that niggles me. There is now the _M_get_mutex() function, which itself is not thread safe. So, if 2 or more threads try to get memory simultaneously, then the _M_get_mutex() function will be called 2 times, and the mutex will be initialized 2 times.... If that is possible that is. Basically, there seems to be arace here. HOwever, with the previous scenario, the static was initialized before anything happned [I think]. -Dhruv. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20979