Memory Manager Diagnostics doesn't work

Hi,

We are working with SDK v14.1 and are trying to debug some memory issues by enabling MEM_MANAGER_ENABLE_DIAGNOSTICS.

In memory_manager.c in function print_block_info() the macro NRF_LOG_BYTES_DEBUG is used to print the status of the memory blocks. This macro however isn't defined anywhere, seems like the log module doesn't implement it.

We tried to replace this macro by various variants of NRF_LOG_DEBUG, but it seems (also according to its definition), that this macro only allows to print strings that are defined during compile time (const). Any run time-defined strings in functions can't be printed, since their pointer becomes invalid after the function returns.

We solved the problem by changing the print_buffer array in function print_block_info() to static, to keep the pointer valid. Since the print_block_info() is called 7 times after another for all types of memory block size, print_buffer had to be changed to a two dimensional array.

This however consumes 7*80=560 bytes of RAM, essentially wasting memory, so we were wondering if there was an easier solution to this issue.

Thanks, Carl