Alloca implementation

前端 未结 11 997
误落风尘
误落风尘 2020-11-29 08:50

How does one implement alloca() using inline x86 assembler in languages like D, C, and C++? I want to create a slightly modified version of it, but first I need to know how

11条回答
  •  鱼传尺愫
    2020-11-29 09:56

    For the D programming language, the source code for alloca() comes with the download. How it works is fairly well commented. For dmd1, it's in /dmd/src/phobos/internal/alloca.d. For dmd2, it's in /dmd/src/druntime/src/compiler/dmd/alloca.d.

提交回复
热议问题