\HeaderA{Cstack\_info}{Report Information on C Stack Size and Usage}{Cstack.Rul.info}
\keyword{utilities}{Cstack\_info}
\begin{Description}\relax
Report information on the C stack size and usage (if available).
\end{Description}
\begin{Usage}
\begin{verbatim}
Cstack_info()
\end{verbatim}
\end{Usage}
\begin{Details}\relax
On most platforms, C stack information is recorded when \R{} is
initialized and used for stack-checking.  If this information is
unavailable, the \code{size} will be returned as \code{NA}, and
stack-checking is not performed.

The information on the stack base address is thought to be accurate on
Windows, Linux and FreeBSD (including MacOS X), but a heuristic is
used on other platforms.  Because this might be slightly inaccurate,
the current usage could be estimated as negative.  (The heuristic is
not used on embedded uses of \R{} on platforms where the stack base
is not thought to be accurate.)
\end{Details}
\begin{Value}
An integer vector.  This has named elements
\begin{ldescription}
\item[\code{size}] The size of the stack (in bytes), or \code{NA} if unknown.
\item[\code{current}] The estimated current usage (in bytes), possibly \code{NA}.
\item[\code{direction}] \code{1} (stack grows down, the usual case) or
\code{-1} (stack grows up).
\item[\code{eval\_depth}] The current evaluation depth (including two calls
for the call to \code{Cstack\_info}).
\end{ldescription}
\end{Value}
\begin{Examples}
\begin{ExampleCode}
Cstack_info()
\end{ExampleCode}
\end{Examples}

