Path: csiph.com!news.swapon.de!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: filling area by color atack safety Date: Sat, 23 Mar 2024 11:48:16 -0700 Organization: A noiseless patient Spider Lines: 16 Message-ID: <86sf0gkcnj.fsf@linuxsc.com> References: <87wmq2jn7s.fsf@bsb.me.uk> <87frwpje2b.fsf@bsb.me.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: dont-email.me; posting-host="6af46d5f1415f729bb6ec55b5ea784b7"; logging-data="4000316"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+DkrAcxWcWsE50EM3VCvRjz30ToyEMbkk=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:KFiKb7+/ekd3cFMSeczo7aj2I70= sha1:sUwK2FXDAy8tHiWG7b1JO0qm+dc= Xref: csiph.com comp.lang.c:383935 scott@slp53.sl.home (Scott Lurndal) writes: >> Malcolm McLean writes: >> >>> The convetional wisdom is the opposite, But here, conventional wisdom >>> fails. Because heaps are unlimited while stacks are not. > > That's not actually true. The size of both are bounded, yes. > > It's certainly possible (in POSIX, anyway) for the stack bounds > to be unlimited (given sufficient real memory and/or backing > store) and the heap size to be bounded. See 'setrlimit'. The sizes of both heaps and stacks are bounded, because pointers have a fixed number of bits. Certainly these sizes can be very very large, but they are not unbounded.