File: test_C_10.c

package info (click to toggle)
ccmalloc 0.4.0-9
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 488 kB
  • ctags: 446
  • sloc: ansic: 4,493; sh: 523; makefile: 105; cpp: 89
file content (24 lines) | stat: -rw-r--r-- 359 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifdef __cplusplus
extern "C"
#endif
void ccmalloc_check_for_integrity();

#include <stdlib.h>

int
main()
{
  char * a = (char*) malloc(100);
  a[-5]='0';			/* this is exactly in the second
  				 * word below `a' on 32 bit machines
				 */
  ccmalloc_check_for_integrity();

  malloc(20);
  malloc(30);
  malloc(40);
  malloc(50);

  exit(0);
  return 0;
}