<div dir="ltr"><div>According to the language reference:<br><br><i>The ‘<tt class=""><span class="">alloca</span></tt>‘ instruction allocates memory on the stack frame of the
currently executing function, to be automatically released when this
function returns to its caller. The object is always allocated in the
generic address space (address space zero).</i><br><br><br></div><div>The last sentence specifies where the memory is allocated, but it's not clear precisely what "allocated in the generic address space" means.  For architectures with a segmented memory layout, allocating "in" the generic address space may not make sense.  Instead, you allocate in a specific address space, and create a "generic" pointer to that allocation.  Is this a legal interpretation of the language reference?<br>
<br>If so, I would like to make the text in the language reference more explicit that this is allowed.  If not, I would like to petition to make this legal.  Something along the lines of:<br><br></div><div><i>The object is allocated in a target-defined memory space and the returned pointer is always in the generic address space (address space zero).</i><br>
</div><div><div><br>-- <br><br><div>Thanks,</div><div><br></div><div>Justin Holewinski</div>
</div></div></div>