-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Optimization 4427 v2 #6057
Closed
Closed
Optimization 4427 v2 #6057
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Wrap the id in a new IPPairStorageId struct, to avoid id confusion with other storage API calls. - Formatting fixes by clang.
- Wrap the id in a HostStorageId struct to avoid id confusion with other storage API calls. - Fix formatting with clang script.
- Wrap the id in a new LiveDevStorageId struct, to avoid id confusion with other storage API calls. - Formatting fixes by clang.
Codecov Report
@@ Coverage Diff @@
## master #6057 +/- ##
==========================================
- Coverage 76.99% 76.94% -0.06%
==========================================
Files 612 612
Lines 187752 187758 +6
==========================================
- Hits 144569 144474 -95
- Misses 43183 43284 +101
Flags with carried forward coverage won't be shown. Click here to find out more. |
static int g_livedev_storage_id = -1; | ||
static int g_flow_storage_id = -1; | ||
static LiveDevStorageId g_livedev_storage_id = { .id = -1 }; | ||
static StorageFlowId g_flow_storage_id = { .id = -1 }; |
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.
typo: should be FlowStorageId instead (I fixed this up in my merge)
Merged in #6059, thanks! |
jasonish
added a commit
to jasonish/suricata
that referenced
this pull request
May 9, 2023
Convert "new_object" and "new_array" functions that return a Result and use "try_reserve" to allocate the amount of data requested. This should allow memory allocation errors to be detected and handled in a Rust-ful matter without resorting to catching a panic. Ticket: OISF#6057
jasonish
added a commit
to jasonish/suricata
that referenced
this pull request
May 9, 2023
Provide a wrapper around "push" and "push_str" on the internal buffer that will "try_reserve" data before growing in an attempt to handle memory allocation errors. Ticket: OISF#6057
jasonish
added a commit
to jasonish/suricata
that referenced
this pull request
May 9, 2023
Provide a wrapper around "push" and "push_str" on the internal buffer that will "try_reserve" data before growing in an attempt to handle memory allocation errors. Ticket: OISF#6057
jasonish
added a commit
to jasonish/suricata
that referenced
this pull request
May 16, 2023
Convert "new_object" and "new_array" functions that return a Result and use "try_reserve" to allocate the amount of data requested. This should allow memory allocation errors to be detected and handled in a Rust-ful matter without resorting to catching a panic. Ticket: OISF#6057
jasonish
added a commit
to jasonish/suricata
that referenced
this pull request
May 16, 2023
Provide a wrapper around "push" and "push_str" on the internal buffer that will "try_reserve" data before growing in an attempt to handle memory allocation errors. Ticket: OISF#6057
jasonish
added a commit
to jasonish/suricata
that referenced
this pull request
May 18, 2023
Convert "new_object" and "new_array" functions that return a Result and use "try_reserve" to allocate the amount of data requested. This should allow memory allocation errors to be detected and handled in a Rust-ful matter without resorting to catching a panic. Ticket: OISF#6057
jasonish
added a commit
to jasonish/suricata
that referenced
this pull request
May 18, 2023
Before growing any buffers use try_reserve to reserve the space required as this will return an error on allocation failures. Ticket: OISF#6057
jasonish
added a commit
to jasonish/suricata
that referenced
this pull request
May 19, 2023
Before growing any buffers use try_reserve to reserve the space required as this will return an error on allocation failures. Ticket: OISF#6057
jasonish
added a commit
to jasonish/suricata
that referenced
this pull request
May 24, 2023
Use try_reserve before growing the internal buffer, and the internal state vector. This allows allocation errors to be caught and an error returned instead of just aborting the process. Ticket: OISF#6057
jasonish
added a commit
to jasonish/suricata
that referenced
this pull request
May 25, 2023
Use try_reserve before growing the internal buffer, and the internal state vector. This allows allocation errors to be caught and an error returned instead of just aborting the process. Ticket: OISF#6057
jasonish
added a commit
to jasonish/suricata
that referenced
this pull request
May 25, 2023
Use try_reserve before growing the internal buffer, and the internal state vector. This allows allocation errors to be caught and an error returned instead of just aborting the process. Ticket: OISF#6057
victorjulien
pushed a commit
to victorjulien/suricata
that referenced
this pull request
May 30, 2023
Use try_reserve before growing the internal buffer, and the internal state vector. This allows allocation errors to be caught and an error returned instead of just aborting the process. Ticket: OISF#6057
zhiyuan-liao
pushed a commit
to zhiyuan-liao/suricata
that referenced
this pull request
Jun 1, 2023
Use try_reserve before growing the internal buffer, and the internal state vector. This allows allocation errors to be caught and an error returned instead of just aborting the process. Ticket: OISF#6057
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Make sure these boxes are signed before submitting your Pull Request -- thank you.
Link to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/4427
Previous PR: #6056
Describe changes:
From previous PR:
#suricata-verify-pr:
#suricata-verify-repo:
#suricata-verify-branch:
#suricata-update-pr:
#suricata-update-repo:
#suricata-update-branch:
#libhtp-pr:
#libhtp-repo:
#libhtp-branch: