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

[PATCH v1] api: system: allow odp_system_meminfo_t.total_overhead to be zero #2184

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MatiasElo
Copy link
Collaborator

No description provided.

odp_system_meminfo_t.total_overhead may not be supported by all
implementations, so make the check conditional.

Signed-off-by: Matias Elo <[email protected]>
For some implementations it may not be always feasible to fill
odp_system_meminfo_t.total_overhead value. As this field is only intended
for debuggin purposes, allow implementations to return zero in this field.

Signed-off-by: Matias Elo <[email protected]>
@odpbuild odpbuild changed the title api: system: allow odp_system_meminfo_t.total_overhead to be zero [PATCH v1] api: system: allow odp_system_meminfo_t.total_overhead to be zero Feb 25, 2025
@@ -277,7 +277,8 @@ static void system_test_meminfo(void)
CU_ASSERT(ret == ret_0);
CU_ASSERT(info_0.total_mapped == info.total_mapped);
CU_ASSERT(info_0.total_used == info.total_used);
CU_ASSERT(info_0.total_overhead == info.total_overhead);
if (info_0.total_overhead)
Copy link
Collaborator

Choose a reason for hiding this comment

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

The condition does not seem necessary. Even if total_overhead is not supported, its value (zero in that case) should be the same in the two calls.

@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: BSD-3-Clause
Copy link
Collaborator

Choose a reason for hiding this comment

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

Typo in commit message: debuggin.

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.

2 participants