Lines Matching refs:p
139 int test_mlock_within_limit(char *p, int alloc_size) in test_mlock_within_limit() argument
167 ret = mlock(p + start_offset, lock_size); in test_mlock_within_limit()
169 ret = mlock2_(p + start_offset, lock_size, in test_mlock_within_limit()
175 p, alloc_size, in test_mlock_within_limit()
176 p + start_offset, lock_size); in test_mlock_within_limit()
185 page_size = get_proc_page_size((unsigned long)p); in test_mlock_within_limit()
216 int test_mlock_outof_limit(char *p, int alloc_size) in test_mlock_outof_limit() argument
239 ret = mlock(p + start_offset, lock_size); in test_mlock_outof_limit()
241 ret = mlock2_(p + start_offset, lock_size, in test_mlock_outof_limit()
246 p, alloc_size, in test_mlock_outof_limit()
247 p + start_offset, lock_size); in test_mlock_outof_limit()
265 char *p = NULL; in main() local
271 p = malloc(MLOCK_WITHIN_LIMIT_SIZE); in main()
272 if (p == NULL) { in main()
276 ret = test_mlock_within_limit(p, MLOCK_WITHIN_LIMIT_SIZE); in main()
279 munlock(p, MLOCK_WITHIN_LIMIT_SIZE); in main()
280 free(p); in main()
283 p = malloc(MLOCK_OUTOF_LIMIT_SIZE); in main()
284 if (p == NULL) { in main()
288 ret = test_mlock_outof_limit(p, MLOCK_OUTOF_LIMIT_SIZE); in main()
291 munlock(p, MLOCK_OUTOF_LIMIT_SIZE); in main()
292 free(p); in main()