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

Create 2D arrays on the heap in a different way #1169

Merged
merged 3 commits into from
Nov 23, 2021
Merged

Conversation

gnuoyd
Copy link
Contributor

@gnuoyd gnuoyd commented Nov 8, 2021

Create 2D arrays on the heap by malloc'ing struct { TYPE arr[ROWS][COLS]; }. This avoids the double-indirection through pointers and the additional memory of H5TEST_ALLOCATE_2D_ARRAY().

This change will safely quiet the cast warning that PR #1129 was intended to fix.

…OLS];

}`.  This avoids the double-indirection through pointers and the
additional memory of H5TEST_ALLOCATE_2D_ARRAY().

This change will safely quiet the cast warning that PR #1129 was
intended to fix.
@lrknox
Copy link
Collaborator

lrknox commented Nov 9, 2021

Checks passed after format changes were committed: https://github.com/HDFGroup/hdf5/actions/runs/1435686942.

@lrknox lrknox self-requested a review November 23, 2021 14:07
@lrknox lrknox merged commit 462e9a3 into develop Nov 23, 2021
@gnuoyd gnuoyd deleted the feature/heap-array branch March 11, 2022 17:07
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.

3 participants