* Re: scratch/hash-table-perf 2d28042f56a 19/35: Use non-Lisp allocation for internal hash-table vectors
[not found] ` <20240104155642.B4A99C00344@vcs2.savannah.gnu.org>
@ 2024-01-04 17:32 ` Dmitry Gutov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Gutov @ 2024-01-04 17:32 UTC (permalink / raw)
To: emacs-devel, Mattias Engdegård
On 04/01/2024 17:56, Mattias Engdegård wrote:
> +/* Like xmalloc, but makes allocation count toward the total consing.
> + Return NULL for a zero-sized allocation. */
> +void *
> +hash_table_alloc_bytes (ptrdiff_t nbytes)
> +{
> + if (nbytes == 0)
> + return NULL;
> + tally_consing (nbytes);
> + return xmalloc (nbytes);
> +}
Sorry if it's a stupid question, but if the operation doesn't add any
Lisp "garbage", why increase the consing counter? That is likely
triggers more GCs earlier which otherwise might not run, and if there
are no slots to GC, it seems like they would run in vain.
^ permalink raw reply [flat|nested] 2+ messages in thread
[parent not found: <20240104155642.6326FC00344@vcs2.savannah.gnu.org>]
end of thread, other threads:[~2024-01-04 18:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <170438379722.3921.9312235725296561206@vcs2.savannah.gnu.org>
[not found] ` <20240104155642.B4A99C00344@vcs2.savannah.gnu.org>
2024-01-04 17:32 ` scratch/hash-table-perf 2d28042f56a 19/35: Use non-Lisp allocation for internal hash-table vectors Dmitry Gutov
[not found] ` <20240104155642.6326FC00344@vcs2.savannah.gnu.org>
2024-01-04 18:52 ` scratch/hash-table-perf 3e9e68333ae 16/35: Remove rehash-threshold and rehash-size struct members Dmitry Gutov
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).