emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 2/3] Add garbage-collect-maybe function


From: Eli Zaretskii
Subject: Re: [PATCH 2/3] Add garbage-collect-maybe function
Date: Wed, 18 Nov 2020 19:49:47 +0200

> From: Spencer Baugh <sbaugh@catern.com>
> Date: Tue, 17 Nov 2020 19:20:49 -0500
> Cc: Spencer Baugh <sbaugh@catern.com>
> 

Thanks, a few comments regarding style and coding conventions:

> +  if (factor >= 1 && since_gc > gc_threshold / factor) {
> +    garbage_collect ();
> +    return true;
> +  } else
> +    return false;

Style of braces again.

> +FACTOR determined what "enough" means here:
          ^^^^^^^^^^
"determines"

> +a FACTOR of N means to run the GC if more than 1/Nth of the allocations
> +needed to triger automatic allocation took place.

  "If FACTOR is a positive number N, it means to run GC ..."

> +Returns t if we garbage collected, and nil otherwise.  */)

  "Return t if GC happened, nil otherwise".

(IOW, avoid the "we" part.)

> +  if (maybe_garbage_collect_eagerly(fact))
                                     ^^
Please leave a blank between the name of the function and the opening
brace.



reply via email to

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