-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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: Remove mm_heap_impl_s struct #4068
Conversation
@xiaoxiang781216 I just noticed that the change adding the name is not reflected in the mm/README.txt nor the titale blocks
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good.
mm/umm_heap/umm_memalign.c
Outdated
/* Initialize the user heap if not yet */ | ||
|
||
umm_try_initialize(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/* Initialize the user heap if not yet */ | |
umm_try_initialize(); | |
/* Initialize the user heap if it wasn't yet. */ | |
umm_try_initialize(); |
Why is this required here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kernel mode doesn't call umm_initialize in nx_start(it's impossible from technique since each process has a dedicated heap instance). Before this patch, sbrk will initialize the heap when malloc fail first time and fallback to sbrk, but we have to initialize explicitly here because tg_heap change to pointer and then no place to save the flag before we let g_heap point to some memory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the comment is fixed, @Ouss4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation!
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
it's more simple to make mm_heap_s opaque outside of mm Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: I5c8e435f6baba6d22b10c5f7e8d9191104fb5af2
Summary
since it's more simple to make mm_heap_s opaque outside of mm
Impact
mm_heap_s become opaque struct
Testing
ostest