Date: Mon, 10 Nov 1997 10:16:02 +0200 (IST) From: Eli Zaretskii To: sl cc: DJGPP mailing list Subject: Re: Program with functions In-Reply-To: <199711091926.OAA12087@delorie.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Sun, 9 Nov 1997, sl wrote: > This is doable but still not comfortable.. There has to be a > better way.. Doesn't automatic disposing or something exist? It does: it's called `alloca'. It works like `malloc', but allocates the storage off the stack, so when your function returns, that storage is automagically deallocated. Caveat: since the default stack is 256KB-long, this technique is dangerous if you need large buffers. But for small (say, up to 10K) buffers, it is ideal.