4{
5
6
7
8
9
10
11
12
13
14
15
16 static char * pblasbuf = NULL;
17 static Int pbbuflen = 0, mone = -1;
18
19
20
22
23
24
25 if( length >= 0 )
26 {
27 if( length > pbbuflen )
28 {
29 if( pblasbuf )
30 free( pblasbuf );
31 pblasbuf = (char *) malloc((unsigned)length);
32 if( !pblasbuf )
33 {
34 fprintf( stderr,
35 "PBLAS %s ERROR: Memory allocation failed\n",
36 mess );
38 }
39 pbbuflen = length;
40 }
41 }
42 else if( pblasbuf )
43 {
44 free( pblasbuf );
45 pblasbuf = NULL;
46 pbbuflen = 0;
47 }
48 return( pblasbuf );
49}
F_VOID_FUNC blacs_abort_(Int *ConTxt, Int *ErrNo)