diff options
author | Miguel MartÃn <mmartinv@redhat.com> | 2024-07-16 17:14:57 +0200 |
---|---|---|
committer | Arjun Shankar <arjun@redhat.com> | 2024-07-22 11:54:46 +0200 |
commit | b0fbcb7d0051a68baf26b2aed51a8a31c34d68e5 (patch) | |
tree | f80235fae7cfdd2d77cc078fa6a0b9b8799f92c4 /gmon | |
parent | 9a27b566b2048f599048f2f4afe1cce06c4ef43d (diff) | |
download | glibc-b0fbcb7d0051a68baf26b2aed51a8a31c34d68e5.tar.gz glibc-b0fbcb7d0051a68baf26b2aed51a8a31c34d68e5.tar.xz glibc-b0fbcb7d0051a68baf26b2aed51a8a31c34d68e5.zip |
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 'gmon')
0 files changed, 0 insertions, 0 deletions