#include <stdlib.h>#include <string.h>#include <linux/string.h>/** * memdup - duplicate region of memory * * @src: memory region to duplicate * @len: memory region length */void*memdup(constvoid*src,size_tlen){void*p=malloc(len);if(p)memcpy(p,src,len);returnp;}