Lines 19-31
Link Here
|
19 |
* Same as malloc, but prints error message and exits if malloc() |
19 |
* Same as malloc, but prints error message and exits if malloc() |
20 |
* returns NULL. |
20 |
* returns NULL. |
21 |
*/ |
21 |
*/ |
22 |
extern void *gmalloc(int size); |
22 |
extern void *gmalloc(size_t size); |
23 |
|
23 |
|
24 |
/* |
24 |
/* |
25 |
* Same as realloc, but prints error message and exits if realloc() |
25 |
* Same as realloc, but prints error message and exits if realloc() |
26 |
* returns NULL. If <p> is NULL, calls malloc instead of realloc(). |
26 |
* returns NULL. If <p> is NULL, calls malloc instead of realloc(). |
27 |
*/ |
27 |
*/ |
28 |
extern void *grealloc(void *p, int size); |
28 |
extern void *grealloc(void *p, size_t size); |
29 |
|
29 |
|
30 |
/* |
30 |
/* |
31 |
* Same as free, but checks for and ignores NULL pointers. |
31 |
* Same as free, but checks for and ignores NULL pointers. |