Refactor stack allocations to have a clean byte allocation interface.

PiperOrigin-RevId: 558881470
Change-Id: I08c45cb5fa25a1a9c39560e598e805cfa5141c3e
This commit is contained in:
Matthew Bennice
2023-08-21 13:17:48 -07:00
committed by Copybara-Service
parent 22fd0586b1
commit 59138af10b
10 changed files with 67 additions and 64 deletions
+1 -1
View File
@@ -251,7 +251,7 @@ void mjd_smooth_velFD(const mjModel* m, mjData* d, mjtNum eps) {
mjtNum* plus = mj_stackAlloc(d, nv);
mjtNum* minus = mj_stackAlloc(d, nv);
mjtNum* fd = mj_stackAlloc(d, nv);
int* cnt = (int*) mj_stackAlloc(d, nv);
int* cnt = mj_stackAllocInt(d, nv);
// clear row counters
memset(cnt, 0, nv*sizeof(int));