I have a C function that is called thousands of times and I have noticed that it is the only possible place for a memory leak. I have used Valgrind and Totalview\'s
A string literal itself does not allocate or free memory, and therefore cannot leak.
Declaring them const
won't change anything. Your problem is elsewhere.
Could those string literals like "HEADER" and "DATA" be causing my small leak?
Nope.
No. A string literal has static storage duration and so its storage is reserved prior to the program startup and its lifetime is the entire execution of the program.
Answer is yes, but it depends what does ItCreate do. Paste ItCreate function code.