Date: Tue, 11 May 2010 20:23:41 +0100 (BST) From: Robert Watson <rwatson@FreeBSD.org> To: Lev Serebryakov <lev@FreeBSD.org> Cc: freebsd-hackers@freebsd.org Subject: Re: How to get stack bounds of current process? Message-ID: <alpine.BSF.2.00.1005112022090.91621@fledge.watson.org> In-Reply-To: <1127023465.20100510115708@serebryakov.spb.ru> References: <1127023465.20100510115708@serebryakov.spb.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 10 May 2010, Lev Serebryakov wrote: > I'm proting some application from Linux, which discover its stack bounds by > reading and pasing "/proc/self/maps". FreeBSD have "/prov/curproc/map", but > I can not find how to determine which record is for stack (I've looked into > implementation of proc_fs, but it doesn't contain any specail processing for > process stack). > > How could I determine stack bounds of current process on FreeBSD 7/8/9? The "procstat -v" command in 8.x and 9.x will give this information based on sysctls; we're about to integrate a libprocstat(3) library which will provide a public API for this information. I'd agree with Kostik that you should think carefully about whether the application really needs this information :-). Robert N M Watson Computer Laboratory University of Cambridge
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1005112022090.91621>