From 9d46360c9d83fa95f42f1eebbad49ecd9281fb0d Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sat, 11 Apr 2020 01:26:36 +0200 Subject: backout the gethunk() again, as that breaks the assemblers the assemblers share gethunk() cc/macbody but are compiled without compat.c, so calls such as getenv() trigger malloc() which does its own sbrk() calls, breaking the continuity of the hunk. so this change needs another revision. until then, this is backed out. --- sys/src/cmd/7l/obj.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'sys/src/cmd/7l') diff --git a/sys/src/cmd/7l/obj.c b/sys/src/cmd/7l/obj.c index fc2ba179a..75def5096 100644 --- a/sys/src/cmd/7l/obj.c +++ b/sys/src/cmd/7l/obj.c @@ -1178,11 +1178,8 @@ gethunk(void) diag("out of memory"); errorexit(); } - if(nhunk == 0) - hunk = h; - else - nh += (h - hunk) - nhunk; - nhunk += nh; + hunk = h; + nhunk = nh; thunk += nh; } -- cgit v1.2.3