How to assess how much stack space kernel function may use?