aboutsummaryrefslogtreecommitdiff
path: root/resolv
diff options
context:
space:
mode:
authorMiguel Martín <mmartinv@redhat.com>2024-07-16 17:14:57 +0200
committerArjun Shankar <arjun@redhat.com>2024-07-22 11:54:46 +0200
commitb0fbcb7d0051a68baf26b2aed51a8a31c34d68e5 (patch)
treef80235fae7cfdd2d77cc078fa6a0b9b8799f92c4 /resolv
parent9a27b566b2048f599048f2f4afe1cce06c4ef43d (diff)
downloadglibc-b0fbcb7d0051a68baf26b2aed51a8a31c34d68e5.zip
glibc-b0fbcb7d0051a68baf26b2aed51a8a31c34d68e5.tar.gz
glibc-b0fbcb7d0051a68baf26b2aed51a8a31c34d68e5.tar.bz2
malloc: add multi-threaded tests for aligned_alloc/calloc/malloc
Improve aligned_alloc/calloc/malloc test coverage by adding multi-threaded tests with random memory allocations and with/without cross-thread memory deallocations. Perform a number of memory allocation calls with random sizes limited to 0xffff. Use the existing DSO ('malloc/tst-aligned_alloc-lib.c') to randomize allocator selection. The multi-threaded allocation/deallocation is staged as described below: - Stage 1: Half of the threads will be allocating memory and the other half will be waiting for them to finish the allocation. - Stage 2: Half of the threads will be allocating memory and the other half will be deallocating memory. - Stage 3: Half of the threads will be deallocating memory and the second half waiting on them to finish. Add 'malloc/tst-aligned-alloc-random-thread.c' where each thread will deallocate only the memory that was previously allocated by itself. Add 'malloc/tst-aligned-alloc-random-thread-cross.c' where each thread will deallocate memory that was previously allocated by another thread. The intention is to be able to utilize existing malloc testing to ensure that similar allocation APIs are also exposed to the same rigors. Reviewed-by: Arjun Shankar <arjun@redhat.com>
Diffstat (limited to 'resolv')
0 files changed, 0 insertions, 0 deletions