Commit Graph

5 Commits

Author SHA1 Message Date
Kyle Bayes 57e6760ec9 Re-implement VFS internals in C++, removing the constraints of the previous implementation.
PiperOrigin-RevId: 649433087
Change-Id: Icaa3e6b7f2ef14f56b04fef2f4360b46d8b5f022
2024-07-04 09:22:23 -07:00
Kyle Bayes e66b9a36b2 Remove mj_makeEmptyFileVFS and mj_findFileVFS from MuJoCo API.
PiperOrigin-RevId: 645393666
Change-Id: Iabe939c88f60b80dce20f84c7ff9a6396717cc84
2024-06-21 08:12:51 -07:00
Kyle Bayes 18397e61ec Replace calls to mj_makeEmptyFileVFS with mj_addBufferVFS in MuJoCo Unity bindings.
PiperOrigin-RevId: 640168011
Change-Id: Ic592b5cbedb89981ac24d4b8d2c864ceaf415e46
2024-06-04 08:50:12 -07:00
Tom Erez 68718e76b1 Ensure that memory allocated by mju_malloc is freed by mju_free.
Previously, `vfs->filedata` memory was allocated via `mju_malloc` in C and released using `Marshal.FreeHGlobal` in C#. In 5cc73c30bf, `mju_malloc` started returning 64-byte aligned pointers, which should not be freed by a deallocator that isn't aware of this alignment.

Fixes #479.

PiperOrigin-RevId: 474596441
Change-Id: I8a8383c7eaa2c1ec516d81f92a2f90e7aedfe2ee
2022-09-15 10:26:09 -07:00
Tom Erez 6de9eafa13 Initial release of the Unity plugin.
PiperOrigin-RevId: 425947505
2022-02-02 20:44:39 +00:00