emacs-devel
[Top][All Lists]
Advanced

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

Re: How to add pseudo vector types


From: Eli Zaretskii
Subject: Re: How to add pseudo vector types
Date: Mon, 26 Jul 2021 15:56:12 +0300

> From: Stephen Leake <stephen_leake@stephe-leake.org>
> Cc: casouri@gmail.com,  cpitclaudel@gmail.com,  monnier@iro.umontreal.ca,
>   emacs-devel@gnu.org
> Date: Sun, 25 Jul 2021 22:10:12 -0700
> 
> >> The Ada allocator throws an exception on allocation fail; is it
> >> sufficient to turn that exception into an elisp signal, and arrange for
> >> elisp to call memory_full (or take some other action, like killing the
> >> parser)?
> >
> > What is a "lisp signal" in this context?
> 
> The module interface layer of wisi.el would do:
> 
>     (signal 'error "parser ran out of memory")

We don't have such an error (and handling an error when you've run out
of memory could backfire).

> >> Another possible reason to change the Ada allocator is if we want to
> >> expose Ada memory pointers directly to elisp, as Yuan Fu wants to do for
> >> tree-sitter (I don't plan to do this for wisi). Does that require that
> >> the pointers be allocated by the same allocator?
> >
> > Same allocator as what?
> 
> As other lisp symbols.

Not sure, perhaps you could free them in a finalizer instead.  If you
want GC to free them, then yes.



reply via email to

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