1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-01 22:28:02 +02:00
gnupg/tests/gpgscm
Justus Winter 8640fa880d
gpgscm: Allocate small integers in the rodata section.
* 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>
2017-04-07 13:50:20 +02:00
..
ffi-private.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
ffi.c tests,w32: Use GetTempPath to get the path for temporary files. 2017-03-21 15:52:47 +01:00
ffi.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
ffi.scm tests: Check expiration times of created keys. 2017-02-15 14:53:07 +01:00
init.scm gpgscm: Guard use of tagged expressions. 2017-02-17 10:43:20 +01:00
lib.scm gpgscm: Guard use of tagged expressions. 2017-02-17 10:43:20 +01:00
LICENSE.TinySCHEME Add license notices for TinySCHEME. 2016-06-17 18:53:45 +02:00
main.c More change for common. 2017-03-07 20:32:09 +09:00
Makefile.am gpgscm: Allocate small integers in the rodata section. 2017-04-07 13:50:20 +02:00
Manual.txt Fix more spelling 2016-09-17 16:00:37 +09:00
opdefines.h gpgscm: Keep a history of calls for error messages. 2016-12-08 17:15:20 +01:00
private.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
repl.scm gpgscm: Better error reporting. 2016-12-08 17:22:50 +01:00
scheme-config.h gpgscm: Use system strlwr if available. 2017-03-07 14:33:27 +01:00
scheme-private.h gpgscm: Allocate small integers in the rodata section. 2017-04-07 13:50:20 +02:00
scheme.c gpgscm: Allocate small integers in the rodata section. 2017-04-07 13:50:20 +02:00
scheme.h gpgscm: Keep a history of calls for error messages. 2016-12-08 17:15:20 +01:00
small-integers.h gpgscm: Allocate small integers in the rodata section. 2017-04-07 13:50:20 +02:00
t-child.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
t-child.scm gpgscm: Improve test of low-level functions. 2016-10-07 16:25:55 +02:00
tests.scm gpgscm: Make test cleanup more robust. 2017-03-23 15:56:34 +01:00
time.scm tests: Check expiration times of created keys. 2017-02-15 14:53:07 +01:00