From d33fc26450aa3493f5382d2ce497286c17fb7c29 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Thu, 30 Jul 2020 15:09:19 -0700 Subject: [PATCH] Manual: Clarify meaning of `size` argument in strings. --- manual/tracy.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manual/tracy.tex b/manual/tracy.tex index e593913a..8b777bd2 100644 --- a/manual/tracy.tex +++ b/manual/tracy.tex @@ -737,7 +737,7 @@ When dealing with Tracy macros, you will encounter two ways of providing string \begin{enumerate} \item When a macro only accepts a pointer (for example: \texttt{TracyMessageL(text)}), the provided string data must be accessible at any time in program execution (\emph{this also includes the time after exiting the \texttt{main} function}). The string also cannot be changed. This basically means that the only option is to use a string literal (e.g.: \texttt{TracyMessageL("Hello")}). -\item If there's a string pointer with a size parameter (for example: \texttt{TracyMessage(text, size)}), the profiler will allocate an internal temporary buffer to store the data. The pointed-to data is not used afterwards. You should be aware that allocating and copying memory involved in this operation has a small time cost. +\item If there's a string pointer with a size parameter (for example: \texttt{TracyMessage(text, size)}), the profiler will allocate an internal temporary buffer to store the data. The \texttt{size} count should not include the terminating null character; \texttt{strlen(text)} is fine. The pointed-to data is not used afterwards. You should be aware that allocating and copying memory involved in this operation has a small time cost. \end{enumerate} \subsection{Specifying colors}