Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mm_heap: mm malloc failed dump and panic only valid for the heap own by OS #9972

Merged
merged 1 commit into from Aug 2, 2023

Conversation

CV-Bowen
Copy link
Contributor

Summary

When other code use nuttx memory manager by call mm_xx api directly, it better to let other code to control weather dump or panic when malloc failed.

Impact

memory malloc failed dump

Testing

local project test

@CV-Bowen CV-Bowen changed the title mm_heap: mm dump and panic only valid for the heap own by OS mm_heap: mm malloc failed dump and panic only valid for the heap own by OS Jul 31, 2023
@pkarashchenko
Copy link
Contributor

Please fix

In file included from /github/workspace/sources/nuttx/include/nuttx/userspace.h:35,
                 from /github/workspace/sources/nuttx/include/nuttx/mm/mm.h:30,
                 from /github/workspace/sources/nuttx/include/nuttx/addrenv.h:32,
                 from /github/workspace/sources/nuttx/include/nuttx/sched.h:37,
                 from /github/workspace/sources/nuttx/sched/environ/environ.h:29,
                 from environ/env_findvar.c:34:
Error: /github/workspace/sources/nuttx/include/nuttx/arch.h:2605:40: error: unknown type name 'xcpt_t'
 2605 | int arch_phy_irq(FAR const char *intf, xcpt_t handler, void *arg,
      |                                        ^~~~~~
make[1]: *** [Makefile:60: env_findvar.o] Error 1

@CV-Bowen
Copy link
Contributor Author

CV-Bowen commented Aug 1, 2023

@pkarashchenko Thanks, I noticed this, the cause is the header recursive include problem when enable CONFIG_BUILD_KERNEL:
<nuttx/addrenv.h> include <nuttx/mm/mm.h>
<nuttx/mm/mm.h> include <nuttx/addrenv.h>
I will find a solution today.

When other code use nuttx memory manager by call mm_xx api directly,
it better to let other code to control weather dump or panic when
malloc failed.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
@xiaoxiang781216 xiaoxiang781216 merged commit 477602e into apache:master Aug 2, 2023
@jerpelea jerpelea added this to To-Add in Release Notes - 12.3.0 Sep 26, 2023
@jerpelea jerpelea moved this from To-Add to core in Release Notes - 12.3.0 Sep 27, 2023
@jerpelea jerpelea moved this from core to done in Release Notes - 12.3.0 Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants