gustavonihei commented on code in PR #8140: URL: https://github.com/apache/nuttx/pull/8140#discussion_r1071268642
########## include/nuttx/mm/mm.h: ########## @@ -88,9 +88,11 @@ /* The kernel heap is never accessible from user code */ +#if defined(CONFIG_BUILD_KERNEL) || defined(CONFIG_BUILD_PROTECTED) #ifndef __KERNEL__ Review Comment: Sorry, @xiaoxiang781216, but again this suggestion is not equivalent to the initially proposed patch. `CONFIG_MM_KERNEL_HEAP` must be undefined only when building the Userspace image, which only exists under `CONFIG_BUILD_KERNEL` and `CONFIG_BUILD_PROTECTED`. So we need to ensure `!defined(__KERNEL__)`. The one-line equivalent should then be: ``` #if (defined(CONFIG_BUILD_KERNEL) || defined(CONFIG_BUILD_PROTECTED)) && !defined(__KERNEL__) ``` Under `CONFIG_BUILD_FLAT`, `__KERNEL__` is always defined, since it builds a single image. -- 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