Newsgroups: comp.parallel.pvm From: Peter Schaefer Subject: Re: Message Buffers Organization: http://malaga.math.uni-augsburg.de/schaefer/ Date: Mon, 02 Jun 1997 18:10:11 +0200 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <3392F063.167E@malaga.math.uni-augsburg.de> Eric Eslinger wrote: > > I am writing a sort of a "blanket" object set for my users to interface > with a whole bunch of different communication protocols, PVM being > one of them. > > so anyway, the problem is that the model I have works very well with > a lot of other protocols (sockets, tcpip, etc) but there is this > teensy weensy problem with PVM. Message Buffers. In my code, I have > my own buffer objects that lay nicely on top of PVM message buffers > for the most part, what i want to do is: > > PVMBuffer * buf = new PVMBuffer; > pvm_setrbuf(buffer->bufid()); > pvm_recv(-1, -1); > unpack a bunch of stuff > delete buf; > > and have the calls to mkbuf and freebuf in the constructor and > destructor. what I am concerned about is a resource leak in the form > of the default recieve/send buffers being created automatically by > pvm somewhere and never destroyed, as they get overriden by the > buffers I create inside my Buffer objects. I don't know, can't you do the following ?: > PVMBuffer * buf = new PVMBuffer; int oldbuf; > oldbuf=pvm_setrbuf(buffer->bufid()); pvm_freebuf(oldbuf); > pvm_recv(-1, -1); > //unpack a bunch of stuff > delete buf; or perhaps: > PVMBuffer * buf = new PVMBuffer; int oldbuf; > oldbuf=pvm_setrbuf(buffer->bufid()); > pvm_recv(-1, -1); > //unpack a bunch of stuff > delete buf; pvm_setrbuf(oldbuf); Finally, can someone tell me what switch you need for xdr on a paragon 8-| ? -- Peter Schaefer mailto:schaefer@malaga.math.uni-augsburg.de "leisure": http://wwwhoppe.math.uni-augsburg.de/schaefer/Willkommen.html "office": http://wwwhoppe.math.uni-augsburg.de/schaefer/me.html What does the left half of a Zen Master teach ? .gnillaf speek exa na nehw edisa pets oT