emacs-devel
[Top][All Lists]
Advanced

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

Re: master d582356: * src/fns.c (Frandom): Handle bignum `limit`s


From: Stefan Monnier
Subject: Re: master d582356: * src/fns.c (Frandom): Handle bignum `limit`s
Date: Sun, 07 Mar 2021 13:37:39 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> I don't think I understand how will we know which function says it
>> never calls GC.
> By tagging it in the source code?

Random thoughts on this:
- AFAIK in the current code, the places where we can't run GC are much
  more rare than the cases where we can run GC, so we'd be better off
  trying to annotate the places where it can't happen.
- Those places are currently not annotated at all, by and large.
  There are a few comments here and there stating that GC shouldn't
  happen, but those comments shouldn't be trusted.
- The trend is to reduce the amount of code where GC cannot take place
  [ I think and I hope.  ]
- As you have noted some functions can be called in contexts where they
  may GC and in other contexts where they may not GC.  So we don't have
  a clear static partitioning of the code.  So maybe a dynamic-test
  approach is the better option (it will rarely catch the unlikely
  corner cases, but if it does catch them in their rare occurrences it'll
  still help us diagnose those problems which tend to be very painful
  to track down).


        Stefan




reply via email to

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