1FREEBUF(3PVM)                   PVM Version 3.4                  FREEBUF(3PVM)
2
3
4

NAME

6       pvm_freebuf - Disposes of a message buffer.
7
8

SYNOPSIS

10       C    int info = pvm_freebuf( int bufid )
11
12       Fortran   call pvmffreebuf( bufid, info )
13
14

PARAMETERS

16       bufid   Integer message buffer identifier.
17
18       info    Integer  status code returned by the routine.  Values less than
19               zero indicate an error.
20
21

DESCRIPTION

23       The routine pvm_freebuf frees the memory associated  with  the  message
24       buffer  identified by bufid.  Message buffers are created by pvm_mkbuf,
25       pvm_initsend, and pvm_recv.  If pvm_freebuf is successful, info will be
26       0.  If some error occurs then info will be < 0.
27
28       pvm_freebuf  can be called for a send buffer created by pvm_mkbuf after
29       the message has been sent and is no longer needed.
30
31       Receive buffers typically do not have to be freed unless they have been
32       saved  in the course of using multiple buffers.  But pvm_freebuf can be
33       used to destroy receive buffers as well.  So messages that  arrive  but
34       are  no  longer needed can be destroyed so they will not consume buffer
35       space.
36
37       Typically multiple send and receive buffers are not needed and the user
38       can  simply use the pvm_initsend routine to reset the default send buf‐
39       fer.
40
41       There are several cases where multiple buffers are useful.  One example
42       where multiple message buffers are needed involves libraries or graphi‐
43       cal interfaces that use PVM and interact with a running PVM application
44       but do not want to interfere with the application's own communication.
45
46       When  multiple  buffers  are used they generally are made and freed for
47       each message that is packed.   In  fact,  pvm_initsend  simply  does  a
48       pvm_freebuf followed by a pvm_mkbuf for the default buffer.
49
50

EXAMPLES

52       C:
53            bufid = pvm_mkbuf( PvmDataDefault );
54                  :
55            info = pvm_freebuf( bufid );
56
57       Fortran:
58            CALL PVMFMKBUF( PVMDEFAULT, BUFID )
59                  :
60            CALL PVMFFREEBUF( BUFID, INFO )
61
62

ERRORS

64       These error conditions can be returned by pvm_freebuf
65
66       PvmBadParam
67              giving an invalid argument value.
68
69       PvmNoSuchBuf
70              giving an invalid bufid value.
71

SEE ALSO

73       pvm_mkbuf(3PVM), pvm_initsend(3PVM), pvm_recv(3PVM)
74
75
76
77                                30 August, 1993                  FREEBUF(3PVM)
Impressum