From owner-freebsd-current Wed Mar 22 8:13:44 2000 Delivered-To: freebsd-current@freebsd.org Received: from knight.cons.org (knight.cons.org [194.233.237.86]) by hub.freebsd.org (Postfix) with ESMTP id D232337BB72 for ; Wed, 22 Mar 2000 08:13:40 -0800 (PST) (envelope-from cracauer@knight.cons.org) Received: (from cracauer@localhost) by knight.cons.org (8.9.3/8.9.3) id RAA18893; Wed, 22 Mar 2000 17:13:26 +0100 (CET) Date: Wed, 22 Mar 2000 17:13:25 +0100 From: Martin Cracauer To: Mirko Viviani Cc: freebsd-current@FreeBSD.ORG Subject: Re: libobjc and stack problems. (really libc_r and stack size) Message-ID: <20000322171325.B18834@cons.org> References: <200003220814.JAA01602@next.procom2.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <200003220814.JAA01602@next.procom2.it>; from mirko.viviani@rccr.cremona.it on Wed, Mar 22, 2000 at 09:03:47AM +0100 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hai, In <200003220814.JAA01602@next.procom2.it>, Mirko Viviani wrote: > Ciao. > > Is it possible to apply the gnu/17433 patch before the 4.0-STABLE ? > > Related to this I'm excepting some strange behaviour with prgs linked with libc_r > under 3.4 and I would like to know if they are also in 4.0. [please break lines at < 80 chars, thanks] > 1. In a prg linked with libc I can use a local buffer up to 65 MB, but if the same is > linked with libc_r I can use up to 1 MB buffer else it fails with a seg fault. > (char buf[60 * 1024]) > Why ? I assume this is function-local stack space? if not, please post a compilable test program. > 2. The same thing apply to pthread, that apart from the ridicolously small (posix specs ?) > initial default value of 65 kb the stack can't grown. > Why ? I don't think anyone came up with a solution to provide growable stacks in threads. Stacks in plain processes can grow, because the next allocated thing is the heap on the other end of the address space. You can't do this for threads, you have to choose a distance, you have to device your address space. Large default stacks limit the heap considerably on a 32 bit machine. They will also not solve, but shift the problem. So it's better to have a small limit so that application programmer either use small stack amounts or when that fails think over their choice. But we cannot make a good guess without hints from the application. > Thanks to libobjc and the first problem it's nearly impossible to > run GNUstep prgs with -pthread support. It there a way to fix ? Use pthread_attr_setstacksize() > It's not possible to have contrib/gdb shipped with objective-c > language patches ? Can you point me to the newest set of ObjC patches for gdb, please? I don't think they will it into the base system, mainly because it takes off files from the vendor branch. But we also have a gdb in ports, where patches are more welcome. Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer http://www.cons.org/cracauer/ Tel.: (private) +4940 5221829 Fax.: (private) +4940 5228536 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message