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

Improved the hook's memory handling for -m 11600 = 7-Zip #2548

Merged
merged 1 commit into from Sep 22, 2020

Conversation

philsmd
Copy link
Member

@philsmd philsmd commented Sep 11, 2020

This adds module_hook_extra_param_init () and module_hook_extra_param_term () to the -m 11600 = 7-Zip module to avoid allocating and freeing the buffers each and every time a hook thread is run.

In my benchmark tests the speed wasn't improved that much, but it still makes sense to avoid doing these repetitive tasks if not needed. Some operating system do have slower routines to allocate and deallocate/free the memory and therefore it's also possible that for instance windows speed improves more significantly compared to the linux speed change/improvement.

I think, since we now have this opportunity/possibility to use module_hook_extra_param_init and module_hook_extra_param_term, we should definitely use these new functions wherever needed (it's also good to show other developers how this is normally been done and how you could theoretically refactor and move some code to these new functions to avoid unecessary repetitive tasks).

Thanks a lot

@jsteube jsteube merged commit 7be7ce3 into hashcat:master Sep 22, 2020
@philsmd philsmd deleted the 7z_hook_init_term branch September 26, 2020 14:08
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.

None yet

2 participants