]> git.lizzy.rs Git - plan9front.git/blob - sys/src/libc/port/calloc.c
libregexp: improve the transition to next available thread, instruction, and generation
[plan9front.git] / sys / src / libc / port / calloc.c
1 #include <u.h>
2 #include <libc.h>
3
4 void*
5 calloc(ulong n, ulong s)
6 {
7         void *v;
8         if(n > 1 && ((ulong)-1)/n < s)
9                 return nil;
10         if(v = mallocz(n*s, 1))
11                 setmalloctag(v, getcallerpc(&n));
12         return v;
13 }