Understanding stack allocation and alignment

前端 未结 5 1581
一生所求
一生所求 2021-01-05 19:54

I\'m trying to understand how stack alignment works as described in what is "stack alignment"? but I have trouble getting a small example to demonstrate the said b

5条回答
  •  被撕碎了的回忆
    2021-01-05 19:54

    You can check how extra memory is allocated for your data structure using a tool called pahole http://packages.debian.org/lenny/dwarves . It shows you all the holes of your program: the size of your data if you sum it up and the real size allocated at your stuck

提交回复
热议问题