<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Unable to use Memory Manager Diagnostics even on the latest SDK (SDK 17.0.2)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/67058/unable-to-use-memory-manager-diagnostics-even-on-the-latest-sdk-sdk-17-0-2</link><description>Hello, 
 I am using SDK 17.0.2 and want to use Memory Manager Diagnostics . 
 I have added to my project&amp;#39;s sdk_config.h the following : 
 #ifndef MEM_MANAGER_ENABLE_DIAGNOSTICS #define MEM_MANAGER_ENABLE_DIAGNOSTICS 1 #endif 
 Once I tried to build my</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 12 Jul 2021 15:36:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/67058/unable-to-use-memory-manager-diagnostics-even-on-the-latest-sdk-sdk-17-0-2" /><item><title>RE: Unable to use Memory Manager Diagnostics even on the latest SDK (SDK 17.0.2)</title><link>https://devzone.nordicsemi.com/thread/319655?ContentTypeID=1</link><pubDate>Mon, 12 Jul 2021 15:36:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e337bef-af3a-4da6-b96e-e0cb4c28f119</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Yes, that looks correct.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to use Memory Manager Diagnostics even on the latest SDK (SDK 17.0.2)</title><link>https://devzone.nordicsemi.com/thread/318618?ContentTypeID=1</link><pubDate>Mon, 05 Jul 2021 11:36:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca5ebb7c-cd3f-40d3-bb95-a6165427f442</guid><dc:creator>jar0d</dc:creator><description>&lt;p&gt;Thank you J&amp;oslash;rgen,&lt;/p&gt;
