发明名称 Function attribute for dynamic stack allocation
摘要 A method includes receiving, by a processing device executing a compiler, source code of a function associated with a compiler prompt, in which the function includes at least one variable to be allocated in a memory space on a stack, determining that the compiler prompt indicates to retain at least a portion of the allocated memory space on the stack after execution of the function, and compiling, in view of the compiler prompt, the source code to generate a prologue function and an epilogue function associated with execution of the function, in which the prologue function is to allocate the memory space for the function, and at least one of the prologue function or the epilogue function is to cause to retain the at least a portion of the allocated memory space on the stack after the execution of the function.
申请公布号 US9250878(B1) 申请公布日期 2016.02.02
申请号 US201414551643 申请日期 2014.11.24
申请人 Red Hat, Inc. 发明人 McCallum Nathaniel Philip
分类号 G06F9/45 主分类号 G06F9/45
代理机构 Lowenstein Sandler LLP 代理人 Lowenstein Sandler LLP
主权项 1. A method comprising: receiving, by a processing device executing a compiler, source code of a function associated with a first compiler prompt, wherein the function comprises at least one variable to be allocated in a memory space on a stack; determining, by the compiler, that the first compiler prompt indicates to retain at least a portion of the allocated memory space on the stack after execution of the function; and compiling, by the compiler in view of the first compiler prompt, the source code to generate a prologue function and an epilogue function associated with the execution of the function, wherein the prologue function is to allocate the memory space for the function, and wherein at least one of the prologue function or the epilogue function is to cause to retain the at least a portion of the allocated memory space on the stack after the execution of the function.
地址 Raleigh NC US