* Sherlock Library -- Memory Pools (One-Time Allocation)
*
* (c) 1997--2001 Martin Mares <mj@ucw.cz>
+ *
+ * This software may be freely distributed and used according to the terms
+ * of the GNU Lesser General Public License.
*/
#include "lib/lib.h"
bzero(x, s);
return x;
}
+
+char *
+mp_strdup(struct mempool *p, char *s)
+{
+ uns l = strlen(s) + 1;
+ char *t = mp_alloc_fast_noalign(p, l);
+ memcpy(t, s, l);
+ return t;
+}