From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Can we go GTK-only? Date: Tue, 01 Nov 2016 18:54:35 +0200 Message-ID: <83h97rnnsk.fsf@gnu.org> References: <24db2975-17ca-ad01-20c8-df12071fa89a@dancol.org> <4615E73A-19E2-4B79-9889-D3FA686DDDE6@raeburn.org> <83bmy0pl8p.fsf@gnu.org> <831sywp7ew.fsf@gnu.org> <83y413nsjm.fsf@gnu.org> <20161101124112.2604a08c@jabberwock.cb.piermont.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1478021030 23408 195.159.176.226 (1 Nov 2016 17:23:50 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 1 Nov 2016 17:23:50 +0000 (UTC) Cc: dancol@dancol.org, emacs-devel@gnu.org, raeburn@raeburn.org, monnier@iro.umontreal.ca To: "Perry E. Metzger" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 01 18:23:45 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c1cmU-0003VK-RH for ged-emacs-devel@m.gmane.org; Tue, 01 Nov 2016 18:23:26 +0100 Original-Received: from localhost ([::1]:49518 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1cmX-0003E8-C4 for ged-emacs-devel@m.gmane.org; Tue, 01 Nov 2016 13:23:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1cKO-00051g-FJ for emacs-devel@gnu.org; Tue, 01 Nov 2016 12:54:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1cKK-0006Gp-Pn for emacs-devel@gnu.org; Tue, 01 Nov 2016 12:54:24 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41298) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1cKK-0006Gl-M9; Tue, 01 Nov 2016 12:54:20 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4190 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1c1cKJ-0001bs-Sx; Tue, 01 Nov 2016 12:54:20 -0400 In-reply-to: <20161101124112.2604a08c@jabberwock.cb.piermont.com> (perry@piermont.com) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:209062 Archived-At: > Date: Tue, 1 Nov 2016 12:41:12 -0400 > From: "Perry E. Metzger" > Cc: Daniel Colascione , raeburn@raeburn.org, > monnier@iro.umontreal.ca, emacs-devel@gnu.org > > On Tue, 01 Nov 2016 17:11:57 +0200 Eli Zaretskii wrote: > > > Of course you can call malloc from multiple threads. Otherwise, > > > projects like jemalloc would be pointless. You can freely > > > allocate and deallocate from different threads on both POSIX and > > > Windows systems, and there is no need to free an object on the > > > thread that allocated it. > > > > IMO, this is not a safe assumption, even though in practice more and > > more systems out there provide thread-safe native malloc. Only C11 > > mandates that malloc/realloc/free shall be thread-safe, and we don't > > yet require C11. > > I was under the impression the requirement that malloc be thread safe > was before now a POSIX/pthreads thing, not a C standard thing, and > that this had been the case for a very long time. We don't only support POSIX platforms. And even for POSIX platforms, you can find on the net reports about thread-unsafe malloc up to 2013 and 2014. That's not "very long time". > I can look up old versions of the standard but I believe it was the > case as long as pthreads has been around. My concern is not with the standards, but with the actual situation out there.