Plan 9 from Bell Labs’s /usr/web/sources/contrib/stallion/src/collectd/util.c

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#include <u.h>
#include <libc.h>
#include <thread.h>
#include <bio.h>
#include "collectd.h"

void *
emalloc(ulong size)
{
	void *p;

	p = mallocz(size, 1);
	if(p == nil)
		sysfatal("out of memory");
	return p;
}

char *
estrdup(char *s)
{
	char *t;

	t = strdup(s);
	if(t == nil)
		sysfatal("out of memory");
	return t;
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.