tutil.c - plan9port - [fork] Plan 9 from user space
HTML git clone git://src.adamsgaard.dk/plan9port
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
tutil.c (242B)
---
1 #include <u.h>
2 #include <libc.h>
3 #include <diskfs.h>
4
5 void*
6 emalloc(ulong n)
7 {
8 void *v;
9
10 v = mallocz(n, 1);
11 if(v == nil)
12 abort();
13 return v;
14 }
15
16 void*
17 erealloc(void *v, ulong n)
18 {
19 v = realloc(v, n);
20 if(v == nil)
21 abort();
22 return v;
23 }