emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can we go GTK-only?


From: Paul Eggert
Subject: Re: Can we go GTK-only?
Date: Tue, 1 Nov 2016 09:55:34 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

On 11/01/2016 09:49 AM, Eli Zaretskii wrote:
pthreads is not the only way to have threads.

Whether one uses pthreads or not, a thread-safe malloc is the only sane way malloc in a multithreaded application. We shouldn't have to worry about multithreaded environments where malloc does not work. Such environments are too buggy to be a reasonable porting target for Emacs.

I'd imagine any code that wants to allocate from the heap will call xmalloc

No, code that allocates from the heap in non-Emacs-Lisp threads should call malloc directly. It shouldn't call Emacs xmalloc. Emacs xmalloc is intended for the Emacs Lisp thread. That's how it works now, anyway, and we should simply keep it that way.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]