• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * SPDX-License-Identifier: GPL-2.0-or-later
3  *
4  * Copyright (c) 2018 Cyril Hrubis <chrubis@suse.cz>
5  */
6 
7 #ifndef SET_MEMPOLICY_H__
8 #define SET_MEMPOLICY_H__
9 
alloc_fault_count(struct tst_nodemap * nodes,const char * file,size_t size)10 static inline void alloc_fault_count(struct tst_nodemap *nodes,
11                                      const char *file, size_t size)
12 {
13 	void *ptr;
14 
15 	ptr = tst_numa_map(file, size);
16 	tst_numa_fault(ptr, size);
17 	tst_nodemap_count_pages(nodes, ptr, size);
18 	tst_numa_unmap(ptr, size);
19 }
20 
21 #endif /* SET_MEMPOLICY_H__ */
22