1 /* $Id: botch.c,v 1.9 1994/06/24 11:06:39 ceriel Exp $ */
3 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
4 * See the copyright notice in the ACK home directory, in the file "Copyright".
6 /* botch - write garbage over a chunk of memory, useful if you want
7 to check if freed memory is used inappopriately.
15 register unsigned int n;
17 while (n >= sizeof (long)) {
18 /* high-speed botch loop */
19 *(long *)ptr = 025252525252L;
20 ptr += sizeof (long), n -= sizeof (long);
22 while (n--) *ptr++ = '\252';