Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
16 lines (12 sloc) 270 Bytes
#ifndef OMNIVORE_UTIL_H
#define OMNIVORE_UTIL_H
#include <cstdlib>
namespace Omnivore {
void *duplicate_memory(const void *ptr, int size) {
void *dupped;
if (!(dupped = malloc(size))) return 0;
memcpy(dupped, ptr, size);
return dupped;
}
}
#endif
Something went wrong with that request. Please try again.