| 1 |
|
#ifndef lint |
| 2 |
< |
static const char RCSid[] = "$Id$"; |
| 2 |
> |
static const char RCSid[] = "$Id$"; |
| 3 |
|
#endif |
| 4 |
|
/* |
| 5 |
|
* Save unshared strings. |
| 11 |
|
|
| 12 |
|
#include <stdlib.h> |
| 13 |
|
|
| 14 |
< |
extern void eputs(); |
| 15 |
< |
extern void quit(); |
| 14 |
> |
#include "rterror.h" |
| 15 |
|
|
| 16 |
+ |
|
| 17 |
|
#if 1 |
| 18 |
|
|
| 19 |
|
char * |
| 30 |
|
eputs("out of memory in savqstr"); |
| 31 |
|
quit(1); |
| 32 |
|
} |
| 33 |
< |
for (cp = newp; *cp++ = *s++; ) /* inline strcpy() */ |
| 33 |
> |
for (cp = newp; (*cp++ = *s++); ) /* inline strcpy() */ |
| 34 |
|
; |
| 35 |
|
return(newp); /* return new location */ |
| 36 |
|
} |
| 40 |
|
freeqstr(s) /* free a private string */ |
| 41 |
|
char *s; |
| 42 |
|
{ |
| 43 |
< |
free((void *)s); |
| 43 |
> |
if (s != NULL) |
| 44 |
> |
free((void *)s); |
| 45 |
|
} |
| 46 |
|
|
| 47 |
|
#else |
| 51 |
|
* large blocks to optimize paging in VM environments. |
| 52 |
|
*/ |
| 53 |
|
|
| 54 |
< |
#ifdef BIGMEM |
| 54 |
> |
#ifdef SMLMEM |
| 55 |
|
#ifndef MINBLOCK |
| 56 |
< |
#define MINBLOCK (1<<12) /* minimum allocation block size */ |
| 56 |
> |
#define MINBLOCK (1<<10) /* minimum allocation block size */ |
| 57 |
|
#endif |
| 58 |
|
#ifndef MAXBLOCK |
| 59 |
< |
#define MAXBLOCK (1<<16) /* maximum allocation block size */ |
| 59 |
> |
#define MAXBLOCK (1<<14) /* maximum allocation block size */ |
| 60 |
|
#endif |
| 61 |
|
#else |
| 62 |
|
#ifndef MINBLOCK |
| 63 |
< |
#define MINBLOCK (1<<10) /* minimum allocation block size */ |
| 63 |
> |
#define MINBLOCK (1<<12) /* minimum allocation block size */ |
| 64 |
|
#endif |
| 65 |
|
#ifndef MAXBLOCK |
| 66 |
< |
#define MAXBLOCK (1<<14) /* maximum allocation block size */ |
| 66 |
> |
#define MAXBLOCK (1<<16) /* maximum allocation block size */ |
| 67 |
|
#endif |
| 68 |
|
#endif |
| 69 |
|
|