Re: [swift-users] unsafe memory model questions

2016-12-12 Thread Andrew Trick via swift-users
> On Dec 11, 2016, at 2:51 PM, Ray Fix via swift-users > wrote: > > Hello, > > So bindMemory is part of the memory model and memory can only bind to one > type at a time to avoid aliasing. But what does binding actually do? Is it > somehow communicating with the optimizer? Binding memory to

Re: [swift-users] unsafe memory model questions

2016-12-12 Thread Jordan Rose via swift-users
Hi, Ray. Most of the pointer model is covered in the original proposal for the UnsafeRawPointer type, SE-0107 . That's a good place to find answers to pointer- and memory-related questions in general. The

[swift-users] unsafe memory model questions

2016-12-11 Thread Ray Fix via swift-users
Hello, So bindMemory is part of the memory model and memory can only bind to one type at a time to avoid aliasing. But what does binding actually do? Is it somehow communicating with the optimizer? A tangentially related second question, in the following example: let count = 3 let mutableP