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 2020/11/20 23:12:38 UTC

[GitHub] [incubator-nuttx] acassis opened a new pull request #2355: esp32_himem: Fix issue that was preventing to map all free memory

acassis opened a new pull request #2355:
URL: https://github.com/apache/incubator-nuttx/pull/2355


   ## Summary
   esp32_himem: Fix issue that was preventing to map all free memory
   ## Impact
   User will be able to use all free PSRAM memory
   ## Testing
   esp32-core
   


----------------------------------------------------------------
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



[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #2355: esp32_himem: Fix issue that was preventing to map all free memory

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #2355:
URL: https://github.com/apache/incubator-nuttx/pull/2355


   


----------------------------------------------------------------
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



[GitHub] [incubator-nuttx] acassis commented on a change in pull request #2355: esp32_himem: Fix issue that was preventing to map all free memory

Posted by GitBox <gi...@apache.org>.
acassis commented on a change in pull request #2355:
URL: https://github.com/apache/incubator-nuttx/pull/2355#discussion_r528325166



##########
File path: arch/xtensa/src/esp32/esp32_himem.c
##########
@@ -320,7 +320,7 @@ static bool allocate_blocks(int count, uint16_t *blocks_out)
       for (i = 0; i < count; i++)
         {
           g_ram_descriptor[blocks_out[i]].is_alloced = true;
-          g_ram_descriptor[blocks_out[i]].is_mapped  = false;
+          assert(g_ram_descriptor[blocks_out[i]].is_mapped  == false);

Review comment:
       assert is defined to DEBUGASSERT when CONFIG_DEBUG_ASSERTIONS is defined, otherwise it is defined to do nothing, please see include/assert.h for reference.




----------------------------------------------------------------
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



[GitHub] [incubator-nuttx] acassis commented on a change in pull request #2355: esp32_himem: Fix issue that was preventing to map all free memory

Posted by GitBox <gi...@apache.org>.
acassis commented on a change in pull request #2355:
URL: https://github.com/apache/incubator-nuttx/pull/2355#discussion_r528334501



##########
File path: arch/xtensa/src/esp32/esp32_himem.c
##########
@@ -320,7 +320,7 @@ static bool allocate_blocks(int count, uint16_t *blocks_out)
       for (i = 0; i < count; i++)
         {
           g_ram_descriptor[blocks_out[i]].is_alloced = true;
-          g_ram_descriptor[blocks_out[i]].is_mapped  = false;
+          assert(g_ram_descriptor[blocks_out[i]].is_mapped  == false);

Review comment:
       Ok, I decided to replace assert with DEBUGASSERT to follow the standard.




----------------------------------------------------------------
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



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #2355: esp32_himem: Fix issue that was preventing to map all free memory

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #2355:
URL: https://github.com/apache/incubator-nuttx/pull/2355#discussion_r528079011



##########
File path: arch/xtensa/src/esp32/esp32_himem.c
##########
@@ -320,7 +320,7 @@ static bool allocate_blocks(int count, uint16_t *blocks_out)
       for (i = 0; i < count; i++)
         {
           g_ram_descriptor[blocks_out[i]].is_alloced = true;
-          g_ram_descriptor[blocks_out[i]].is_mapped  = false;
+          assert(g_ram_descriptor[blocks_out[i]].is_mapped  == false);

Review comment:
       should we change to DEBUGASSERT?




----------------------------------------------------------------
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