changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > plan9front / changeset: sshnet: reduce memory consumption by lowering stack sizes

changeset 7122: 20b91fedbefc
parent 7121: a69ea0d34942
child 7123: 61c77ecfdb10
author: cinap_lenrek@felloff.net
date: Tue, 02 Apr 2019 18:29:22 +0200
files: sys/src/cmd/sshnet.c
description: sshnet: reduce memory consumption by lowering stack sizes
     1.1--- a/sys/src/cmd/sshnet.c
     1.2+++ b/sys/src/cmd/sshnet.c
     1.3@@ -1250,7 +1250,7 @@ ssh(int argc, char *argv[])
     1.4 
     1.5 	pipe(pfd);
     1.6 	sshfd = pfd[0];
     1.7-	procrfork(startssh, nil, mainstacksize, RFFDG|RFNOTEG|RFNAMEG);
     1.8+	procrfork(startssh, nil, 8*1024, RFFDG|RFNOTEG|RFNAMEG);
     1.9 	close(pfd[1]);
    1.10 
    1.11 	sendmsg(pack(nil, "bsuuu", MSG_CHANNEL_OPEN,
    1.12@@ -1317,8 +1317,8 @@ threadmain(int argc, char **argv)
    1.13 	fsreqwaitchan = chancreate(sizeof(void*), 0);
    1.14 	fsclunkchan = chancreate(sizeof(Fid*), 0);
    1.15 	fsclunkwaitchan = chancreate(sizeof(void*), 0);
    1.16-	procrfork(fsnetproc, nil, mainstacksize, RFNAMEG|RFNOTEG);
    1.17-	procrfork(sshreadproc, nil, mainstacksize, RFNAMEG|RFNOTEG);
    1.18+	procrfork(fsnetproc, nil, 8*1024, RFNAMEG|RFNOTEG);
    1.19+	procrfork(sshreadproc, nil, 8*1024, RFNAMEG|RFNOTEG);
    1.20 
    1.21 	ssh(argc, argv);
    1.22