# 2.11BSD#431 - /usr/src/lib/libc/gen/calloc.c

##### Functions

    calloc            X
    cfree             X

       1: #if defined(LIBC_SCCS) && !defined(lint)
       2: static char sccsid[] = "@(#)calloc.c	5.2 (Berkeley) 3/9/86";
       3: #endif LIBC_SCCS and not lint
       4:
       5: /*
       6:  * Calloc - allocate and clear memory block
       7:  */
       8: char *
       9: calloc(num, size)
      10:     register unsigned num, size;
      11: {
      12:     extern char *malloc();
      13:     register char *p;
      14:
      15:     size *= num;
      16:     if (p = malloc(size))
      17:         bzero(p, size);
      18:     return (p);
      19: }
      20:
      21: cfree(p, num, size)
      22:     char *p;
      23:     unsigned num;
      24:     unsigned size;
      25: {
      26:     free(p);
      27: }

#### Defined functions

calloc defined in line 8; used 222 times

- in /usr/include/stdlib.h line 75
- in /usr/src/bin/as/as0.s line 2, 132, 150, 162, 480, 636, 656
- in /usr/src/bin/cc.c line 43-46(4)
- in /usr/src/bin/diff/diffdir.c line 190
- in /usr/src/bin/ls/ls.c line 161, 276
- in /usr/src/bin/make/misc.c line 86-89(2), 143
- in /usr/src/bin/ps.c line 89, 755, 828
- in /usr/src/games/atc/list.c line 15
- in /usr/src/games/backgammon/fancy.c line 721
- in /usr/src/games/backgammon/move.c line 319
- in /usr/src/games/battlestar/mkstr.c line 28, 259
- in /usr/src/games/monop/cards.c line 42
- in /usr/src/games/monop/initdeck.c line 43-44(2)
- in /usr/src/games/monop/monop.c line 49, 60
- in /usr/src/games/monop/prop.c line 28
- in /usr/src/games/sail/dr_main.c line 39
- in /usr/src/games/sail/externs.h line 277
- in /usr/src/games/sail/pl_main.c line 69
- in /usr/src/lib/cpp/cpp.c line 805
- in /usr/src/lib/libc/gen/getusershell.c line 80, 98
- in /usr/src/lib/libc/stdio/findiop.c line 26, 67, 81, 90, 104
- in /usr/src/lib/mip/scan.c line 1125
- in /usr/src/libexec/ftpd/ftpcmd.y line 507
- in /usr/src/libexec/identd/src/identd.c line 97
- in /usr/src/libexec/identd/src/kvm.c line 356
- in /usr/src/libexec/popper/pop_dropinfo.c line 44
- in /usr/src/local/less/ch.c line 361, 371, 384
- in /usr/src/new/PORT/B/src/bed/bobj.c line 15
- in /usr/src/new/crash/crash.c line 553, 679, 697, 704, 712, 907, 931, 1092, 1115, 1227
- in /usr/src/new/jove/externs.h line 18
- in /usr/src/new/jove/io.c line 1133
- in /usr/src/new/l11/sup.c line 95-98(2)
- in /usr/src/new/m11/macxrf.c line 182, 192, 257, 271-273(2)
- in /usr/src/new/pathalias/arpatxt.c line 46, 271
- in /usr/src/old/cu/cu.c line 812, 822
- in /usr/src/old/dump/dumpitime.c line 34, 49, 109
- in /usr/src/sbin/dump/dumpitime.c line 32, 47, 109
- in /usr/src/sbin/init/init.c line 448
- in /usr/src/sbin/quotacheck/quotacheck.c line 447
- in /usr/src/share/zoneinfo/ialloc.c line 19, 46
- in /usr/src/sys/autoconfig/read_nlist.c line 55-58(2)
- in /usr/src/ucb/Mail/cmd2.c line 469-470(2)
- in /usr/src/ucb/Mail/cmd3.c line 465, 479, 705-707(2)
- in /usr/src/ucb/Mail/def.h line 282
- in /usr/src/ucb/Mail/lex.c line 438
- in /usr/src/ucb/Mail/vars.c line 59
- in /usr/src/ucb/PORT/pascal/utilities/pc3.c line 208, 554, 680
- in /usr/src/ucb/PORT/systat/disks.c line 52-56(3)
- in /usr/src/ucb/PORT/systat/iostat.c line 85-86(2)
- in /usr/src/ucb/PORT/systat/mbufs.c line 114
- in /usr/src/ucb/PORT/systat/pigs.c line 177, 183, 201-206(2)
- in /usr/src/ucb/PORT/systat/swap.c line 214, 225-227(2), 254
- in /usr/src/ucb/PORT/systat/systat.h line 91
- in /usr/src/ucb/PORT/systat/vmstat.c line 174-177(4), 188-189(2)
- in /usr/src/ucb/error/errorsubr.c line 59
- in /usr/src/ucb/finger/finger.c line 156
- in /usr/src/ucb/ftp/glob.c line 75
- in /usr/src/ucb/gcore.c line 83
- in /usr/src/ucb/mkstr.c line 22, 248
- in /usr/src/ucb/netstat/unix.c line 32, 58
- in /usr/src/ucb/sendbug/unixtomh.c line 34, 310
- in /usr/src/ucb/vmstat.c line 150, 238-244(6)
- in /usr/src/ucb/window/wwopen.c line 23
- in /usr/src/ucb/xstr.c line 31, 302, 418
- in /usr/src/usr.bin/deroff.c line 201, 276, 506, 1311
- in /usr/src/usr.bin/f77/driver.c line 903-905(2)
- in /usr/src/usr.bin/f77/misc.c line 598-600(2)
- in /usr/src/usr.bin/iostat.c line 108-121(14)
- in /usr/src/usr.bin/lex/ldefs.c line 163
- in /usr/src/usr.bin/lex/lmain.c line 196
- in /usr/src/usr.bin/lint/lpass2.c line 709
- in /usr/src/usr.bin/prof/prof.c line 255, 330, 390
- in /usr/src/usr.bin/ptx.c line 36, 195
- in /usr/src/usr.bin/refer/deliv2.c line 48-53(2)
- in /usr/src/usr.bin/refer/hunt1.c line 21, 130, 149-150(2), 156
- in /usr/src/usr.bin/refer/inv5.c line 27-32(2)
- in /usr/src/usr.bin/refer/inv6.c line 25-27(2)
- in /usr/src/usr.bin/refer/refer7.c line 90
- in /usr/src/usr.bin/spell/spell.h line 80
- in /usr/src/usr.bin/tbl/tb.c line 40, 52, 71
- in /usr/src/usr.bin/tip/uucplock.c line 103, 113
- in /usr/src/usr.bin/uucp/chkpth.c line 111, 141
- in /usr/src/usr.bin/uucp/gnsys.c line 129
- in /usr/src/usr.bin/uucp/uuq.c line 145
- in /usr/src/usr.lib/libI77/open.c line 120
- in /usr/src/usr.lib/libU77/malloc_.c line 32, 51
- in /usr/src/usr.lib/libvmf/vmf.c line 62
- in /usr/src/usr.sbin/cron/bitstring.h line 41
- in /usr/src/usr.sbin/cron/entry.c line 106
- in /usr/src/usr.sbin/lpr/filters/rvcat.c line 54, 877
- in /usr/src/usr.sbin/lpr/filters/rvsort.c line 20
- in /usr/src/usr.sbin/lpr/filters/vcat.c line 40, 829
- in /usr/src/usr.sbin/lpr/filters/vsort.c line 20, 370, 387
- in /usr/src/usr.sbin/lpr/pac.c line 216, 295-296(2), 400
- in /usr/src/usr.sbin/pstat/pstat.c line 219, 307, 364, 703, 766
- in /usr/src/usr.sbin/repquota/repquota.c line 296, 304
- in /usr/src/usr.sbin/sa/sa.c line 467, 980, 1007
- in /usr/src/usr.sbin/syslogd/syslogd.c line 689

cfree defined in line 21; used 46 times

- in /usr/src/bin/ls/ls.c line 202-203(2), 245-249(3)
- in /usr/src/games/monop/monop.c line 73-74(2)
- in /usr/src/games/monop/prop.c line 34, 79
- in /usr/src/new/bm/MakeSkip.c line 44
- in /usr/src/new/pathalias/arpatxt.c line 569
- in /usr/src/ucb/Mail/cmd3.c line 418, 426, 704
- in /usr/src/ucb/Mail/lex.c line 437
- in /usr/src/ucb/ctags.c line 660
- in /usr/src/ucb/ruptime.c line 147
- in /usr/src/usr.bin/lex/lmain.c line 135-137(3), 158-169(12), 182-190(9)
- in /usr/src/usr.bin/lex/parser.y line 248, 297
- in /usr/src/usr.bin/lex/sub2.c line 868
- in /usr/src/usr.sbin/lpr/filters/vsort.c line 523-524(2)

#### Defined variables

sccsid defined in line 2; never used

Last modified: 1986-03-10 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 715 |