Re: thoughts on memory usage...

From: Michael O'Reilly <michael@dont-contact.us>
Date: Fri, 22 Aug 1997 07:38:43 +0800

In message <c=UK%a=_%p=Origin-it%l=UKCMX001-970821215226Z-13666@ukrax001.ras.uk
.origin-it.com>, "Larmour, Jonathan" writes:
> >You can actually get away with this, there's a disgusting trick you do
> >to make it work (mostly).
> [snip]
>
> This is silly (and the trick is indeed disgusting :-)). Just pass in a
> char* on the calling functions stack as a param to decode. It also gets
> returned. In the case above, use two different char *s.

[ .. ]
> Shurely this is the obvious way to do it.
>

Certainly it's one way of doing it, it's just harder to us. (you need
to prealloc buffer space every time you use DECODE. i.e. you can't just
search and replace around e->url any more).

Of course, if there are other ways along the lines of macro's using
alloca() et al. but they aren't as portable.

Michael.
Received on Tue Jul 29 2003 - 13:15:42 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:11:24 MST