[saga-rg] Re: Meeting Notes: Messaging API
Andre Merzky
andre at merzky.net
Tue Nov 22 17:21:05 CST 2005
Quoting [Andrei Hutanu] (Nov 22 2005):
>
> Andre,
>
> Thanks for the notes!
>
> >
> > - read: two step mechanism:
> > (int handle, int size) = query_size ();
> > (char* buffer) = read (handle, size);
> >
> > - handle can be zero, if size is known (one step read)
> > - buffer needs to be allocated by application.
> > - if size is zero, the buffer is allocated by the
> > implementation and returned to be freed by the
> > application (one step read)
> >
> >
> This part is a bit confusing .. with the one step read you lose the
> length of the message?
> it should probably be (char* buffer, int size) = read () for the one
> step read ..Or am I reading it wrong..
No, you are probably right. IIRC, we pinned down two
different semantics for one step read:
a) size is known, malloc by application
(buffer) = read (handle = NULL, size);
b) size unknown, malloc by implementation
(buffer, size) = read ();
Thanks, Andre.
> Andrei
--
+-----------------------------------------------------------------+
| Andre Merzky | phon: +31 - 20 - 598 - 7759 |
| Vrije Universiteit Amsterdam (VU) | fax : +31 - 20 - 598 - 7653 |
| Dept. of Computer Science | mail: merzky at cs.vu.nl |
| De Boelelaan 1083a | www: http://www.merzky.net |
| 1081 HV Amsterdam, Netherlands | |
+-----------------------------------------------------------------+
More information about the saga-rg
mailing list