You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/06/22 07:07:39 UTC

[GitHub] [incubator-nuttx] Ouss4 commented on a change in pull request #3960: xtensa/esp32: Refactor the text heap and add RTC memory to it

Ouss4 commented on a change in pull request #3960:
URL: https://github.com/apache/incubator-nuttx/pull/3960#discussion_r655935160



##########
File path: arch/xtensa/src/esp32/esp32_textheap.c
##########
@@ -57,16 +51,11 @@ struct mm_heap_s g_textheap;
 
 void up_textheap_init()
 {
-  mm_initialize(&g_textheap, &_stextheap, &_etextheap - &_stextheap);
-
-#if defined(CONFIG_FS_PROCFS) && !defined(CONFIG_FS_PROCFS_EXCLUDE_MEMINFO)
-  static struct procfs_meminfo_entry_s g_textheap_procfs;
-
-  g_textheap_procfs.name = "textheap";
-  g_textheap_procfs.mallinfo = (void *)mm_mallinfo;
-  g_textheap_procfs.user_data = &g_textheap;
-  procfs_register_meminfo(&g_textheap_procfs);
+#ifdef CONFIG_ESP32_RTC_HEAP
+  esp32_rtc_heap_initialize();

Review comment:
       Which one is better?  I personally prefer the smooshed `rtcheap`, but I was told it wasn't too readable.  Actually the coding standard requires underscores to separate the module and the function but discourages further use, so I think `esp32_rtcheap_initialize` should be the "correct" one.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org