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

Only allocate one EventRecordMetadata^ and reuse it for RawProvider events #250

Merged
merged 5 commits into from
Nov 12, 2024

Conversation

mjeong92
Copy link
Contributor

RawProvider::EventNotification created a new managed object EventRecordMetadata for each EVENT_RECORD it received. Since each provider is single threaded, we should be able to reuse a single allocation by replacing the pointers to the user data in EVENT_RECORD native object on a single EventRecordMetadata before raising the event up to the managed layer.

This change makes the user record and the header pointers in EventRecordMetadata accessible internally so that they can be updated from each EVENT_RECORD received in the RawProvider. RawProvider adds a EventRecordMetadata^ member that gets initialized in the constructor and re-used for each EVENT_RECORD by updating the two pointers each time.

kylereedmsft
kylereedmsft previously approved these changes Nov 12, 2024
@mjeong92 mjeong92 merged commit af17f4c into master Nov 12, 2024
2 checks passed
@mjeong92 mjeong92 deleted the users/mijeong/remove_raw_provider_allocation branch November 12, 2024 23:41
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