Lines Matching refs:addr1
146 void* addr1 = mmap(0, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
147 printf("%p (%s)\n", addr1, addr1==(void*)-1 ? "failed" : "OK"); fflush(stdout);
149 printf("touching %p...\n", addr1); fflush(stdout);
150 memset(addr1, 0x55, size);
153 madvise(addr1, size, MADV_DONTNEED);
155 printf("reading back %p...\n", addr1); fflush(stdout);
156 if (*(long*)addr1 == 0) {
158 } else if (*(long*)addr1 == 0x55555555) {
174 printf("touching %p...\n", addr1); fflush(stdout);
175 memset(addr1, 0x55, size);
177 printf("unmap %p ...\n", addr1); fflush(stdout);
178 munmap(addr1, size);