Home | History | Annotate | Download | only in tests

Lines Matching full:malloc

16   void *res = malloc/**/(size); break_optimization(0); return res;}
76 int *a = (int*)malloc(100 * sizeof(int));
80 int *r = (int*)malloc(10);
236 EXPECT_EQ(0, malloc(kOOMAllocationSize));
237 EXPECT_EQ(0, malloc(~Ident(0)));
243 int *a = (int*)Ident(malloc(100));
293 EXPECT_DEATH(Ident((char*)malloc(size))[-1] = 0, buff);
330 free(Ident(malloc(size)));
350 int *ptr = (int*)malloc(sizeof(int) * kMinElem);
358 // Realloc pointer returned by malloc(0).
359 int *ptr2 = Ident((int*)malloc(0));
367 void *ptr = Ident(malloc(42));
374 void *ptr = Ident(malloc(42));
375 EXPECT_DEATH(ptr = realloc((int*)ptr + 1, 77), "attempting free.*not malloc");
380 // Test that malloc(0) and similar functions don't return NULL.
381 void *ptr = Ident(malloc(0));
405 char *array = Ident((char*)malloc(kArraySize));
420 int *x = (int*)malloc(100 * sizeof(int));
428 "ERROR: AddressSanitizer: attempting free.*not malloc"
434 int *x = (int*)malloc(100 * sizeof(int));
676 char *a = Ident((char*)malloc(Ident(12)));
733 char *s = Ident((char*)malloc(size));
771 char *s = Ident((char*)malloc(size));
776 // TODO(samsonov): Add a test with malloc(0)
916 char *x = Ident((char*)malloc(8));
1115 // It doesn't work on Android, as calls to new/delete go through malloc/free.
1130 EXPECT_DEATH(delete (Ident((int*)malloc(2 * sizeof(int)))),
1131 MismatchStr("malloc vs operator delete"));
1134 EXPECT_DEATH(delete [] (Ident((int*)malloc(2 * sizeof(int)))),
1135 MismatchStr("malloc vs operator delete \\[\\]"));
1177 printf("%p\n", malloc(size));
1205 char *x = (char*)malloc(kAllocSize);