4 #include "sys/syscall.h"
8 int __trap0 (int function
, int p1
, int p2
, int p3
);
10 #define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
15 extern char end
; /* Defined by the linker */
16 static char *heap_end
;
19 char *sp
= (char *)stack_ptr
;
21 char *sp
= (char *)&sp
;
28 prev_heap_end
= heap_end
;
29 if (heap_end
+ incr
> sp
)
31 _write (1, "Heap and stack collision\n", 25);
35 return (caddr_t
) prev_heap_end
;