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 "rtio.h" |
15 |
> |
#include "rterror.h" |
16 |
|
|
17 |
+ |
|
18 |
|
#if 1 |
19 |
|
|
20 |
|
char * |
31 |
|
eputs("out of memory in savqstr"); |
32 |
|
quit(1); |
33 |
|
} |
34 |
< |
for (cp = newp; *cp++ = *s++; ) /* inline strcpy() */ |
34 |
> |
for (cp = newp; (*cp++ = *s++); ) /* inline strcpy() */ |
35 |
|
; |
36 |
|
return(newp); /* return new location */ |
37 |
|
} |
41 |
|
freeqstr(s) /* free a private string */ |
42 |
|
char *s; |
43 |
|
{ |
44 |
< |
free((void *)s); |
44 |
> |
if (s != NULL) |
45 |
> |
free((void *)s); |
46 |
|
} |
47 |
|
|
48 |
|
#else |
52 |
|
* large blocks to optimize paging in VM environments. |
53 |
|
*/ |
54 |
|
|
55 |
< |
#ifdef BIGMEM |
55 |
> |
#ifdef SMLMEM |
56 |
|
#ifndef MINBLOCK |
57 |
< |
#define MINBLOCK (1<<12) /* minimum allocation block size */ |
57 |
> |
#define MINBLOCK (1<<10) /* minimum allocation block size */ |
58 |
|
#endif |
59 |
|
#ifndef MAXBLOCK |
60 |
< |
#define MAXBLOCK (1<<16) /* maximum allocation block size */ |
60 |
> |
#define MAXBLOCK (1<<14) /* maximum allocation block size */ |
61 |
|
#endif |
62 |
|
#else |
63 |
|
#ifndef MINBLOCK |
64 |
< |
#define MINBLOCK (1<<10) /* minimum allocation block size */ |
64 |
> |
#define MINBLOCK (1<<12) /* minimum allocation block size */ |
65 |
|
#endif |
66 |
|
#ifndef MAXBLOCK |
67 |
< |
#define MAXBLOCK (1<<14) /* maximum allocation block size */ |
67 |
> |
#define MAXBLOCK (1<<16) /* maximum allocation block size */ |
68 |
|
#endif |
69 |
|
#endif |
70 |
|
|