RE: I/O memory allocation

From: Chemolli Francesco (USI) <ChemolliF@dont-contact.us>
Date: Mon, 9 Oct 2000 09:06:31 +0200

> Adrian Chadd wrote:
>
> > out soonish. In fact, I am pretty sure that a lot of those
> extraneous
> > buffer copies can go away - memory needed for a read or
> write op will
> > be supplied by a higher-up layer and is pretty much
> guaranteed to exist
> > until the end of the fileop anyway.
>
> For reads I would prefer if the memory was allocated by the I/O
> operation rather than the caller. I sort of see memory buffers with
> data, created at the time the data appears and destroyed (put back in
> the appropriate pool) when the last reference disappears.

Maybe we could think of a library layer handling refcounted immutable shared
strings?
We could probably get rid of LOTS of memcpy/strcpy's then (but we would
risk falling in some pitfalls plaguing the c++ programming language when
a char* is needed anyways...)

-- 
	/kinkie
Received on Mon Oct 09 2000 - 00:57:31 MDT

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