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/02/24 07:37:27 UTC

[GitHub] [incubator-nuttx] Donny9 opened a new pull request #2906: libc/valloc: support valloc

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


   ## Summary
   valloc has the same effect as malloc(), except that the allocated memory is aligned to a page boundary.
   Reference:https://linux.die.net/man/3/valloc
   ## Impact
   
   ## Testing
   daily test
   


----------------------------------------------------------------
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 pull request #2906: umm_heap/valloc: support valloc (LEGACY)

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #2906:
URL: https://github.com/apache/incubator-nuttx/pull/2906#issuecomment-786437992


   @davids5 and @patacongo can we merge this PR now?


----------------------------------------------------------------
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] btashton commented on pull request #2906: libc/valloc: support valloc

Posted by GitBox <gi...@apache.org>.
btashton commented on pull request #2906:
URL: https://github.com/apache/incubator-nuttx/pull/2906#issuecomment-784952567


   > Will you please Kconfig this and document it for what it is?
   
   Why would this go behind Kconfig it has zero cost if it is not used?


----------------------------------------------------------------
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 pull request #2906: libc/valloc: support valloc

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #2906:
URL: https://github.com/apache/incubator-nuttx/pull/2906#issuecomment-784974674


   > Sure you can argue "shoot em all " and let the linker sort it out. :)
   > 
   > I would do it so that the intent of the of why it was added is documented
   
   is it not enough with the comment before valloc? And it isn't good to mention LTP in a general function.
   
   > and left off and turned on for the project that wants to use it.
   
   NuttX already contains so many Kconfig, and it's already impossible to test all combination now. If the tool can do the selection automatically, it's wrong to add Kconfig in this case, because:
   
   1. It make harder to test all option combination
   2. Beginner also hard to do the right configuration
   
   > If not it may end up C&P at litter that is not garbage collected.
   
   Since valloc contained in a standalone file, even the oldest linker can remove the unused object files without problem.
   


----------------------------------------------------------------
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] Donny9 commented on pull request #2906: umm_heap/valloc: support valloc (LEGACY)

Posted by GitBox <gi...@apache.org>.
Donny9 commented on pull request #2906:
URL: https://github.com/apache/incubator-nuttx/pull/2906#issuecomment-786633329


   > > @davids5 and @patacongo can we merge this PR now?
   > 
   > > is it not enough with the comment before valloc
   > 
   > Did the OBSOLETE comment get added?
   
   Done!


----------------------------------------------------------------
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] yamt commented on pull request #2906: libc/valloc: support valloc

Posted by GitBox <gi...@apache.org>.
yamt commented on pull request #2906:
URL: https://github.com/apache/incubator-nuttx/pull/2906#issuecomment-784867048


   do you really need this obsolete api?


----------------------------------------------------------------
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] davids5 merged pull request #2906: umm_heap/valloc: support valloc (LEGACY)

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


   


----------------------------------------------------------------
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] davids5 commented on pull request #2906: libc/valloc: support valloc

Posted by GitBox <gi...@apache.org>.
davids5 commented on pull request #2906:
URL: https://github.com/apache/incubator-nuttx/pull/2906#issuecomment-784991084


   > is it not enough with the comment before valloc?
   
   What comment? Did I miss it? Maybe add one, that labels it as `obsolete` and that will work. 
   
    > And it isn't good to mention LTP in a general function.
   
   LOL... I was referring to documenting it in the Kconfig. --help - Something to the effect "This is an obsolete function that can be enabled to be used by some third partly libraries that require it."  
   
   > Beginner also hard to do the right configuration
   
   Yes very true. You can say the same about a Beginner developer, new to NuttX, dealing with lots of functions that were added to to make the build work for a project that should not be used. and it not referenced anywhere in this project.
   
   It is a case of information overload. Unqualified information - leaves the user overwhelmed.  If you qualify it it it can be ignored.
   
   I do see your point. I agree with it.  Please add a comment and call it a done.
   


----------------------------------------------------------------
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] davids5 commented on pull request #2906: umm_heap/valloc: support valloc (LEGACY)

