home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V6 / usr / man / man2 / break.2 next >
Encoding:
Text File  |  1975-06-26  |  1.3 KB  |  59 lines

  1. .th BREAK II 8/5/73
  2. .sh NAME
  3. break, brk, sbrk \*- change core allocation
  4. .sh SYNOPSIS
  5. (break = 17.)
  6. .br
  7. .ft B
  8. sys break; addr
  9. .s3
  10. char *brk(addr)
  11. .s3
  12. char *sbrk(incr)
  13. .ft R
  14. .sh DESCRIPTION
  15. .it Break
  16. sets the system's idea of the lowest location not used by the program
  17. (called the break)
  18. to
  19. .it addr
  20. (rounded up to the next multiple of 64 bytes).
  21. Locations not less than
  22. .it addr
  23. and below the stack pointer
  24. are not in the address space and will thus
  25. cause a memory violation if accessed.
  26. .s3
  27. From C,
  28. .it brk
  29. will set the break to
  30. .it addr.
  31. The old break is returned.
  32. .s3
  33. In the alternate entry
  34. .it sbrk,
  35. .it incr
  36. more bytes are added to the
  37. program's data space and a pointer to the
  38. start of the new area is returned.
  39. .s3
  40. When a program begins execution via
  41. .it exec
  42. the break is set at the
  43. highest location defined by the program
  44. and data storage areas.
  45. Ordinarily, therefore, only programs with growing
  46. data areas need to use
  47. .it break.
  48. .sh "SEE ALSO"
  49. exec (II), alloc (III), end (III)
  50. .sh DIAGNOSTICS
  51. The c-bit is set if the program requests more
  52. memory than the system limit
  53. or if more than 8 segmentation
  54. registers would be required to implement the break.
  55. From C, \*-1 is returned for these errors.
  56. .sh BUGS
  57. Setting the break in the range
  58. 0177700 to 0177777 is the same as setting it to zero.
  59.