mbox series

[0/2] malloc: add multi-threaded tests for aligned_alloc/calloc/malloc

Message ID 20240627142028.134709-1-mmartinv@redhat.com
Headers show
Series malloc: add multi-threaded tests for aligned_alloc/calloc/malloc | expand

Message

Miguel Martín June 27, 2024, 2:20 p.m. UTC
Improve aligned_alloc/calloc/malloc test coverage by adding
multi-threaded tests with random memory allocations and with/without
cross-thread memory deallocations.

Modify the existing DSO used for random memory allocations to avoid
getting global locks in the allocation process.

The new tests are added to tests-exclude-mcheck as they don't seem
to play well with mcheck and I have not been able to find any problem
with the tests themselves. Happy to fix anything and/or file an issue
in mcheck for further investigation.

Miguel Martín (2):
  malloc: avoid global locks in tst-aligned_alloc-lib.c
  malloc: add multi-threaded tests for aligned_alloc/calloc/malloc

 malloc/Makefile                               |   8 +
 .../tst-aligned-alloc-random-thread-cross.c   |  19 ++
 malloc/tst-aligned-alloc-random-thread.c      | 170 ++++++++++++++++++
 malloc/tst-aligned_alloc-lib.c                |  39 ++--
 4 files changed, 217 insertions(+), 19 deletions(-)
 create mode 100644 malloc/tst-aligned-alloc-random-thread-cross.c
 create mode 100644 malloc/tst-aligned-alloc-random-thread.c

--
Miguel Martín
mmartinv@redhat.com