emacs-devel
[Top][All Lists]
Advanced

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

Re: Tree-sitter api


From: Eli Zaretskii
Subject: Re: Tree-sitter api
Date: Sat, 04 Sep 2021 16:04:44 +0300

> From: Tuấn-Anh Nguyễn <ubolonton@gmail.com>
> Date: Sat, 4 Sep 2021 19:49:35 +0700
> Cc: Theodor Thornhill <theo@thornhill.no>, Stephen Leake 
> <stephen_leake@stephe-leake.org>, 
>       Eli Zaretskii <eliz@gnu.org>, Clément Pit-Claudel 
> <cpitclaudel@gmail.com>, 
>       Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel 
> <emacs-devel@gnu.org>
> 
> On Sat, Sep 4, 2021 at 1:44 PM Yuan Fu <casouri@gmail.com> wrote:
> > 1) tree-sitter lacks a way to change its malloc behavior in run-time, I 
> > commented on their road-map issue, but no one has replied yet,
> >
> Do you mean APIs to change its alloc/free functions at run time? Why would we
> need to do that?

Because what TS does when it runs out of memory is call 'exit'.
That's unacceptable for Emacs.  Emacs can handle out-of-memory
situations well enough, but it can only do that if the problem is
reported to it by the memory-allocation functions.

> Doesn't simply defining `ts_malloc` and related functions work?

No, because we want to be able to link against a TS library, we don't
want to require people who build Emacs to build TS as well.



reply via email to

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