URI:
       tmallocz.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
       ---
       tmallocz.c (189B)
       ---
            1 #include <u.h>
            2 #include <unistd.h>
            3 #include <string.h>
            4 #include <libc.h>
            5 
            6 void*
            7 mallocz(unsigned long n, int clr)
            8 {
            9         void *v;
           10 
           11         v = malloc(n);
           12         if(clr && v)
           13                 memset(v, 0, n);
           14         return v;
           15 }