&lt;p&gt;it definitely solves the issue. I noticed that&amp;nbsp;the rows have actually seven columns and not six as you can see from the table header. I added the extra Max Count Column header. Is it correct?&lt;/p&gt;
&lt;p&gt;Before&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Schermata-2021_2D00_07_2D00_05-alle-13.27.31.png" /&gt;&lt;/p&gt;
&lt;p&gt;After&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Schermata-2021_2D00_07_2D00_05-alle-13.35.20.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to use Memory Manager Diagnostics even on the latest SDK (SDK 17.0.2)</title><link>https://devzone.nordicsemi.com/thread/318577?ContentTypeID=1</link><pubDate>Mon, 05 Jul 2021 09:14:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35126636-c17c-4450-8a39-5bc0ed23f997</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Try pushing the string as described in&amp;nbsp;&lt;a title="Deferred processing" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_nrf_log.html?cp=8_1_3_27_0_1#lib_nrf_log_deferred"&gt;Deferred processing&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void foo(void)
{ 
    char string_on_stack[] = &amp;quot;stack&amp;quot;;
    //nrf_log_push() copies the string into the logger buffer and returns address from the logger buffer
    NRF_LOG_INFO(&amp;quot;%s&amp;quot;,NRF_LOG_PUSH(string_on_stack));
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Most likely, the string goes out of scope and is overwritten before the logs are processed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to use Memory Manager Diagnostics even on the latest SDK (SDK 17.0.2)</title><link>https://devzone.nordicsemi.com/thread/318401?ContentTypeID=1</link><pubDate>Fri, 02 Jul 2021 10:36:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:687d35b2-71f3-45ab-94aa-f0949e63be5a</guid><dc:creator>jar0d</dc:creator><description>&lt;p&gt;Hello J&amp;oslash;rgen,&lt;/p&gt;
&lt;p&gt;I attach my post to your answer because I feel it could be related to this old issue. Even if I set all the count blocks in sdk_config.h I get this (SDK 17.0.2)&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Schermata-2021_2D00_07_2D00_02-alle-12.31.03.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;It seems all the rows are not properly managed. Under debug print_buffer contained in the row&amp;nbsp;&lt;/p&gt;
&lt;p&gt;NRF_LOG_INFO(&amp;quot;%s&amp;quot;, print_buffer);&lt;/p&gt;
&lt;p&gt;has the right value&lt;/p&gt;
&lt;p&gt;&amp;quot;| XXSmall &amp;nbsp; &amp;nbsp;| 4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 100 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;quot;&lt;/p&gt;
&lt;p&gt;But then the result is what you can see above.&lt;/p&gt;
&lt;p&gt;What is my fault?&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to use Memory Manager Diagnostics even on the latest SDK (SDK 17.0.2)</title><link>https://devzone.nordicsemi.com/thread/276964?ContentTypeID=1</link><pubDate>Mon, 26 Oct 2020 16:50:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d027c51-3260-4d94-a1f6-bddbf9a3f24e</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;It looks like&amp;nbsp;print_block_info() will only print info if the block category is included:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// No statistic provided in case block category is not included.
if (m_block_count[block_cat] != 0)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Have you set any of the&amp;nbsp;MEMORY_MANAGER_{SIZE}_BLOCK_COUNT defines in your sdk_config.h file?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to use Memory Manager Diagnostics even on the latest SDK (SDK 17.0.2)</title><link>https://devzone.nordicsemi.com/thread/275870?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2020 11:18:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8bb9fc73-fd3e-4bf6-b708-88c62434b46c</guid><dc:creator>Rafalino</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Can someone explain what should we see when running&amp;nbsp;&amp;nbsp;&lt;span&gt;nrf_mem_diagnose()&amp;nbsp;?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks in advance ,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Rafalno&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to use Memory Manager Diagnostics even on the latest SDK (SDK 17.0.2)</title><link>https://devzone.nordicsemi.com/thread/275005?ContentTypeID=1</link><pubDate>Thu, 15 Oct 2020 08:40:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9f6101f-b039-4a42-9682-4919b3a59dc4</guid><dc:creator>Rafalino</dc:creator><description>&lt;p&gt;&lt;span&gt;Hello&amp;nbsp;&lt;/span&gt;&lt;span&gt;J&amp;oslash;rgen,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have used this updated version of&amp;nbsp;mem_manager.c and also&amp;nbsp;enabled the memory manager log :&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;#define MEM_MANAGER_CONFIG_LOG_ENABLED 1&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;I call&amp;nbsp; nrf_mem_diagnose_reset()&amp;nbsp;,&amp;nbsp;nrf_mem_diagnose() every&amp;nbsp;two seconds.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This is what I see in my log&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#993300;"&gt;00&amp;gt; &amp;lt;info&amp;gt; mem_mngr: +------------+------------+------------+------------+------------+------------+&lt;br /&gt;00&amp;gt; &lt;br /&gt;00&amp;gt; &amp;lt;info&amp;gt; mem_mngr: | Block | Size | Total | In Use | Min Alloc | Max Alloc |&lt;br /&gt;00&amp;gt; &lt;br /&gt;00&amp;gt; &amp;lt;info&amp;gt; mem_mngr: +------------+------------+------------+------------+------------+------------+&lt;br /&gt;00&amp;gt; &lt;br /&gt;00&amp;gt; &amp;lt;info&amp;gt; mem_mngr: &lt;br /&gt;00&amp;gt; &lt;br /&gt;00&amp;gt; &amp;lt;info&amp;gt; mem_mngr: &lt;br /&gt;00&amp;gt; &lt;br /&gt;00&amp;gt; &amp;lt;info&amp;gt; mem_mngr: &lt;br /&gt;00&amp;gt; &lt;br /&gt;00&amp;gt; &amp;lt;info&amp;gt; mem_mngr: +------------+------------+------------+------------+------------+------------+&lt;br /&gt;00&amp;gt; &lt;br /&gt;00&amp;gt; &amp;lt;info&amp;gt; mem_mngr: | Total | 98432 | 526 | 64&lt;br /&gt;00&amp;gt; &lt;br /&gt;00&amp;gt; &amp;lt;info&amp;gt; mem_mngr: +------------+------------+------------+------------+------------+------------+&lt;br /&gt;00&amp;gt; &lt;br /&gt;00&amp;gt; &amp;lt;info&amp;gt; mem_mngr: 2: 0 -&amp;gt; 1&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have the feeling that it is not working as expected.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Can you please&amp;nbsp;clarify?&lt;/p&gt;
&lt;p&gt;Thanks in advance ,&lt;/p&gt;
&lt;p&gt;Rafalino&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to use Memory Manager Diagnostics even on the latest SDK (SDK 17.0.2)</title><link>https://devzone.nordicsemi.com/thread/274882?ContentTypeID=1</link><pubDate>Wed, 14 Oct 2020 12:21:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd0fd723-fff5-4347-9ec8-e84c2e16c67a</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Ok, sorry. I though the rest of the errors was caused by the first one, but I see some of them are separate errors (missing&amp;nbsp;&lt;span&gt;m_max_count and semicolon after&amp;nbsp;NRF_MEM_MANAGER_DIAGNOSE/NRF_MEM_MANAGER_DIAGNOSE_RESET). I have attached a version of the file that compiles in the application, but I did not do any further testing:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/8244.mem_5F00_manager.c"&gt;devzone.nordicsemi.com/.../8244.mem_5F00_manager.c&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I will add the other errors to the internal report.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to use Memory Manager Diagnostics even on the latest SDK (SDK 17.0.2)</title><link>https://devzone.nordicsemi.com/thread/274720?ContentTypeID=1</link><pubDate>Tue, 13 Oct 2020 15:17:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f497ef75-0b5b-4de5-a291-aa0f0c9ab26a</guid><dc:creator>Rafalino</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;span&gt;J&amp;oslash;rgen,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;As you can see from the log above , the Typo on line 504 in&amp;nbsp;mem_manager.c is not the only issue.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please make sure that you guys handle all other issues as well.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks in advance,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Rafalino&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to use Memory Manager Diagnostics even on the latest SDK (SDK 17.0.2)</title><link>https://devzone.nordicsemi.com/thread/274666?ContentTypeID=1</link><pubDate>Tue, 13 Oct 2020 13:12:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f15b42da-8827-408f-88e7-97faaec16f09</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There seems to be a typo on line 504 in mem_manager.c. This line:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static const uint32_t m_min_size_default[BLOC_CAT_COUNT] =&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Should be changed to:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static const uint32_t m_min_size_default[BLOCK_CAT_COUNT] =&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I will report this internally.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>