+
+/*
+ * This is a stub for the "brk" system call, which we want to
+ * catch so that it will not deallocate our data space.
+ * (of which the program is not aware)
+ */
+asm("#define _curbrk curbrk");
+extern char *curbrk;
+
+brk(addr)
+ char *addr;
+{
+
+ if (addr < minsbrk)
+ addr = minsbrk;
+ asm(" chmk $17");
+ asm(" jcs cerror");
+ curbrk = addr;
+ return (0);
+}