mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
14 lines
339 B
C
14 lines
339 B
C
#ifndef UTIL_MEM_H
|
|
#define UTIL_MEM_H
|
|
|
|
#include <stdbool.h>
|
|
#include <stddef.h>
|
|
|
|
/**
|
|
* Allocate a new block of memory and copy *src to it, then store the address
|
|
* of the new allocation in *out. Returns true if it worked, or false if
|
|
* allocation failed.
|
|
*/
|
|
bool memdup(void *out, const void *src, size_t size);
|
|
|
|
#endif // UTIL_MEM_H
|