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

Let malloc possibly fail #146

Open
wants to merge 1 commit into
base: 139-feature-verify-test-mkm-module
Choose a base branch
from

Conversation

peterohanley
Copy link
Contributor

brute-force polymorphism version of malloc that can fail.

@peterohanley peterohanley mentioned this pull request Dec 20, 2024
6 tasks
@peterohanley
Copy link
Contributor Author

This breaks every other use of malloc in our tree, and I don't have a way to solve having to drag the new Alloc along with us.

@septract
Copy link

septract commented Jan 1, 2025

I don't think this looks too bad - I've integrated it into #142 with a few modifications. One thing is that I've named this spec _malloc_canfail() so that it doesn't break anything else. Probably useful to have both.

I don't think there's any way of getting away from carrying the Alloc record with us. We might want to eventually have variant ownership predicates that indicate they are allocation sites as well. OwnedA(p), which is defined as Owned(p) and Alloc(p) etc.

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