Manish Baronia wrote:
> > clever...
> > Yes... actually, I didn't thought about it. But I believe, you can
> > automatically find out in which direction does the stack grow.
> > Indeed, ISTM that 'comparing' the value of the address of
> > argc and argv (for instance) should be enough...
> > I see a problem here!! IIRC, the memory layout of HP-UX is quite different
> > from the other Un*x I saw...
> > You must understand that this program find the first invalid address
> > 'after' the program's stack. It doesn't mean necessarily that it is the
> > start address of the kernel (it happens to be the case on Linux/IA, but
> > Linux/IA is a PARTICULAR implementation).
> > Again, the 2 strong assumptions of my solution are:
> > - the VM is divided into 2 contiguous parts: one for the user space, and one
> > for the kernel space.
> > - the kernel starts right 'after' the process stack.
> > If one if this assumption doesn't hold for any reason, the address that
> > you are obtaining is wrong.
> > I would definitively check the validity of such assumptions on the
> > corresponding NG for the Unix implementations you are interested
> > (e.g. comp.unix.solaris for Solaris, or comp.sys.hpux for HP-UX).
> > Good luck!
> > Loic.
> > --
> > Article posté via l'accès Usenet http://www.mes-news.com
> > Accès par Nnrp ou Web[/ref]
> Thanks Loic for all your help.
> Please let me know if you find memory layout of Solaris and HPUX systems.
Please let me know if you could find any information on memory layout on