diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2025-01-29 06:28:48 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2025-01-29 06:28:48 -0800 |
commit | f8658bd4898f415de90f50121afe42a6cad50910 (patch) | |
tree | 92d96d0b6e57688f6e8f619170a896842ef4a6dd /tests/002/proc | |
parent | bb71dcaa3ce19ec48d8b352566a21cb1f5f26c2f (diff) | |
download | txr-f8658bd4898f415de90f50121afe42a6cad50910.tar.gz txr-f8658bd4898f415de90f50121afe42a6cad50910.tar.bz2 txr-f8658bd4898f415de90f50121afe42a6cad50910.zip |
build: remove HAVE_MALLOC_USABLE_SIZE.
The malloc_usable_size use in the STR type actually makes
operations like string_extend substantially slower. It is
faster to store the allocated size locally.
Originally, on platforms that have malloc_usable_size,
we were able to use the word of memory reclaimed from
the string type to store a cached hash code. But that logic
was revereted in 2022, so there is no such benefit.
* configure (have_malloc_usable_size): Variable
removed. Test for the malloc_usable_size function
removed.
(HAVE_MALLOC_USABLE_SIZE, HAVE_MALLOC_NP): Do not define
these preprocessor symbols.
* lib.c (HAVE_MALLOC_NP_H): Do not test for this variale
to include <malloc_np.h>
(string-own, string, string_utf8, mkstring, mkustring,
string_extend, string_finish, string_set_code,
string_get_code, length_str): Eliminate #ifdefs
on HAVE_MALLOC_USABLE_SIZE.
* lib.h (struct wstring): Eliminate #ifdef on
MALLOC_USABLE_SIZE, so alloc member is unconditionally
defined on all platforms.
Diffstat (limited to 'tests/002/proc')
0 files changed, 0 insertions, 0 deletions