File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -46,9 +46,10 @@ There are three potential resolutions that handle both size and alignment unifor
46
46
47
47
- Store layout information in the ` ArcInner ` header, or
48
48
- Require that layout be determined solely from pointee metadata, or
49
- - Require that layout be determinable from a dropped pointee.
50
- [ ^This is trivially the case if determining the layout does not read the pointee (i.e. is derivable by just the potentially wide pointer);
51
- alternatively, the pointee could ensure that layout information (e.g. vtable pointer) remains valid to read even after it's been dropped.]
49
+ - Require that layout be determinable from a dropped pointee.[ ^ why ]
50
+
51
+ [ ^ why ] : This is trivially the case if determining the layout does not read the pointee (i.e. is derivable by just the potentially wide pointer);
52
+ alternatively, the pointee could ensure that layout information (e.g. vtable pointer) remains valid to read even after it's been dropped.]
52
53
53
54
Dealing with alignment can be simplified by changing ` Arc<T> ` from storing ` *mut ArcInner<T> ` to
54
55
storing ` *mut T ` and storing the refcount metadata at a fixed negative offset independent of ` T ` .
You can’t perform that action at this time.
0 commit comments