Add mj_stackAllocInt to get correct size for allocating ints on mjData stack. Reducing stack memory usage by 10% - 15%.
PiperOrigin-RevId: 517672195 Change-Id: Ie14e6c9c99e8b9e1c5d3686b77631f2df0651c67
This commit is contained in:
committed by
Copybara-Service
parent
fae5e822c0
commit
8696247f9d
@@ -102,9 +102,12 @@ MJAPI void mj_resetDataKeyframe(const mjModel* m, mjData* d, int key);
|
||||
// mjData arena allocate
|
||||
void* mj_arenaAlloc(mjData* d, int bytes, int alignment);
|
||||
|
||||
// mjData stack allocate
|
||||
// mjData stack allocate for array of mjtNums
|
||||
MJAPI mjtNum* mj_stackAlloc(mjData* d, int size);
|
||||
|
||||
// mjData stack allocate for array of ints
|
||||
MJAPI int* mj_stackAllocInt(mjData* d, int size);
|
||||
|
||||
// de-allocate data
|
||||
MJAPI void mj_deleteData(mjData* d);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user