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

Stack vs Heap allocations #8

Merged
merged 1 commit into from
Feb 7, 2024
Merged

Stack vs Heap allocations #8

merged 1 commit into from
Feb 7, 2024

Conversation

JerrySievert
Copy link
Contributor

Adds a check for size of the datums to be compared. If the lengths are greater than or equal to 2^20 on either, then allocate memory on the heap and free it after use.

Otherwise, we can use the stack for allocation. If we use stack for allocation with an insanely large field, we can smash the stack. This way we won't.

greater than or equal to 2^20 on either, then allocate memory on the heap
and free it after use.

Otherwise, we can use the stack for allocation.  If we use stack for
allocation with an insanely large field, we can smash the stack.  This
way we won't.
@JerrySievert JerrySievert requested a review from wuputah February 7, 2024 20:47
@JerrySievert JerrySievert self-assigned this Feb 7, 2024
Copy link
Member

@wuputah wuputah left a comment

Choose a reason for hiding this comment

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

fixes #7

@JerrySievert JerrySievert merged commit 5abc9de into main Feb 7, 2024
3 checks passed
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