<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Feb 9, 2018, at 5:46 PM, Richard Smith <<a href="mailto:richardsmith@googlers.com" class="">richardsmith@googlers.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: BookmanOldStyle; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_quote"><div dir="ltr" class="">On Fri, 9 Feb 2018 at 14:25, David Vandevoorde <<a href="mailto:daveed@edg.com" class="">daveed@edg.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word; line-break: after-white-space;" class=""><div class=""><blockquote type="cite" class=""><div class="">On Feb 9, 2018, at 4:57 PM, Richard Smith <<a href="mailto:richardsmith@googlers.com" target="_blank" class="">richardsmith@googlers.com</a>> wrote:</div><br class="m_-6140506200552420465Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: BookmanOldStyle; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><div class="gmail_quote"><div dir="ltr" class="">On Fri, 9 Feb 2018 at 13:08, Myria <<a href="mailto:myriachan@gmail.com" target="_blank" class="">myriachan@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;">Is it worth mentioning that an implementation may have other<br class="">mechanisms that create storage in the manner of malloc? For example,<br class="">it'd make sense for VirtualAlloc or mmap to create implicit objects<br class="">just like the standard malloc functions.<br class=""></blockquote><div class=""><br class=""></div><div class="">Sounds like a good change to me.</div><div class=""> </div></div></div></div></blockquote><br class=""></div><div class="">It would be nice if we could indicate that in a portable way. The default is wrong for attributes, unfortunately, but otherwise something like:</div><div class=""><br class=""></div><div class=""><span class="m_-6140506200552420465Apple-tab-span" style="white-space: pre-wrap;">        </span>[[blessed_storage]] void* my_memory_map(…);</div><div class=""><br class=""></div><div class="">would have been useful.</div></div></blockquote><div class=""><br class=""></div><div class="">Yes, it's annoying that attributes don't work out here. I think we won't need any annotations at all in the actual source code for most such functions in practice, because these functions result in syscalls that are opaque to the optimizer anyway (for all it knows, the kernel might have created objects in the storage...). But there are likely exceptions that have a C++ implementation that might get combined with the program source code via link-time optimization, and we do need to avoid bad things happening in that case.</div></div></div></div></blockquote><div><br class=""></div><div>Although in those cases the C++ implementation can have a barrier “bless” call on the inside, right?</div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family: BookmanOldStyle; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_quote"><div class=""> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word; line-break: after-white-space;" class=""><div class="">Incidentally, I’m not too fond of the name “bless”. Maybe “implicit_lifetime”?</div></div></blockquote><div class=""><br class=""></div><div class="">Maybe I should just call it `bikeshed` until this gets to LEWG :)</div></div></div></div></blockquote><br class=""></div><div>Hopefully nobody will bless bikeshed :-P</div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>Daveed</div><div><br class=""></div><div><br class=""></div><br class=""></body></html>