Lines Matching refs:r
52 void *r; in main() local
57 r = malloc(0); in main()
58 printf("malloc(0): %p\n", r); in main()
60 printf("malloc(0) failed: %s. got %p\n", strerror(errno), r); in main()
63 free(r); in main()
65 r = memalign(128, 237); in main()
66 printf("memalign(128, 237): %p\n", r); in main()
67 if ((uintptr_t) r & 127) { in main()
68 printf("memalign(128, 237) unaligned (%p)\n", r); in main()
71 free(r); in main()
74 r = malloc(PTRDIFF_MAX); in main()
75 printf("malloc(PTRDIFF_MAX): %p\n", r); in main()
76 if (r || errno != ENOMEM) { in main()
77 … printf("malloc(PTRDIFF_MAX) should have failed. got %p error %s\n", r, strerror(errno)); in main()
82 r = malloc(SIZE_MAX); in main()
83 printf("malloc(SIZE_MAX): %p\n", r); in main()
84 if (r || errno != ENOMEM) { in main()
85 printf("malloc(SIZE_MAX) should have failed. got %p error %s\n", r, strerror(errno)); in main()
90 r = calloc(1, SIZE_MAX); in main()
91 printf("calloc(1, SIZE_MAX): %p\n", r); in main()
92 if (r || errno != ENOMEM) { in main()
93 printf("calloc(1, SIZE_MAX) should have failed. got %p error %s\n", r, strerror(errno)); in main()
98 r = reallocarray(NULL, 1, SIZE_MAX); in main()
99 printf("reallocarray(NULL, 1, SIZE_MAX): %p\n", r); in main()
100 if (r || errno != ENOMEM) { in main()
101 …printf("reallocarray(NULL, 1, SIZE_MAX) should have failed. got %p error %s\n", r, strerror(errno)… in main()
107 r = calloc(SIZE_MAX >> pow, SIZE_MAX >> pow); in main()
108 printf("calloc(SIZE_MAX >> %d, SIZE_MAX >> %d): %p\n", pow, pow, r); in main()
109 if (r || errno != ENOMEM) { in main()
110 …E_MAX >> %d, SIZE_MAX >> %d) should have failed. got %p error %s\n", pow, pow, r, strerror(errno)); in main()
113 r = reallocarray(NULL, SIZE_MAX >> pow, SIZE_MAX >> pow); in main()
114 printf("reallocarray(SIZE_MAX >> %d, SIZE_MAX >> %d): %p\n", pow, pow, r); in main()
115 if (r || errno != ENOMEM) { in main()
116 …E_MAX >> %d, SIZE_MAX >> %d) should have failed. got %p error %s\n", pow, pow, r, strerror(errno)); in main()