mirror of
git://git.gnupg.org/gnupg.git
synced 2024-06-01 22:28:02 +02:00
8640fa880d
* tests/gpgscm/Makefile.am (gpgscm_SOURCES): Add new file. * tests/gpgscm/scheme-private.h (struct cell): Move number to the top of the union so that we can initialize it. (struct scheme): Remove 'integer_segment'. * tests/gpgscm/scheme.c (initialize_small_integers): Remove function. (small_integers): New variable. (MAX_SMALL_INTEGER): Compute. (mk_small_integer): Adapt. (mark): Avoid marking objects already marked. This allows us to run the algorithm over objects in the rodata section if they are already marked. (scheme_init_custom_alloc): Remove initialization. (scheme_deinit): Remove deallocation. * tests/gpgscm/small-integers.h: New file. -- Allocate small integers from a fixed pool in the rodata section. This spares us the initialization, and deduplicates integers across different processes. It also makes the integers immutable, increasing memory safety. Signed-off-by: Justus Winter <justus@g10code.com> |
||
---|---|---|
.. | ||
ffi-private.h | ||
ffi.c | ||
ffi.h | ||
ffi.scm | ||
init.scm | ||
lib.scm | ||
LICENSE.TinySCHEME | ||
main.c | ||
Makefile.am | ||
Manual.txt | ||
opdefines.h | ||
private.h | ||
repl.scm | ||
scheme-config.h | ||
scheme-private.h | ||
scheme.c | ||
scheme.h | ||
small-integers.h | ||
t-child.c | ||
t-child.scm | ||
tests.scm | ||
time.scm |