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.

##########
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` is 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:
us...@infra.apache.org


Reply via email to