Remove usage of size_t types in mjModel, use mjtSize (uint64_t) instead to improve portabilty of MJB files to WASM.

PiperOrigin-RevId: 789321991
Change-Id: Ic25fab876c347fc75f5ca24cad09e8fd972f035f
This commit is contained in:
Matija Kecman
2025-07-31 07:06:58 -07:00
committed by Copybara-Service
parent 4c288c19ac
commit 23fa7c00d5
11 changed files with 224 additions and 185 deletions
+5 -5
View File
@@ -162,8 +162,8 @@ typedef struct mjSolverStat_ mjSolverStat;
struct mjData_ {
// constant sizes
size_t narena; // size of the arena in bytes (inclusive of the stack)
size_t nbuffer; // size of main buffer in bytes
mjtSize narena; // size of the arena in bytes (inclusive of the stack)
mjtSize nbuffer; // size of main buffer in bytes
int nplugin; // number of plugin instances
// stack pointer
@@ -174,9 +174,9 @@ struct mjData_ {
size_t parena; // first available byte in arena
// memory utilization statistics
size_t maxuse_stack; // maximum stack allocation in bytes
size_t maxuse_threadstack[mjMAXTHREAD]; // maximum stack allocation per thread in bytes
size_t maxuse_arena; // maximum arena allocation in bytes
mjtSize maxuse_stack; // maximum stack allocation in bytes
mjtSize maxuse_threadstack[mjMAXTHREAD]; // maximum stack allocation per thread in bytes
mjtSize maxuse_arena; // maximum arena allocation in bytes
int maxuse_con; // maximum number of contacts
int maxuse_efc; // maximum number of scalar constraints