freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

編譯原理-全動(dòng)態(tài)內(nèi)存管理(已修改)

2024-10-29 02:27 本頁面
 

【正文】 Compiler Theory Fall 2021 Jianhui Yue Chapter 7 Dynamic Memory Parameter Passing Mechanisms Instructor Jianhui Yue Software College @SCU Compiler Theory Fall 2021 Jianhui Yue Limitations of StackBased Environment ? If a reference to a local variable in a procedure can be returned to the caller, the result will be dangling reference. – When the procedure is exited, the activation record will be deallocated from the stack. ? addr = dangle() causes addr to point to an unsafe location. ? Such program is erroneous in C. – (No piler will give an error message) int *dangle() {int x。 return amp。x。} Compiler Theory Fall 2021 Jianhui Yue Limitations of StackBased Environment (cont) ? C prohibits local procedures. ? Functional programming languages (LISP, ML) – Functions must be able to be ? locally defined ? Passed as parameters ? Returned as results. ? Stackbased runtime environment is inadequate for these languages. Compiler Theory Fall 2021 Jianhui Yue Fully Dynamic Environment ? It can deallocate activation records only when all references to them have disappeared. ? Activation records can be dynamically freed at arbitrary times during execution. ? Fully dynamic environment is more plicated. – Tracking the references during execution. – Finding and deallocating inaccessible areas of memory at arbitrary times during execution (garbage collection). Compiler Theory Fall 2021 Jianhui Yue Activation Records ? The basic structure of an activation record remains the same: – Space for parameters and local variables. – Control and access links. ? The exited activation record remains in memory, to be deallocated at some later time. ? The entire additional plexity can be encapsulated in a memory manager that replaces the runtime stack operations with more general allocation and deallocation routines. Compiler Theory Fall 2021 Jianhui Yue ObjectOriented Languages ? OO languages require special mechanisms in the runtime environment to implement their added features: – Objects – Methods – Inherita
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
公安備案圖鄂ICP備17016276號(hào)-1