# 2.11BSD#431 - /usr/src/lib/libc/pdp/sys/sbrk.s

##### Functions

    _sbrk             X

##### Variables

    curbrk            X
    minbrk            X

       1: /*
       2:  * Copyright (c) 1987 Regents of the University of California.
       3:  * All rights reserved.  The Berkeley software License Agreement
       4:  * specifies the terms and conditions for redistribution.
       5:  */
       6:
       7: #ifdef SYSLIBC_SCCS
       8: _sccsid: <@(#)sbrk.s	2.6 (2.11BSD GTE) 1995/05/08\0>
       9:         .even
      10: #endif SYSLIBC_SCCS
      11:
      12: /*
      13:  * XXX - this routine can't use SYSCALL!!!
      14:  */
      15: #include "SYS.h"
      16:
      17: .data
      18: .globl  _end
      19: .globl  curbrk, minbrk
      20:
      21: curbrk: _end
      22: minbrk: _end
      23: .text
      24:
      25: ENTRY(sbrk)
      26:         mov     2(sp),r0        / grab increment
      27:         beq     1f              / (bop out early if zero)
      28:         add     curbrk,r0       / calculate and pass break address
      29:         mov     r0,-(sp)
      30:         tst     -(sp)           / simulate return address stack spacing
      31:         SYS(sbrk)
          /
          /   trap 69 -> [kernel] -> syscall() -> via sysent[] -> handler: sbrk
          /
      32:         bes     2f
      33:         cmp     (sp)+,(sp)+     / (clean up stack)
      34: 1:
      35:         mov     curbrk,r0       / return old break address and add
      36:         add     2(sp),curbrk    /   increment to curbrk
      37:         rts     pc
      38: 2:
      39:         cmp     (sp)+,(sp)+     / (clean up stack)
      40:         jmp     x_error

#### Defined functions

_sbrk defined in line 25; used 120 times

- in /usr/include/unistd.h line 85
- in /usr/ingres/source/dbu/ksort.c line 56, 110
- in /usr/src/bin/awk/freeze.c line 9
- in /usr/src/bin/csh/alloc.c line 69, 107-112(2), 202
- in /usr/src/bin/csh/alloc11.c line 62, 102-106(2)
- in /usr/src/bin/dd.c line 25, 277-282(3)
- in /usr/src/bin/ld/ld.c line 505
- in /usr/src/bin/sh/setbrk.c line 18
- in /usr/src/bin/tcsh/alloc11.c line 86, 126-130(2)
- in /usr/src/bin/tcsh/sh.types.h line 92, 151
- in /usr/src/bin/tcsh/tc.alloc.c line 132, 244-249(2), 258, 581-584(2)
- in /usr/src/bin/tcsh/tc.os.c line 677, 696
- in /usr/src/bin/tp/tp.h line 71
- in /usr/src/games/adventure/save.c line 14, 47, 66-70(2)
- in /usr/src/games/monop/execute.c line 160
- in /usr/src/lib/c2/c2.h line 142-146(2)
- in /usr/src/lib/c2/c20.c line 111
- in /usr/src/lib/c2/c21.c line 598
- in /usr/src/lib/ccom/c0.h line 470
- in /usr/src/lib/ccom/c00.c line 117
- in /usr/src/lib/ccom/c01.c line 652, 695
- in /usr/src/lib/ccom/c1.h line 149
- in /usr/src/lib/ccom/c10.c line 61
- in /usr/src/lib/ccom/c12.c line 1149
- in /usr/src/lib/libc/gen/malloc.c line 93, 134, 143
- in /usr/src/lib/libc/pdp/csu/mon.c line 43, 52-57(2)
- in /usr/src/new/OLD/apl/src/aq.c line 131, 142
- in /usr/src/new/OLD/apl/src/xed.c line 1081-1084(3), 1510, 5894
- in /usr/src/new/PORT/apl/src/aq.c line 131, 142
- in /usr/src/new/PORT/apl/src/xed.c line 1081-1084(3)
- in /usr/src/new/PORT/perl.1.0.0/malloc.c line 71, 165-167(2), 173
- in /usr/src/new/PORT/perl.1.0.10/malloc.c line 83, 177-179(2), 185
- in /usr/src/new/PORT/perl.1.0.16/malloc.c line 83, 177-179(2), 185
- in /usr/src/new/jove/malloc.c line 60, 96-99(2)
- in /usr/src/new/pathalias/mem.c line 14, 179-185(3)
- in /usr/src/sbin/fsck/main.c line 93-96(2)
- in /usr/src/ucb/ex/ex.c line 247
- in /usr/src/ucb/ex/ex_subr.c line 396
- in /usr/src/ucb/ex/exrecover.c line 77, 112
- in /usr/src/ucb/pascal/px/palloc.c line 4, 14-16(2), 31
- in /usr/src/usr.bin/f77/malloc.c line 38, 71-74(2)
- in /usr/src/usr.bin/find/find.c line 52, 291-292(2)
- in /usr/src/usr.bin/patch/malloc.c line 137, 167, 189, 196, 217-224(3), 428
- in /usr/src/usr.bin/roff/common_source/n3.c line 454-458(2)
- in /usr/src/usr.bin/sort.c line 174, 248
- in /usr/src/usr.sbin/lpr/filters/rotate.c line 21, 55
- in /usr/src/usr.sbin/lpr/filters/rotprt.c line 21, 47
- in /usr/src/usr.sbin/sendmail.MX/src/main.c line 872, 888
- in /usr/src/usr.sbin/sendmail/src/main.c line 876, 892

_sccsid defined in line 8; never used

#### Defined variables

curbrk declared in line 19; defined in line 21; used 6 times

- in line 19, 28, 35-36(2)
- in /usr/src/lib/libc/pdp/sys/brk.s line 17, 26

minbrk declared in line 19; defined in line 22; used 4 times

- in line 19
- in /usr/src/lib/libc/pdp/sys/brk.s line 17-22(3)

Last modified: 1995-05-09 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 645 |