Home | History | Annotate | Download | only in python

Lines Matching defs:amount

12 static void generate_leak(const char *kind, int amount) {
16 printf("leaking via malloc, %p\n", malloc(amount));
21 printf("leaking via calloc, %p\n", calloc(amount, 1));
26 printf("leaking via realloc, %p\n", realloc(malloc(10), amount));
31 posix_memalign(&ptr, 512, amount);
37 printf("leaking via valloc, %p\n", valloc(amount));
42 printf("leaking via memalign, %p\n", memalign(512, amount));
47 printf("leaking via pvalloc, %p\n", pvalloc(amount));
52 printf("leaking via aligned_alloc, %p\n", aligned_alloc(512, amount));
57 void *ptr = malloc(amount);
68 printf("usage: leak-userspace <kind-of-leak> [amount]\n");
74 int amount = 30;
76 amount = atoi(argv[2]);
77 if (amount < 1)
78 amount = 1;
86 generate_leak(kind, amount);