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

core: mm: initialize max_allocated size in pool init function #7269

Closed
wants to merge 1 commit into from

Conversation

hangyuli0
Copy link

The TA max_allocated size obtained from stat PTA is incorrect. Pool max_allocated size is not initialized.
Initialize max_allocated size in pool init function.

Change-Id: Ia26c2a9dcc9692d6b4201b9aaea59c24de4a70f4

The TA max_allocated size obtained from stat PTA is incorrect.
Pool max_allocated size is not initialized.
Initialize max_allocated size in pool init function.

Change-Id: Ia26c2a9dcc9692d6b4201b9aaea59c24de4a70f4
Signed-off-by: Hangyu Li <hangyu.li@amlogic.com>
#ifdef CFG_WITH_STATS
pool->max_allocated = 0;
#endif

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be needed due to the way *pool is initialized above. All fields except .lo, .size, .shift and .flags (which are set explicitly) are expected to be zero-initialized.
Which compiler are you using?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My compiler is gcc 13.3. This issue could be fixed with #7224. Thanks for your reply.

@etienne-lms
Copy link
Contributor

@hangyuli0, maybe your issue was fixed with #7224

@hangyuli0
Copy link
Author

@hangyuli0, maybe your issue was fixed with #7224

@etienne-lms Yes, my issue could be fixed with #7224. My local code is v4.4.0, do not include this fix patch. Thank you.

@jforissier
Copy link
Contributor

@hangyuli0, maybe your issue was fixed with #7224

@etienne-lms Yes, my issue could be fixed with #7224. My local code is v4.4.0, do not include this fix patch. Thank you.

OK, therefore I am closing this PR. Thanks for reporting though.

@jforissier jforissier closed this Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants