Files
scrcpy/app/src/util/memory.h
Romain Vimont cef9bf51a9 Add sc_allocarray() util
Add a function to allocate an array, which fails safely in the case
where the multiplication would overflow.
2023-03-06 09:26:29 +01:00

13 lines
219 B
C

#ifndef SC_MEMORY_H
#define SC_MEMORY_H
#include <stddef.h>
/* Like calloc(), but without initialization.
* Like reallocarray(), but without reallocation.
*/
void *
sc_allocarray(size_t nmemb, size_t size);
#endif