Subject: System vs. Application buffers

From: [email-masked] (Jon Flower)
Date: Mon, 8 Feb 93 07:53:12 PST

Having application level buffers certainly seems to give the
user more control over the amount of memory they hve to play with
but is it consistent with layered (library) packages?

Assume that we have a simple three-tier library calling sequence
with buffer requirements as follows

	User-application                 (Needs buffer space X)
             Library-1                   (Needs buffer space Y)
                  Library-2              (Needs buffer space Z)

Are we then going to ask for memory (X+Y+Z) or simply max(X,Y,Z)?
I suspect that if the system is buffering we'll probably get the
latter. In the application buffered case you could probably
have either  if buffers are allocated with malloc/realloc. But if
buffers are declared explicitly then X+Y+Z is probably going to
be required.

One option would be to have one of the arguments to the library
package be its message buffer space in the same way that IMSL
routines have you pass in workspace as arguments. Then you could
potentially re-use an outer layer buffer. This seems ugly but
would probably work.

	Jon