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-unsubscr...@nuttx.apache.org

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

Reply via email to