<br><br><div class="gmail_quote">On Tue, Nov 25, 2008 at 8:28 AM, Ted Kremenek <span dir="ltr"><<a href="mailto:kremenek@apple.com">kremenek@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style=""><br><div><div class="Ih2E3d"><div>On Nov 24, 2008, at 4:17 PM, Zhongxing Xu wrote:</div><br><blockquote type="cite">On Tue, Nov 25, 2008 at 3:03 AM, Ted Kremenek <span dir="ltr"><<a href="mailto:kremenek@apple.com" target="_blank">kremenek@apple.com</a>></span> wrote:<br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Hi Zhongxing,<br> <br> Why use the GDM to represent the byte extent of an AllocaRegion instead of storing it directly in the region object itself?  I don't think it's necessarily a bad idea; I'm just curious about the overall design.</blockquote>
 <div><br>I don't have a definite reason for this. I feel that:<br><br>- The extent is not a necessary property of AllocaRegion (or the necessity has not showed). If we make it part of the AllocaRegion, that would require all clients provide an extent when creating the AllocaRegion.</div>
</div></blockquote><div><br></div></div><div>Just to clarify, what do you mean by "clients?"  Different implementations of StoreManager?</div></div></div></blockquote><div><br>Yes, it should be StoreManagers. But in a broader sense, anything that wants an AllocaRegion created are burdened.<br>
 </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style=""><div><div></div><div class="Ih2E3d"><br><blockquote type="cite"><div class="gmail_quote">
<div>- Decoupling the extent of the dynamically allocated region provides more flexibility. Consider a MallocRegion, whose extent may be changed by a later realloc(). But its store bindings may not change. In that case, we can only modify the extent mapping of it.</div>
</div></blockquote><div><br></div></div><div>Makes sense.</div><div class="Ih2E3d"><br><blockquote type="cite"><div class="gmail_quote"><div>- If later we find the extent is an essential property of AllocaRegion, we can add it back.</div>
</div></blockquote><br></div></div><div>Absolutely.  I wasn't arguing that we change it.  All of this sounds good to me.</div><br></div></blockquote></div><br>