You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "xiaoxiang781216 (via GitHub)" <gi...@apache.org> on 2023/10/07 12:19:18 UTC
[PR] Improve arch text heap implementation [nuttx]
xiaoxiang781216 opened a new pull request, #10871:
URL: https://github.com/apache/nuttx/pull/10871
## Summary
- arch: Remove up_textheap_heapmember related stuff
- arch/sim: Call host_memalign in up_allocate_heap
- arch/sim: Simplify the implementation of textheap
- arch: Change ARCH_USE_TEXT_HEAP default to y instead selection
## Impact
sim elf loader
## Testing
sim:elf
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Improve arch text heap implementation [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #10871:
URL: https://github.com/apache/nuttx/pull/10871#issuecomment-1761668914
> what's your motivation?
>
> > arch: Change ARCH_USE_TEXT_HEAP default to y instead selection
>
> as you see in the CI results,
ci failure isn't related to this change, and is fixed now.
> this affects more things than sim. in case of esp32, it also controls associated trap handler behavior.
The default setting is same as before, the change just makes it possible to disable ARCH_USE_TEXT_HEAP from defconfig.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] arch/sim: improve arch text heap implementation [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 closed pull request #10871: arch/sim: improve arch text heap implementation
URL: https://github.com/apache/nuttx/pull/10871
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Improve arch text heap implementation [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #10871:
URL: https://github.com/apache/nuttx/pull/10871#issuecomment-1762662013
@yamt the patch you concern is removed from pr, please review again.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] arch/sim: improve arch text heap implementation [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 closed pull request #10871: arch/sim: improve arch text heap implementation
URL: https://github.com/apache/nuttx/pull/10871
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Improve arch text heap implementation [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #10871:
URL: https://github.com/apache/nuttx/pull/10871#discussion_r1358378418
##########
arch/sim/src/sim/posix/sim_hostmemory.c:
##########
@@ -60,18 +60,18 @@ static atomic_int g_uordblks;
*
****************************************************************************/
-void *host_allocheap(size_t sz)
+void *host_allocheap(size_t size, bool exec)
{
void *p;
#if defined(CONFIG_HOST_MACOS) && defined(CONFIG_HOST_ARM64)
/* see: https://developer.apple.com/forums/thread/672804 */
- p = host_uninterruptible(mmap, NULL, sz, PROT_READ | PROT_WRITE,
+ p = host_uninterruptible(mmap, NULL, size, PROT_READ | PROT_WRITE,
MAP_ANON | MAP_SHARED, -1, 0);
#else
- p = host_uninterruptible(mmap, NULL, sz,
- PROT_READ | PROT_WRITE | PROT_EXEC,
+ p = host_uninterruptible(mmap, NULL, size, PROT_READ | PROT_WRITE |
+ exec ? PROT_EXEC : 0,
Review Comment:
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Improve arch text heap implementation [nuttx]
Posted by "yamt (via GitHub)" <gi...@apache.org>.
yamt commented on PR #10871:
URL: https://github.com/apache/nuttx/pull/10871#issuecomment-1754740582
what's your motivation?
.
as you see in the CI results, this affects more things than sim.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Improve arch text heap implementation [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #10871:
URL: https://github.com/apache/nuttx/pull/10871#issuecomment-1754795993
> what's your motivation?
>
> > arch: Change ARCH_USE_TEXT_HEAP default to y instead selection
>
> as you see in the CI results, this affects more things than sim. in case of esp32, it also controls associated trap handler behavior.
since it's impossible to disable ARCH_USE_TEXT_HEAP from defconfig, if selection is done in Kconfig.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Improve arch text heap implementation [nuttx]
Posted by "Donny9 (via GitHub)" <gi...@apache.org>.
Donny9 commented on code in PR #10871:
URL: https://github.com/apache/nuttx/pull/10871#discussion_r1358367945
##########
arch/sim/src/sim/posix/sim_hostmemory.c:
##########
@@ -60,18 +60,18 @@ static atomic_int g_uordblks;
*
****************************************************************************/
-void *host_allocheap(size_t sz)
+void *host_allocheap(size_t size, bool exec)
{
void *p;
#if defined(CONFIG_HOST_MACOS) && defined(CONFIG_HOST_ARM64)
/* see: https://developer.apple.com/forums/thread/672804 */
- p = host_uninterruptible(mmap, NULL, sz, PROT_READ | PROT_WRITE,
+ p = host_uninterruptible(mmap, NULL, size, PROT_READ | PROT_WRITE,
MAP_ANON | MAP_SHARED, -1, 0);
#else
- p = host_uninterruptible(mmap, NULL, sz,
- PROT_READ | PROT_WRITE | PROT_EXEC,
+ p = host_uninterruptible(mmap, NULL, size, PROT_READ | PROT_WRITE |
+ exec ? PROT_EXEC : 0,
Review Comment:
need to add () to exec ? PROT_EXEC : 0
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org