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

Define "allocation" #213

Closed
gnzlbg opened this issue Oct 17, 2019 · 3 comments · Fixed by #464
Closed

Define "allocation" #213

gnzlbg opened this issue Oct 17, 2019 · 3 comments · Fixed by #464
Labels
A-memory Topic: Related to memory accesses C-terminology Category: Discussing terminology -- which term to use, how to define it, adding it to the glossary S-pending-documentation Status: The issue is "resolved," but this resolution needs documentation

Comments

@gnzlbg
Copy link
Contributor

gnzlbg commented Oct 17, 2019

We use the word "allocation" in the abstract machine, e.g., when talking about provenance, or when saying that each stack variable lives on its own "allocation". And we might start using it when talking about the guarantees of Rc (see rust-lang/rust#64484). So I think we should define this word in the glossary for now.

While it is possible to write Rust programs that have multiple address spaces, I think it would be reasonable to just start by assuming that there is only just one address space.

@Lokathor
Copy link
Contributor

Lokathor commented Oct 17, 2019

I think that we should be careful about such a simplification. Usually it's easier to ignore complications than to stick them into the design later.

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Oct 17, 2019

Note that two allocations with the same address but in distinct address spaces are already distinct allocations, so one can think of the address space a pointer refers to as being part of its provenance.

@RalfJung RalfJung added C-terminology Category: Discussing terminology -- which term to use, how to define it, adding it to the glossary A-memory Topic: Related to memory accesses labels Oct 17, 2019
@RalfJung
Copy link
Member

IMO the only satisfying definition of allocation is to actually give a (preliminary) instance of the Rust memory interface. Everything else is going to be imprecise and not very useful IMO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-memory Topic: Related to memory accesses C-terminology Category: Discussing terminology -- which term to use, how to define it, adding it to the glossary S-pending-documentation Status: The issue is "resolved," but this resolution needs documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants