-
Notifications
You must be signed in to change notification settings - Fork 78
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
changes to ptr library #460
Conversation
5060d0b
to
6e0a4e2
Compare
6e0a4e2
to
723b9a5
Compare
status: currently requires a fix regarding lifetime checking and Copy |
723b9a5
to
47e29d9
Compare
status:
|
26ec838
to
102985e
Compare
102985e
to
5d64fb4
Compare
5d64fb4
to
020cd61
Compare
020cd61
to
33594b8
Compare
33594b8
to
43ad2e4
Compare
43ad2e4
to
194a467
Compare
194a467
to
a924cb0
Compare
7c2d647
to
ec543b1
Compare
eba3a06
to
f06f07e
Compare
0a46abf
to
655731f
Compare
6198b72
to
0405f49
Compare
Was it necessary to use |
But indeed we need to figure out a strategy for no-vstd users. |
146fe0b
to
578ec5a
Compare
578ec5a
to
7488038
Compare
If the question was specifically about |
This adds partial support for variable-length allocations in the ptr library.
Changes:
PointsTo<V>
, there is also an "untyped PointsTo" calledPointsToRaw
which maps to an uninitialized region of memory of arbitrary length.PointsTo<V>
andPointsToRaw
can be converted between each other, provided the size ofV
is known.Dealloc
(andDeallocRaw
) which provides the ability to deallocate a region of memory. This has to be separate fromPointsTo
, because it's possible for aPointsTo
object to point into a subregion of an allocation. However, it's not possible to deallocate part of an allocation.verified_vec
example shows a nontrivial use ofPointsTo
andDealloc
.allocator_api
. It's unstable, but it's easier to use than what we had before.SizeOf
trait. This is incomplete because it doesn't have support from Verus to actually calculate a size or an alignment, and as such, it forces the user to make anassume
when they implement the trait.Right now the tests are failing because of a bug related to lifetime checking & Copy.