--- ray/src/common/malloc.c 2003/05/13 17:58:32 2.15 +++ ray/src/common/malloc.c 2003/06/30 14:59:11 2.16 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: malloc.c,v 2.15 2003/05/13 17:58:32 greg Exp $"; +static const char RCSid[] = "$Id: malloc.c,v 2.16 2003/06/30 14:59:11 schorsch Exp $"; #endif /* * Fast malloc for memory hogs and VM environments. @@ -22,11 +22,8 @@ static const char RCSid[] = "$Id: malloc.c,v 2.15 2003 #include "copyright.h" #include +#include -#ifndef BSD -#define bcopy(s,d,n) (void)memcpy(d,s,n) -#define bzero(d,n) (void)memset(d,0,n) -#endif #ifdef MSTATS #include @@ -182,9 +179,9 @@ unsigned *np; cptab.ptr = big->ptr; cptab.siz = big->siz; big->siz = 0; /* clear and copy */ - bcopy((char *)tab, (char *)(mtab(&cptab)+1), + memcpy((char *)(mtab(&cptab)+1), (char *)tab, tablen*sizeof(struct mblk)); - bzero((char *)(mtab(&cptab)+tablen+1), + memset((char *)(mtab(&cptab)+tablen+1), '\0', (mtablen(&cptab)-tablen-1)*sizeof(struct mblk)); } /* next round */ } @@ -384,7 +381,7 @@ unsigned n; if ((p = malloc(n)) == NULL) return(n<=on ? op : NULL); if (on) { - bcopy(op, p, n>on ? on : n); + memcpy(p, op, n>on ? on : n); free(op); } return(p);