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

Refactor: AlignedMemory::resize() #368

Merged
merged 4 commits into from
Aug 8, 2022
Merged

Conversation

Lichtso
Copy link

@Lichtso Lichtso commented Aug 5, 2022

Follow up to #360 and designed in collaboration with @alessandrod.

  • Renames resize() => fill_write()
  • Optimizes away memset 0
  • Adds the flag zero_up_to_max_len to keep track of optimization potential
  • Renames new => with_capacity
  • Renames new_with_data => from_slice
  • Renames new_with_size => zero_filled
  • Adds with_capacity_zeroed

@Lichtso Lichtso requested a review from alessandrod August 5, 2022 18:54
@codecov-commenter
Copy link

codecov-commenter commented Aug 5, 2022

Codecov Report

Merging #368 (3cf71b2) into main (f52bfa0) will increase coverage by 0.02%.
The diff coverage is 95.23%.

@@            Coverage Diff             @@
##             main     #368      +/-   ##
==========================================
+ Coverage   89.88%   89.91%   +0.02%     
==========================================
  Files          24       24              
  Lines        9000     9019      +19     
==========================================
+ Hits         8090     8109      +19     
  Misses        910      910              
Impacted Files Coverage Δ
src/aligned_memory.rs 89.18% <94.59%> (+1.59%) ⬆️
src/call_frames.rs 97.80% <100.00%> (ø)
src/elf.rs 91.96% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Lichtso Lichtso force-pushed the refactor/alignem_memory_resize branch 2 times, most recently from bf830b0 to fe0d5e7 Compare August 5, 2022 19:36
Renames new_with_data => from_slice.
Renames new_with_size => zero_filled.
Adds with_capacity_zeroed.
@Lichtso Lichtso force-pushed the refactor/alignem_memory_resize branch from fe0d5e7 to 3cf71b2 Compare August 5, 2022 19:44
@Lichtso Lichtso merged commit 8d95c0e into main Aug 8, 2022
@Lichtso Lichtso deleted the refactor/alignem_memory_resize branch August 8, 2022 13:54
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