From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,1c446b263fd4137b X-Google-Attributes: gid1164f8,public From: toon@moene.indiv.nluug.nl (Toon Moene) Subject: Yes, was: Stack allocation hosed in Digital Unix 3.2C ? Date: 1996/02/05 Message-ID: <1058@moene.indiv.nluug.nl>#1/1 X-Deja-AN: 138508075 sender: toon@moene.indiv.nluug.nl references: <1057@moene.indiv.nluug.nl> organization: Moene Computational Physics, Maartensdijk, The Netherlands newsgroups: comp.sys.dec In article <1057@moene.indiv.nluug.nl> I wrote: [ ... Segmentation fault on a program using 16 Mb of stack when 40 Mb is allowed - under Digital Unix 3.2C ... ] > > [ Local DEC support couldn't come up with an answer too, yet ] > Well, today they did. The answer is that Digital Unix 3.2C as shipped has the setting of the kernel variable 'stackinc' wrong. It is shipped as 4 pages (32 Kb) and should be 16 pages (128 Kb). How exactly this leads to the problem described I don't know; nor do I know if in cases of even larger stack usage the quoted number of 16 pages is adequate. As root, perform the following: # kdbx -k /vmunix /dev/mem p stackinc 32767 a stackinc=0x20000 131072 quit Normally, the automatic growth of the stack is made possible by bounding it with 'guard' pages (in fact, page table entries that will lead to access violations giving the OS the chance to expand the stack area). Apparently, there's a mismatch between the amount of expansion the OS thinks it has performed and the real value. This, however, is a guess - I haven't seen any kernel code of Digital Unix; perhaps someone from Digital in the know could clarify. -- Toon Moene (toon@moene.indiv.nluug.nl) Saturnushof 14, 3738 XG Maartensdijk, The Netherlands Phone: +31 346 214290; Fax: +31 346 214286 URL: http://www.knmi.nl/hirlam