From d71d50b89ca6d2964238e3f309f5ee1b39e40757 Mon Sep 17 00:00:00 2001 From: Hidetoshi Shimokawa Date: Sat, 26 Jun 1999 15:22:33 +0000 Subject: [PATCH] Just return `curbrk' for sbrk(0) to avoid syscall overhead. --- lib/libc/alpha/sys/sbrk.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libc/alpha/sys/sbrk.S b/lib/libc/alpha/sys/sbrk.S index 3ecdd68f420e..5f4e15a22217 100644 --- a/lib/libc/alpha/sys/sbrk.S +++ b/lib/libc/alpha/sys/sbrk.S @@ -40,9 +40,11 @@ LEAF(sbrk, 1) br pv, L1 /* XXX profiling */ L1: LDGP(pv) ldq a1, curbrk + beq a0, L2 addq a0, a1, a0 CALLSYS_ERROR(break) stq a0, curbrk +L2: mov a1, v0 RET END(sbrk)