函数调用的开销

    技术2022-05-20  34

    做了几个实验,简单学习了解一下函数调用的开销。

     

    程序1—没有参数的函数调用:

    #include <stdio.h> void test() { return; } int main(int argc, char *argv[]) { test(); return 0; } 

    用gcc -S得到程序1的汇编代码:

    .file "test.c" .text .globl test .type test, @function test: pushl

    转载请注明原文地址: https://ibbs.8miu.com/read-2221645.html

    最新回复(0)