From 4e6f25806e3c9fa4753ce959ef990167796acd32 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 14 May 2026 15:55:33 +0200 Subject: Tests and fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libtest/libtest.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'libtest/libtest.h') diff --git a/libtest/libtest.h b/libtest/libtest.h index 8f44114..e4b4098 100644 --- a/libtest/libtest.h +++ b/libtest/libtest.h @@ -7,18 +7,27 @@ /** * Start tracking resources which `libtest_check_no_leaks` * will detect if they are not released + * + * Memory resource tracking will only be started for the + * calling thread */ void libtest_start_tracking(void); /** * Stop tracking resources, so that `libtest_check_no_leaks` * will not detect if they are not released + * + * Memory resource tracking will only be stop for the + * calling thread */ void libtest_stop_tracking(void); /** * Check for resource leaks * + * Memory leaks are detected for all threads with + * tracking enabled, not just the calling thread + * * Any leak will be printed to standard error * * @return 1 if there was no leaks, 0 otherwise @@ -30,6 +39,8 @@ int libtest_check_no_leaks(void); * Make all overriden memory allocation functions * full the usable memory area with null bytes, * or disable this feature + * + * The setting applies only to the calling thread * * @param enabled 1 to enable, 0 to disable */ @@ -40,6 +51,8 @@ void libtest_force_zero_on_alloc(int enabled); * check that the entire usable memory area is filled * with null bytes, or disable this feature * + * The setting applies only to the calling thread + * * @param enabled 1 to enable, 0 to disable */ void libtest_expect_zeroed_on_free(int enabled); -- cgit v1.2.3-70-g09d2