stack growth direction

后端 未结 5 1573
慢半拍i
慢半拍i 2020-12-06 07:20

So from my previous memmove question I would like to know how to find direction of stack growth.

  void stackDirection(int* i)
  {

     int j;

     if(&         


        
5条回答
  •  庸人自扰
    2020-12-06 07:52

    Your function depends on int* parameter which can point to anywhere, and also be NULL. It is better to compare addresses of two local variables.

提交回复
热议问题