From 73e72bb088096079776f1425fc5d7a6de6d76cf4 Mon Sep 17 00:00:00 2001 From: "Trowbridge, Ian" Date: Wed, 22 Jan 2025 11:20:50 -0600 Subject: [PATCH] Documentation Update to reflect that memory allocation trace records null pointers for free operations (#127) Update documentation to reflect that nullpointers can be recorded in free memory operations --- source/docs/how-to/using-rocprofv3.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/docs/how-to/using-rocprofv3.rst b/source/docs/how-to/using-rocprofv3.rst index 844d087407..3947bf1e77 100644 --- a/source/docs/how-to/using-rocprofv3.rst +++ b/source/docs/how-to/using-rocprofv3.rst @@ -533,7 +533,10 @@ In addition to the HSA memory allocation functions listed above, the correspondi free functions ``hsa_memory_free``, ``hsa_amd_memory_pool_free``, and ``hsa_amd_vmem_handle_release`` are also tracked. Unlike the allocation functions, however, only the address of the freed memory is recorded. As such, the agent id and size of the freed memory are recorded as 0 in the CSV and -JSON outputs. +JSON outputs. It should be noted that it is possible for some free functions to records a null +pointer address of 0x0. This situation can occur when some HIP functions such as hipStreamDestroy +call underlying HSA free functions with null pointers, even if the user never explicitly calls +free memory functions with null pointer addresses. To trace memory allocations during the application run, use: