shithub: riscv

ref: 88412aa050adddde5cacf3a45e914bad9a5d3e22
dir: /sys/src/cmd/ip/httpd/emem.c/

View raw version
#include <u.h>
#include <libc.h>
#include "httpd.h"

void*
ezalloc(ulong n)
{
	void *p;

	p = malloc(n);
	if(p == nil)
		sysfatal("out of memory");
	memset(p, 0, n);
	return p;
}

char*
estrdup(char *s)
{
	s = strdup(s);
	if(s == nil)
		sysfatal("out of memory");
	return s;
}