Annotation of OpenXM/src/kan96xx/Kan/nogc.c, Revision 1.4
1.4 ! takayama 1: /* $OpenXM: OpenXM/src/kan96xx/Kan/nogc.c,v 1.3 2001/05/04 01:06:24 takayama Exp $ */
1.1 maekawa 2: #include <stdio.h>
3: static long Total = 0;
1.4 ! takayama 4: unsigned int GC_version=0;
1.1 maekawa 5:
6: void *GC_malloc(n)
1.3 takayama 7: int n;
1.1 maekawa 8: {
9: void *p;
10: p = (void *)calloc(n,1); /* clear the memory */
11:
12: Total += n;
13: if (p == (void *)NULL) {
14: fprintf(stderr,"\nNo more memory. We have allocated %ld bytes of the memory.\n",Total);
15: return(p);
16: }
17: return(p);
18: }
19:
20: void *GC_realloc(void *p,int n) {
21: void *p;
22: p = (void *)realloc(p,n);
23:
24: Total += n;
25: if (p == (void *)NULL) {
26: fprintf(stderr,"\nNo more memory. We have allocated %ld bytes of the memory.\n",Total);
27: return(p);
28: }
29: return(p);
30: }
31:
32: GC_free(void *p) { ; }
33:
34:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>