shithub: riscv

Download patch

ref: a4ab7dbe4676a12d5a04844a519507811857f422
parent: 48a82f2641935cb1e7b9e08bf86ce5c506d02953
author: cinap_lenrek <[email protected]>
date: Tue Apr 2 14:29:22 EDT 2019

sshnet: reduce memory consumption by lowering stack sizes

--- a/sys/src/cmd/sshnet.c
+++ b/sys/src/cmd/sshnet.c
@@ -1250,7 +1250,7 @@
 
 	pipe(pfd);
 	sshfd = pfd[0];
-	procrfork(startssh, nil, mainstacksize, RFFDG|RFNOTEG|RFNAMEG);
+	procrfork(startssh, nil, 8*1024, RFFDG|RFNOTEG|RFNAMEG);
 	close(pfd[1]);
 
 	sendmsg(pack(nil, "bsuuu", MSG_CHANNEL_OPEN,
@@ -1317,8 +1317,8 @@
 	fsreqwaitchan = chancreate(sizeof(void*), 0);
 	fsclunkchan = chancreate(sizeof(Fid*), 0);
 	fsclunkwaitchan = chancreate(sizeof(void*), 0);
-	procrfork(fsnetproc, nil, mainstacksize, RFNAMEG|RFNOTEG);
-	procrfork(sshreadproc, nil, mainstacksize, RFNAMEG|RFNOTEG);
+	procrfork(fsnetproc, nil, 8*1024, RFNAMEG|RFNOTEG);
+	procrfork(sshreadproc, nil, 8*1024, RFNAMEG|RFNOTEG);
 
 	ssh(argc, argv);