Invention Application
- Patent Title: MEMORY MANAGEMENT FOR CLOSURES
-
Application No.: US13719793Application Date: 2012-12-19
-
Publication No.: US20130111446A1Publication Date: 2013-05-02
- Inventor: Gerald Blaine Garst, JR. , William Bumgarner , Fariborz Jahanian , Christopher Arthur Lattner
- Applicant: Apple Inc.
- Applicant Address: US CA Cupertino
- Assignee: Apple Inc.
- Current Assignee: Apple Inc.
- Current Assignee Address: US CA Cupertino
- Main IPC: G06F11/36
- IPC: G06F11/36

Abstract:
Methods, software media, compilers and programming techniques are described for creating copyable stack-based closures, such as a block, for languages which allocate automatic or local variables on a stack memory structure. In one exemplary method, a data structure of the block is first written to the stack memory structure, and this may be the automatic default operation, at run-time, for the block; then, a block copy instruction, added explicitly (in one embodiment) by a programmer during creation of the block, is executed to copy the block to a heap memory structure. The block includes a function pointer that references a function which uses data in the block.
Information query