Add /dev/shm implementation of shared memory for non-Android platforms
| 78 | #ifndef __ANDROID__ |
| 79 | // Add /dev/shm implementation of shared memory for non-Android platforms |
| 80 | int ASharedMemory_create(const char* name, size_t size) { |
| 81 | int fd = shm_open(name, O_RDWR | O_CREAT, 0644); |
| 82 | if (fd < 0) { |
| 83 | return fd; |
| 84 | } |
| 85 | int result = ftruncate(fd, size); |
| 86 | if (result < 0) { |
| 87 | close(fd); |
| 88 | return -1; |
| 89 | } |
| 90 | return fd; |
| 91 | } |
| 92 | #endif // __ANDROID__ |
| 93 | |
| 94 | #define LOAD_FUNCTION(handle, name) \ |
nothing calls this directly
no outgoing calls
no test coverage detected