Skip to content

Conversation

@eduardosm
Copy link
Contributor

Refactor Memory to avoid dealing with manual allocations, raw pointers and memory layouts.

Now it uses a Vec (with length zero and desired capacity) and Vec::spare_capacity_mut to access the allocated capacity.

@cmpute
Copy link
Owner

cmpute commented Oct 23, 2023

Thanks for the PR! What necessitates this change in your opinion? I think the original author of the memory allocation utilities (i.e tczajka) keeps this design because it will be easier to create customized allocation logics in future.

@eduardosm
Copy link
Contributor Author

Since it was only used to allocate slices of Word, I simplified it accordingly. Is there a need to allocate arbitrary layouts?

@cmpute
Copy link
Owner

cmpute commented Dec 19, 2023

This change might be related to #43 , lets wait for that issue to have a rough idea of how to improve this.

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