Should allocate_cell() return a cell with a ref count of one/ #2
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: simon/post-scarcity#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Everything that allocates a cell subsequently has to inc_ref it. It would save a lot of code if the initial inc_ref was done in allocate_cell().
But it would also mean I'd need to undo a lot of pernickety code which already more or less works.
OK, we're doing this.
cons_page/allocate_cell(tag)shall always return a cell with count = 1. It shall be the responsibility of the creating function to ensure that that cell gets appropriately dereferenced when it goes out of scope.This is going to be a big, uncomfortable change.
Feature branch is
feature-2OK, first commit on the feature branch. Not currently deallocating anything :-(
This is essentially fixed in commit
219f082. This commit reduces the amount of memory being allocated by an order of magnitude, which is good, but it doesn't do nearly enough to increase the number being reclaimed.