I went through the code for top in /contrib/top/ but their was no specific information about the functions being called for getting the resident stack size. Or any construct which gives the resident stack size. Theirs the function get_process_info and get_system_info (definition resides in one of the file) but they give the cpu and memory usage statistics/ time values. If you know how does it gets the resident stack size, please tell me. Till then I will go through it again.
Pratyush Kshirsgar.