File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ static char *rcsid = "$Id$";
5757#define DEBUG2
5858#define MSTATS
5959#define RCHECK
60+ #define VCHECK
6061
6162typedef unsigned char u_char ;
6263typedef unsigned long u_long ;
@@ -221,6 +222,9 @@ malloc(nbytes)
221222 op -> ov_size = (nbytes + RSLOP - 1 ) & ~(RSLOP - 1 );
222223 op -> ov_rmagic = RMAGIC ;
223224 * (u_short * )((caddr_t )(op + 1 ) + op -> ov_size ) = RMAGIC ;
225+ #endif
226+ #ifdef VCHECK
227+ memset ((char * )(op + 1 ), 0x41 , nbytes );
224228#endif
225229 return ((char * )(op + 1 ));
226230}
@@ -286,6 +290,9 @@ free(cp)
286290#ifdef RCHECK
287291 ASSERT (op -> ov_rmagic == RMAGIC );
288292 ASSERT (* (u_short * )((caddr_t )(op + 1 ) + op -> ov_size ) == RMAGIC );
293+ #endif
294+ #ifdef VCHECK
295+ memset (cp , 43 , op -> ov_size );
289296#endif
290297 size = op -> ov_index ;
291298 if ( size == 0xff ) {
You can’t perform that action at this time.
0 commit comments