This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/20979] __gnu_cxx::bitmap_allocator export pruning
- From: "dhruvbird at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Apr 2005 12:11:20 -0000
- Subject: [Bug libstdc++/20979] __gnu_cxx::bitmap_allocator export pruning
- References: <20050412214615.20979.bkoz@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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