Posted by GitBox <gi...@apache.org>.
davids5 commented on pull request #2906:
URL: https://github.com/apache/incubator-nuttx/pull/2906#issuecomment-786613220


   > @davids5 and @patacongo can we merge this PR now?
   
   > is it not enough with the comment before valloc
   
   Did the OBSOLETE comment get added?


----------------------------------------------------------------
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] davids5 commented on pull request #2906: libc/valloc: support valloc

Posted by GitBox <gi...@apache.org>.
davids5 commented on pull request #2906:
URL: https://github.com/apache/incubator-nuttx/pull/2906#issuecomment-784958101


   Sure you can argue "shoot em all " and let the linker sort it out.  :)
   
   I would do it so that the intent of the of why it was added is documented and left off and turned on for the project that wants to use it.  If not it may end up C&P at litter that is not garbage collected.


----------------------------------------------------------------
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] yamt commented on pull request #2906: libc/valloc: support valloc

Posted by GitBox <gi...@apache.org>.
yamt commented on pull request #2906:
URL: https://github.com/apache/incubator-nuttx/pull/2906#issuecomment-784876243


   > > do you really need this obsolete api?
   > 
   > Yes, we need it in memory api test(LTP).
   
   do you mean LTP tests valloc? it doesn't sound like a good reason to introduce it in nuttx.


----------------------------------------------------------------
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] davids5 commented on pull request #2906: libc/valloc: support valloc

Posted by GitBox <gi...@apache.org>.
davids5 commented on pull request #2906:
URL: https://github.com/apache/incubator-nuttx/pull/2906#issuecomment-784951029


   Will you please Kconfig this and document it for what it is?


----------------------------------------------------------------
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 pull request #2906: libc/valloc: support valloc

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #2906:
URL: https://github.com/apache/incubator-nuttx/pull/2906#issuecomment-784906923


   > > > do you really need this obsolete api?
   > > 
   > > 
   > > Yes, we need it in memory api test(LTP).
   > 
   > do you mean LTP tests valloc?
   
   Not test valloc, some LTP testcase call valloc to allocate the memory.
   
   > it doesn't sound like a good reason to introduce it in nuttx.
   
   If nobody call valloc, linker will eliminate the code from final binary. On the other hand, we have to modify LTP to remove valloc.


----------------------------------------------------------------
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] yamt commented on pull request #2906: libc/valloc: support valloc

Posted by GitBox <gi...@apache.org>.
yamt commented on pull request #2906:
URL: https://github.com/apache/incubator-nuttx/pull/2906#issuecomment-784908070


   > > > > do you really need this obsolete api?
   > > > 
   > > > 
   > > > Yes, we need it in memory api test(LTP).
   > > 
   > > 
   > > do you mean LTP tests valloc?
   > 
   > Not test valloc, some LTP testcase call valloc to allocate the memory.
   > 
   > > it doesn't sound like a good reason to introduce it in nuttx.
   > 
   > If nobody call valloc, linker will eliminate the code from final binary. On the other hand, we have to modify LTP to remove valloc.
   
   ok. it (LTP as an app actually using valloc) sounds like a good reason to add it.
   


----------------------------------------------------------------
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] Donny9 commented on pull request #2906: libc/valloc: support valloc

Posted by GitBox <gi...@apache.org>.
Donny9 commented on pull request #2906:
URL: https://github.com/apache/incubator-nuttx/pull/2906#issuecomment-785113569


   > Wouldn't this be more appropriate under mmh/mm_heap where all of the other memory-related APIs from stdlib.h are implemented?
   
   okay, i done in this PR.


----------------------------------------------------------------
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] Donny9 commented on pull request #2906: libc/valloc: support valloc

Posted by GitBox <gi...@apache.org>.
Donny9 commented on pull request #2906:
URL: https://github.com/apache/incubator-nuttx/pull/2906#issuecomment-784870664


   > do you really need this obsolete api?
   
   Yes, we need it in memory api test(LTP).


----------------------------------------------------------------
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] patacongo commented on pull request #2906: libc/valloc: support valloc

Posted by GitBox <gi...@apache.org>.
patacongo commented on pull request #2906:
URL: https://github.com/apache/incubator-nuttx/pull/2906#issuecomment-785062805


   Wouldn't this be more appropriate under mmh/mm_heap where all of the other memory-related APIs from stdlib.h are implemented?


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