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

Move to General Purpose Allocator #57

Closed
wants to merge 0 commits into from
Closed

Move to General Purpose Allocator #57

wants to merge 0 commits into from

Conversation

booniepepper
Copy link
Collaborator

@booniepepper booniepepper commented Jul 31, 2023

Move to a GeneralPurposeAllocator

This means dt needs to be freeing/destroying where appropriate

  • All builtins (possible) tested with std.testing.allocator
  • Main routines are tested with std.testing.allocator
  • Move from Arena allocator to GPA

Closes #1

@@ -358,7 +370,7 @@ pub const DtVal = union(enum) {

pub fn intoQuote(self: DtVal, state: *DtMachine) !Quote {
return switch (self) {
.quote => |q| _deepClone(q, state),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

TODO: Must add tests to ensure this is actually safe. Hopefully simple tests of def and dup and others will sort out exactly where things should be cloned.

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.

Improve the memory model
1 participant