From f0343ff3ed6618ddd0cbffe4708059cb82b14d55 Mon Sep 17 00:00:00 2001 From: Saran Tunyasuvunakool Date: Thu, 6 Oct 2022 14:13:46 -0700 Subject: [PATCH] Fix documentation for `nstack` to more accurately describe what it does now. PiperOrigin-RevId: 479409986 Change-Id: Ic7cfadb610e6938bdea58cc01b381fd2bbc21a7c --- doc/XMLreference.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/XMLreference.rst b/doc/XMLreference.rst index 611d23f6..a477dcd5 100644 --- a/doc/XMLreference.rst +++ b/doc/XMLreference.rst @@ -514,8 +514,9 @@ compilation. compatibillity and debugging purposes. :at:`nstack`: :at-val:`int, "-1"` |nbsp| |nbsp| |nbsp| (legacy) This is a deprecated legacy attribute. In versions prior to 2.3.0, it determined the maximum size of the - :ref:`stack `. Currently it is synonymous with the :at:`memory` attribute above, but is in units of - ``sizeof(mjtNum)`` rather than bytes. Specifying both :at:`nstack` and :at:`memory` leads to an error. + :ref:`stack `. After version 2.3.0, if :at:`nstack` is specified, then the size of ``mjData.arena`` is + ``nstack * sizeof(mjtNum)`` bytes, plus an additional space for the constraint solver. Specifying both :at:`nstack` + and :at:`memory` leads to an error. :at:`nuserdata`: :at-val:`int, "0"` The size of the field mjData.userdata of mjData. This field should be used to store custom dynamic variables. See also :ref:`CUser`.