Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Memory #216
Memory #216
Changes from 3 commits
76fb73c
0f48bd0
8ab055a
ec7c832
1dc03a8
31eb834
92861ca
e91a209
cb51345
1f1e18d
7c735bd
695d95c
4e01041
d4ba872
e9f3508
c1a8be0
2429e4f
6cb46a2
ef9da0e
f184475
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I think that calling onvm_main_free after every check may be redundant, could we maybe set a flag and move that call out of the loop so that it's called only once? We should fail on any unsuccessful allocation anyway.
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.
I think calling onvm_main_free followed by RTE_EXIT would be best? If not I could also see using a flag or a goto label as another option.
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.
@bdevierno1 you probably want to just set a flag and break out of the loop. Then just log that we couldn't allocate the structs required to continue.
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.
^
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.
I just made a change as per your suggestions. I ended up using a goto flag as using a break would exit the for loop. If I used a break in the first loop it will still enter the next loop.