File: a00081.html

package info (click to toggle)
hwloc-contrib 1.10.0-1
  • links: PTS, VCS
  • area: contrib
  • in suites: jessie, jessie-kfreebsd
  • size: 15,604 kB
  • ctags: 6,628
  • sloc: ansic: 34,014; sh: 12,810; xml: 8,466; makefile: 1,614; sed: 9; php: 8
file content (1101 lines) | stat: -rw-r--r-- 80,517 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>Hardware Locality (hwloc): Memory binding</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Hardware Locality (hwloc)
   &#160;<span id="projectnumber">1.10.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.8 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Memory binding</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:gac9764f79505775d06407b40f5e4661e8"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a> { <br />
&#160;&#160;<a class="el" href="a00081.html#ggac9764f79505775d06407b40f5e4661e8a18675bb80ebc1bce5b652e9de8f3998c">HWLOC_MEMBIND_DEFAULT</a>, 
<a class="el" href="a00081.html#ggac9764f79505775d06407b40f5e4661e8a979c7aa78dd32780858f30f47a72cca0">HWLOC_MEMBIND_FIRSTTOUCH</a>, 
<a class="el" href="a00081.html#ggac9764f79505775d06407b40f5e4661e8ad811fa4b2a6002c4d63695a408ffde2c">HWLOC_MEMBIND_BIND</a>, 
<a class="el" href="a00081.html#ggac9764f79505775d06407b40f5e4661e8ae370075e5af016d42310f87ea5af236b">HWLOC_MEMBIND_INTERLEAVE</a>, 
<br />
&#160;&#160;<a class="el" href="a00081.html#ggac9764f79505775d06407b40f5e4661e8afb37480fe5f4236eb7dd4aef26f691e9">HWLOC_MEMBIND_REPLICATE</a>, 
<a class="el" href="a00081.html#ggac9764f79505775d06407b40f5e4661e8aecdd4164d647708fbb51a00d98dbb138">HWLOC_MEMBIND_NEXTTOUCH</a>, 
<a class="el" href="a00081.html#ggac9764f79505775d06407b40f5e4661e8a3185bd869b67817fb2bd5164bf360402">HWLOC_MEMBIND_MIXED</a>
<br />
 }</td></tr>
<tr class="separator:gac9764f79505775d06407b40f5e4661e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab00475fd98815bf4fb9aaf752030e7d2"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#gab00475fd98815bf4fb9aaf752030e7d2">hwloc_membind_flags_t</a> { <br />
&#160;&#160;<a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a1b1b74aef138f64aff214a8cbdfe8eb4">HWLOC_MEMBIND_PROCESS</a>, 
<a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a1dc7dd5cdcd5796893a325a524555298">HWLOC_MEMBIND_THREAD</a>, 
<a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a0335311a0ee04166df2888d52b4a42c6">HWLOC_MEMBIND_STRICT</a>, 
<a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2aa6e49e54f52827cb143cc869cfd748af">HWLOC_MEMBIND_MIGRATE</a>, 
<br />
&#160;&#160;<a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2aad6b9eaf2ee324ca58dc8f58094b9997">HWLOC_MEMBIND_NOCPUBIND</a>
<br />
 }</td></tr>
<tr class="separator:gab00475fd98815bf4fb9aaf752030e7d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga5cac0bcbe770b43fc63a6b00ea4a7a9d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#ga5cac0bcbe770b43fc63a6b00ea4a7a9d">hwloc_set_membind_nodeset</a> (<a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00073.html#ga2f5276235841ad66a79bedad16a5a10c">hwloc_const_nodeset_t</a> nodeset, <a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a> policy, int flags)</td></tr>
<tr class="separator:ga5cac0bcbe770b43fc63a6b00ea4a7a9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga53a493e13ad8e5f924b50c07713ee5df"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#ga53a493e13ad8e5f924b50c07713ee5df">hwloc_set_membind</a> (<a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00073.html#ga1f784433e9b606261f62d1134f6a3b25">hwloc_const_cpuset_t</a> cpuset, <a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a> policy, int flags)</td></tr>
<tr class="separator:ga53a493e13ad8e5f924b50c07713ee5df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga84ee275e84286d17a5853c52272a6a95"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#ga84ee275e84286d17a5853c52272a6a95">hwloc_get_membind_nodeset</a> (<a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00073.html#ga37e35730fa7e775b5bb0afe893d6d508">hwloc_nodeset_t</a> nodeset, <a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a> *policy, int flags)</td></tr>
<tr class="separator:ga84ee275e84286d17a5853c52272a6a95"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabf567d2e3b956591a43de0c1941943b0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#gabf567d2e3b956591a43de0c1941943b0">hwloc_get_membind</a> (<a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00073.html#ga4bbf39b68b6f568fb92739e7c0ea7801">hwloc_cpuset_t</a> cpuset, <a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a> *policy, int flags)</td></tr>
<tr class="separator:gabf567d2e3b956591a43de0c1941943b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga21b042d94266a26a9c82b98c4bb30d01"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#ga21b042d94266a26a9c82b98c4bb30d01">hwloc_set_proc_membind_nodeset</a> (<a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, hwloc_pid_t pid, <a class="el" href="a00073.html#ga2f5276235841ad66a79bedad16a5a10c">hwloc_const_nodeset_t</a> nodeset, <a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a> policy, int flags)</td></tr>
<tr class="separator:ga21b042d94266a26a9c82b98c4bb30d01"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga94b91473febe49fc7af09a0f4a72e53a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#ga94b91473febe49fc7af09a0f4a72e53a">hwloc_set_proc_membind</a> (<a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, hwloc_pid_t pid, <a class="el" href="a00073.html#ga1f784433e9b606261f62d1134f6a3b25">hwloc_const_cpuset_t</a> cpuset, <a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a> policy, int flags)</td></tr>
<tr class="separator:ga94b91473febe49fc7af09a0f4a72e53a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac5075b7a2bf55f48f4622351817addad"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#gac5075b7a2bf55f48f4622351817addad">hwloc_get_proc_membind_nodeset</a> (<a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, hwloc_pid_t pid, <a class="el" href="a00073.html#ga37e35730fa7e775b5bb0afe893d6d508">hwloc_nodeset_t</a> nodeset, <a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a> *policy, int flags)</td></tr>
<tr class="separator:gac5075b7a2bf55f48f4622351817addad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gada7b3bb7f278542dbb38dc3d6f527c29"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#gada7b3bb7f278542dbb38dc3d6f527c29">hwloc_get_proc_membind</a> (<a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, hwloc_pid_t pid, <a class="el" href="a00073.html#ga4bbf39b68b6f568fb92739e7c0ea7801">hwloc_cpuset_t</a> cpuset, <a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a> *policy, int flags)</td></tr>
<tr class="separator:gada7b3bb7f278542dbb38dc3d6f527c29"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7f11bd709ac0cb93af613e2dd84165ad"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#ga7f11bd709ac0cb93af613e2dd84165ad">hwloc_set_area_membind_nodeset</a> (<a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, const void *addr, size_t len, <a class="el" href="a00073.html#ga2f5276235841ad66a79bedad16a5a10c">hwloc_const_nodeset_t</a> nodeset, <a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a> policy, int flags)</td></tr>
<tr class="separator:ga7f11bd709ac0cb93af613e2dd84165ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga93d2698ae5d7330be5e9f8ece6bc9b2c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#ga93d2698ae5d7330be5e9f8ece6bc9b2c">hwloc_set_area_membind</a> (<a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, const void *addr, size_t len, <a class="el" href="a00073.html#ga1f784433e9b606261f62d1134f6a3b25">hwloc_const_cpuset_t</a> cpuset, <a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a> policy, int flags)</td></tr>
<tr class="separator:ga93d2698ae5d7330be5e9f8ece6bc9b2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5b674a9e043814bfd1c927fd0137fb19"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#ga5b674a9e043814bfd1c927fd0137fb19">hwloc_get_area_membind_nodeset</a> (<a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, const void *addr, size_t len, <a class="el" href="a00073.html#ga37e35730fa7e775b5bb0afe893d6d508">hwloc_nodeset_t</a> nodeset, <a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a> *policy, int flags)</td></tr>
<tr class="separator:ga5b674a9e043814bfd1c927fd0137fb19"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf75f365807447cfdc73e4e04e3469d84"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#gaf75f365807447cfdc73e4e04e3469d84">hwloc_get_area_membind</a> (<a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, const void *addr, size_t len, <a class="el" href="a00073.html#ga4bbf39b68b6f568fb92739e7c0ea7801">hwloc_cpuset_t</a> cpuset, <a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a> *policy, int flags)</td></tr>
<tr class="separator:gaf75f365807447cfdc73e4e04e3469d84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga972b335a86a7d5e7b34bce2b243c41bc"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#ga972b335a86a7d5e7b34bce2b243c41bc">hwloc_alloc</a> (<a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, size_t len)</td></tr>
<tr class="separator:ga972b335a86a7d5e7b34bce2b243c41bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0ff3076f7f3633637699b809bcceceb1"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#ga0ff3076f7f3633637699b809bcceceb1">hwloc_alloc_membind_nodeset</a> (<a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, size_t len, <a class="el" href="a00073.html#ga2f5276235841ad66a79bedad16a5a10c">hwloc_const_nodeset_t</a> nodeset, <a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a> policy, int flags)</td></tr>
<tr class="separator:ga0ff3076f7f3633637699b809bcceceb1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1058b0b9216bc6fd9c3734ea9dca1e54"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#ga1058b0b9216bc6fd9c3734ea9dca1e54">hwloc_alloc_membind</a> (<a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, size_t len, <a class="el" href="a00073.html#ga1f784433e9b606261f62d1134f6a3b25">hwloc_const_cpuset_t</a> cpuset, <a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a> policy, int flags)</td></tr>
<tr class="separator:ga1058b0b9216bc6fd9c3734ea9dca1e54"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7d473e80f11d774421688e36e9926136"><td class="memItemLeft" align="right" valign="top">static void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#ga7d473e80f11d774421688e36e9926136">hwloc_alloc_membind_policy_nodeset</a> (<a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, size_t len, <a class="el" href="a00073.html#ga2f5276235841ad66a79bedad16a5a10c">hwloc_const_nodeset_t</a> nodeset, <a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a> policy, int flags)</td></tr>
<tr class="separator:ga7d473e80f11d774421688e36e9926136"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4f7240065719cf923eb0cc078afcdcc2"><td class="memItemLeft" align="right" valign="top">static void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#ga4f7240065719cf923eb0cc078afcdcc2">hwloc_alloc_membind_policy</a> (<a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, size_t len, <a class="el" href="a00073.html#ga1f784433e9b606261f62d1134f6a3b25">hwloc_const_cpuset_t</a> set, <a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a> policy, int flags)</td></tr>
<tr class="separator:ga4f7240065719cf923eb0cc078afcdcc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga32dbd4f54e9e4a7179f2dde37ffe6ad7"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00081.html#ga32dbd4f54e9e4a7179f2dde37ffe6ad7">hwloc_free</a> (<a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, void *addr, size_t len)</td></tr>
<tr class="separator:ga32dbd4f54e9e4a7179f2dde37ffe6ad7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Memory binding can be done three ways:</p>
<ul>
<li>explicit memory allocation thanks to <a class="el" href="a00081.html#ga1058b0b9216bc6fd9c3734ea9dca1e54" title="Allocate some memory on memory nodes near the given physical cpuset cpuset. ">hwloc_alloc_membind()</a> and friends: the binding will have effect on the memory allocated by these functions.</li>
<li>implicit memory binding through binding policy: <a class="el" href="a00081.html#ga53a493e13ad8e5f924b50c07713ee5df" title="Set the default memory binding policy of the current process or thread to prefer the NUMA node(s) nea...">hwloc_set_membind()</a> and friends only define the current policy of the process, which will be applied to the subsequent calls to malloc() and friends.</li>
<li>migration of existing memory ranges, thanks to <a class="el" href="a00081.html#ga93d2698ae5d7330be5e9f8ece6bc9b2c" title="Bind the already-allocated memory identified by (addr, len) to the NUMA node(s) near physical cpuset...">hwloc_set_area_membind()</a> and friends, which move already-allocated data.</li>
</ul>
<p>Not all operating systems support all three ways. <a class="el" href="a00077.html#gab8c76173c4a8ce1a9a9366012b1388e6" title="Retrieve the topology support. ">hwloc_topology_get_support()</a> may be used to query about the actual memory binding support in the currently used operating system.</p>
<p>When the requested binding operation is not available and the <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a0335311a0ee04166df2888d52b4a42c6">HWLOC_MEMBIND_STRICT</a> flag was passed, the function returns -1. <code>errno</code> will be set to <code>ENOSYS</code> when the system does support the specified action or policy (e.g., some systems only allow binding memory on a per-thread basis, whereas other systems only allow binding memory for all threads in a process). <code>errno</code> will be set to EXDEV when the requested cpuset can not be enforced (e.g., some systems only allow binding memory to a single NUMA node).</p>
<p>If <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a0335311a0ee04166df2888d52b4a42c6">HWLOC_MEMBIND_STRICT</a> was not passed, the function may fail as well, or the operating system may use a slightly different operation (with side-effects, smaller binding set, etc.) when the requested operation is not exactly supported.</p>
<p>The most portable form that should be preferred over the others whenever possible is as follows. It allocates some memory hopefully bound to the specified set. To do so, hwloc will possibly have to change the current memory binding policy in order to actually get the memory bound, if the OS does not provide any other way to simply allocate bound memory without changing the policy for all allocations. That is the difference with <a class="el" href="a00081.html#ga1058b0b9216bc6fd9c3734ea9dca1e54" title="Allocate some memory on memory nodes near the given physical cpuset cpuset. ">hwloc_alloc_membind()</a>, which will never change the current memory binding policy.</p>
<div class="fragment"><div class="line"><a class="code" href="a00081.html#ga4f7240065719cf923eb0cc078afcdcc2">hwloc_alloc_membind_policy</a>(topology, size, set,</div>
<div class="line">                           <a class="code" href="a00081.html#ggac9764f79505775d06407b40f5e4661e8a18675bb80ebc1bce5b652e9de8f3998c">HWLOC_MEMBIND_DEFAULT</a>, 0);</div>
</div><!-- fragment --><p>Each hwloc memory binding function is available in two forms: one that takes a CPU set argument and another that takes a NUMA memory node set argument (see <a class="el" href="a00073.html">Object Sets (hwloc_cpuset_t and hwloc_nodeset_t)</a> and <a class="el" href="a00096.html">The bitmap API</a> for a discussion of CPU sets and NUMA memory node sets). The names of the latter form end with _nodeset. It is also possible to convert between CPU set and node set using <a class="el" href="a00093.html#ga8fbd641f284673a3e884e8e556044eba" title="Convert a CPU set into a NUMA node set and handle non-NUMA cases. ">hwloc_cpuset_to_nodeset()</a> or <a class="el" href="a00093.html#ga2ed57313ce5bf85f3ac156932ecf639d" title="Convert a NUMA node set into a CPU set and handle non-NUMA cases. ">hwloc_cpuset_from_nodeset()</a>.</p>
<dl class="section see"><dt>See also</dt><dd>Some example codes are available under doc/examples/ in the source tree.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>On some operating systems, memory binding affects the CPU binding; see <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2aad6b9eaf2ee324ca58dc8f58094b9997" title="Avoid any effect on CPU binding. ">HWLOC_MEMBIND_NOCPUBIND</a> </dd></dl>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="gab00475fd98815bf4fb9aaf752030e7d2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="a00081.html#gab00475fd98815bf4fb9aaf752030e7d2">hwloc_membind_flags_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Memory binding flags. </p>
<p>These flags can be used to refine the binding policy. All flags can be logically OR'ed together with the exception of <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a1b1b74aef138f64aff214a8cbdfe8eb4" title="Set policy for all threads of the specified (possibly multithreaded) process. This flag is mutually e...">HWLOC_MEMBIND_PROCESS</a> and <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a1dc7dd5cdcd5796893a325a524555298" title="Set policy for a specific thread of the current process. This flag is mutually exclusive with HWLOC_M...">HWLOC_MEMBIND_THREAD</a>; these two flags are mutually exclusive.</p>
<p>Not all systems support all kinds of binding. <a class="el" href="a00077.html#gab8c76173c4a8ce1a9a9366012b1388e6" title="Retrieve the topology support. ">hwloc_topology_get_support()</a> may be used to query about the actual memory binding support in the currently used operating system. See the "Detailed Description" section of <a class="el" href="a00081.html">Memory binding</a> for a description of errors that can occur. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="ggab00475fd98815bf4fb9aaf752030e7d2a1b1b74aef138f64aff214a8cbdfe8eb4"></a>HWLOC_MEMBIND_PROCESS&#160;</td><td class="fielddoc">
<p>Set policy for all threads of the specified (possibly multithreaded) process. This flag is mutually exclusive with <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a1dc7dd5cdcd5796893a325a524555298" title="Set policy for a specific thread of the current process. This flag is mutually exclusive with HWLOC_M...">HWLOC_MEMBIND_THREAD</a>. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggab00475fd98815bf4fb9aaf752030e7d2a1dc7dd5cdcd5796893a325a524555298"></a>HWLOC_MEMBIND_THREAD&#160;</td><td class="fielddoc">
<p>Set policy for a specific thread of the current process. This flag is mutually exclusive with <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a1b1b74aef138f64aff214a8cbdfe8eb4" title="Set policy for all threads of the specified (possibly multithreaded) process. This flag is mutually e...">HWLOC_MEMBIND_PROCESS</a>. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggab00475fd98815bf4fb9aaf752030e7d2a0335311a0ee04166df2888d52b4a42c6"></a>HWLOC_MEMBIND_STRICT&#160;</td><td class="fielddoc">
<p>Request strict binding from the OS. The function will fail if the binding can not be guaranteed / completely enforced.</p>
<p>This flag has slightly different meanings depending on which function it is used with. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggab00475fd98815bf4fb9aaf752030e7d2aa6e49e54f52827cb143cc869cfd748af"></a>HWLOC_MEMBIND_MIGRATE&#160;</td><td class="fielddoc">
<p>Migrate existing allocated memory. If the memory cannot be migrated and the <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a0335311a0ee04166df2888d52b4a42c6">HWLOC_MEMBIND_STRICT</a> flag is passed, an error will be returned. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggab00475fd98815bf4fb9aaf752030e7d2aad6b9eaf2ee324ca58dc8f58094b9997"></a>HWLOC_MEMBIND_NOCPUBIND&#160;</td><td class="fielddoc">
<p>Avoid any effect on CPU binding. </p>
<p>On some operating systems, some underlying memory binding functions also bind the application to the corresponding CPU(s). Using this flag will cause hwloc to avoid using OS functions that could potentially affect CPU bindings. Note, however, that using NOCPUBIND may reduce hwloc's overall memory binding support. Specifically: some of hwloc's memory binding functions may fail with errno set to ENOSYS when used with NOCPUBIND. </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="gac9764f79505775d06407b40f5e4661e8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Memory binding policy. </p>
<p>These constants can be used to choose the binding policy. Only one policy can be used at a time (i.e., the values cannot be OR'ed together).</p>
<p>Not all systems support all kinds of binding. <a class="el" href="a00077.html#gab8c76173c4a8ce1a9a9366012b1388e6" title="Retrieve the topology support. ">hwloc_topology_get_support()</a> may be used to query about the actual memory binding policy support in the currently used operating system. See the "Detailed Description" section of <a class="el" href="a00081.html">Memory binding</a> for a description of errors that can occur. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="ggac9764f79505775d06407b40f5e4661e8a18675bb80ebc1bce5b652e9de8f3998c"></a>HWLOC_MEMBIND_DEFAULT&#160;</td><td class="fielddoc">
<p>Reset the memory allocation policy to the system default. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggac9764f79505775d06407b40f5e4661e8a979c7aa78dd32780858f30f47a72cca0"></a>HWLOC_MEMBIND_FIRSTTOUCH&#160;</td><td class="fielddoc">
<p>Allocate memory but do not immediately bind it to a specific locality. Instead, each page in the allocation is bound only when it is first touched. Pages are individually bound to the local NUMA node of the first thread that touches it. If there is not enough memory on the node, allocation may be done in the specified cpuset before allocating on other nodes. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggac9764f79505775d06407b40f5e4661e8ad811fa4b2a6002c4d63695a408ffde2c"></a>HWLOC_MEMBIND_BIND&#160;</td><td class="fielddoc">
<p>Allocate memory on the specified nodes. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggac9764f79505775d06407b40f5e4661e8ae370075e5af016d42310f87ea5af236b"></a>HWLOC_MEMBIND_INTERLEAVE&#160;</td><td class="fielddoc">
<p>Allocate memory on the given nodes in an interleaved / round-robin manner. The precise layout of the memory across multiple NUMA nodes is OS/system specific. Interleaving can be useful when threads distributed across the specified NUMA nodes will all be accessing the whole memory range concurrently, since the interleave will then balance the memory references. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggac9764f79505775d06407b40f5e4661e8afb37480fe5f4236eb7dd4aef26f691e9"></a>HWLOC_MEMBIND_REPLICATE&#160;</td><td class="fielddoc">
<p>Replicate memory on the given nodes; reads from this memory will attempt to be serviced from the NUMA node local to the reading thread. Replicating can be useful when multiple threads from the specified NUMA nodes will be sharing the same read-only data. </p>
<p>This policy can only be used with existing memory allocations (i.e., the hwloc_set_*membind*() functions); it cannot be used with functions that allocate new memory (i.e., the hwloc_alloc*() functions). </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggac9764f79505775d06407b40f5e4661e8aecdd4164d647708fbb51a00d98dbb138"></a>HWLOC_MEMBIND_NEXTTOUCH&#160;</td><td class="fielddoc">
<p>For each page bound with this policy, by next time it is touched (and next time only), it is moved from its current location to the local NUMA node of the thread where the memory reference occurred (if it needs to be moved at all). </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggac9764f79505775d06407b40f5e4661e8a3185bd869b67817fb2bd5164bf360402"></a>HWLOC_MEMBIND_MIXED&#160;</td><td class="fielddoc">
<p>Returned by get_membind() functions when multiple threads or parts of a memory area have differing memory binding policies. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga972b335a86a7d5e7b34bce2b243c41bc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* hwloc_alloc </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&#160;</td>
          <td class="paramname"><em>topology</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Allocate some memory. </p>
<p>This is equivalent to malloc(), except that it tries to allocate page-aligned memory from the OS.</p>
<dl class="section note"><dt>Note</dt><dd>The allocated memory should be freed with <a class="el" href="a00081.html#ga32dbd4f54e9e4a7179f2dde37ffe6ad7" title="Free memory that was previously allocated by hwloc_alloc() or hwloc_alloc_membind(). ">hwloc_free()</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="ga1058b0b9216bc6fd9c3734ea9dca1e54"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* hwloc_alloc_membind </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&#160;</td>
          <td class="paramname"><em>topology</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00073.html#ga1f784433e9b606261f62d1134f6a3b25">hwloc_const_cpuset_t</a>&#160;</td>
          <td class="paramname"><em>cpuset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a>&#160;</td>
          <td class="paramname"><em>policy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Allocate some memory on memory nodes near the given physical cpuset <code>cpuset</code>. </p>
<dl class="section return"><dt>Returns</dt><dd>NULL with errno set to ENOSYS if the action is not supported and <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a0335311a0ee04166df2888d52b4a42c6">HWLOC_MEMBIND_STRICT</a> is given </dd>
<dd>
NULL with errno set to EXDEV if the binding cannot be enforced and <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a0335311a0ee04166df2888d52b4a42c6">HWLOC_MEMBIND_STRICT</a> is given </dd>
<dd>
NULL with errno set to ENOMEM if the memory allocation failed even before trying to bind.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The allocated memory should be freed with <a class="el" href="a00081.html#ga32dbd4f54e9e4a7179f2dde37ffe6ad7" title="Free memory that was previously allocated by hwloc_alloc() or hwloc_alloc_membind(). ">hwloc_free()</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="ga0ff3076f7f3633637699b809bcceceb1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* hwloc_alloc_membind_nodeset </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&#160;</td>
          <td class="paramname"><em>topology</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00073.html#ga2f5276235841ad66a79bedad16a5a10c">hwloc_const_nodeset_t</a>&#160;</td>
          <td class="paramname"><em>nodeset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a>&#160;</td>
          <td class="paramname"><em>policy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Allocate some memory on the given physical nodeset <code>nodeset</code>. </p>
<dl class="section return"><dt>Returns</dt><dd>NULL with errno set to ENOSYS if the action is not supported and <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a0335311a0ee04166df2888d52b4a42c6">HWLOC_MEMBIND_STRICT</a> is given </dd>
<dd>
NULL with errno set to EXDEV if the binding cannot be enforced and <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a0335311a0ee04166df2888d52b4a42c6">HWLOC_MEMBIND_STRICT</a> is given </dd>
<dd>
NULL with errno set to ENOMEM if the memory allocation failed even before trying to bind.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The allocated memory should be freed with <a class="el" href="a00081.html#ga32dbd4f54e9e4a7179f2dde37ffe6ad7" title="Free memory that was previously allocated by hwloc_alloc() or hwloc_alloc_membind(). ">hwloc_free()</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="ga4f7240065719cf923eb0cc078afcdcc2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void* hwloc_alloc_membind_policy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&#160;</td>
          <td class="paramname"><em>topology</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00073.html#ga1f784433e9b606261f62d1134f6a3b25">hwloc_const_cpuset_t</a>&#160;</td>
          <td class="paramname"><em>set</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a>&#160;</td>
          <td class="paramname"><em>policy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Allocate some memory on the memory nodes near given cpuset <code>cpuset</code>. </p>
<p>This is similar to hwloc_alloc_membind_policy_nodeset, but for a given cpuset. </p>

</div>
</div>
<a class="anchor" id="ga7d473e80f11d774421688e36e9926136"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void* hwloc_alloc_membind_policy_nodeset </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&#160;</td>
          <td class="paramname"><em>topology</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00073.html#ga2f5276235841ad66a79bedad16a5a10c">hwloc_const_nodeset_t</a>&#160;</td>
          <td class="paramname"><em>nodeset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a>&#160;</td>
          <td class="paramname"><em>policy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Allocate some memory on the given nodeset <code>nodeset</code>. </p>
<p>This is similar to hwloc_alloc_membind except that it is allowed to change the current memory binding policy, thus providing more binding support, at the expense of changing the current state. </p>

</div>
</div>
<a class="anchor" id="ga32dbd4f54e9e4a7179f2dde37ffe6ad7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int hwloc_free </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&#160;</td>
          <td class="paramname"><em>topology</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Free memory that was previously allocated by <a class="el" href="a00081.html#ga972b335a86a7d5e7b34bce2b243c41bc" title="Allocate some memory. ">hwloc_alloc()</a> or <a class="el" href="a00081.html#ga1058b0b9216bc6fd9c3734ea9dca1e54" title="Allocate some memory on memory nodes near the given physical cpuset cpuset. ">hwloc_alloc_membind()</a>. </p>

</div>
</div>
<a class="anchor" id="gaf75f365807447cfdc73e4e04e3469d84"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int hwloc_get_area_membind </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&#160;</td>
          <td class="paramname"><em>topology</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00073.html#ga4bbf39b68b6f568fb92739e7c0ea7801">hwloc_cpuset_t</a>&#160;</td>
          <td class="paramname"><em>cpuset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a> *&#160;</td>
          <td class="paramname"><em>policy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Query the CPUs near the physical NUMA node(s) and binding policy of the memory identified by (<code>addr</code>, <code>len</code> ). </p>
<p>This function has two output parameters: <code>cpuset</code> and <code>policy</code>. The values returned in these parameters depend on both the <code>flags</code> passed in and the memory binding policies and nodesets of the pages in the address range.</p>
<p>If <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a0335311a0ee04166df2888d52b4a42c6">HWLOC_MEMBIND_STRICT</a> is specified, the target pages are first checked to see if they all have the same memory binding policy and nodeset. If they do not, -1 is returned and errno is set to EXDEV. If they are identical across all pages, the policy is returned in <code>policy</code>. <code>cpuset</code> is set to the union of CPUs near the NUMA node(s) in the nodeset.</p>
<p>If <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a0335311a0ee04166df2888d52b4a42c6">HWLOC_MEMBIND_STRICT</a> is not specified, the union of all NUMA node(s) containing pages in the address range is calculated. <code>cpuset</code> is then set to the CPUs near the NUMA node(s) in this union. If all pages in the target have the same policy, it is returned in <code>policy</code>. Otherwise, <code>policy</code> is set to <a class="el" href="a00081.html#ggac9764f79505775d06407b40f5e4661e8a3185bd869b67817fb2bd5164bf360402" title="Returned by get_membind() functions when multiple threads or parts of a memory area have differing me...">HWLOC_MEMBIND_MIXED</a>.</p>
<p>If any other flags are specified, -1 is returned and errno is set to EINVAL. </p>

</div>
</div>
<a class="anchor" id="ga5b674a9e043814bfd1c927fd0137fb19"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int hwloc_get_area_membind_nodeset </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&#160;</td>
          <td class="paramname"><em>topology</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00073.html#ga37e35730fa7e775b5bb0afe893d6d508">hwloc_nodeset_t</a>&#160;</td>
          <td class="paramname"><em>nodeset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a> *&#160;</td>
          <td class="paramname"><em>policy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Query the physical NUMA node(s) and binding policy of the memory identified by (<code>addr</code>, <code>len</code> ). </p>
<p>This function has two output parameters: <code>nodeset</code> and <code>policy</code>. The values returned in these parameters depend on both the <code>flags</code> passed in and the memory binding policies and nodesets of the pages in the address range.</p>
<p>If <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a0335311a0ee04166df2888d52b4a42c6">HWLOC_MEMBIND_STRICT</a> is specified, the target pages are first checked to see if they all have the same memory binding policy and nodeset. If they do not, -1 is returned and errno is set to EXDEV. If they are identical across all pages, the nodeset and policy are returned in <code>nodeset</code> and <code>policy</code>, respectively.</p>
<p>If <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a0335311a0ee04166df2888d52b4a42c6">HWLOC_MEMBIND_STRICT</a> is not specified, <code>nodeset</code> is set to the union of all NUMA node(s) containing pages in the address range. If all pages in the target have the same policy, it is returned in <code>policy</code>. Otherwise, <code>policy</code> is set to <a class="el" href="a00081.html#ggac9764f79505775d06407b40f5e4661e8a3185bd869b67817fb2bd5164bf360402" title="Returned by get_membind() functions when multiple threads or parts of a memory area have differing me...">HWLOC_MEMBIND_MIXED</a>.</p>
<p>If any other flags are specified, -1 is returned and errno is set to EINVAL. </p>

</div>
</div>
<a class="anchor" id="gabf567d2e3b956591a43de0c1941943b0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int hwloc_get_membind </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&#160;</td>
          <td class="paramname"><em>topology</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00073.html#ga4bbf39b68b6f568fb92739e7c0ea7801">hwloc_cpuset_t</a>&#160;</td>
          <td class="paramname"><em>cpuset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a> *&#160;</td>
          <td class="paramname"><em>policy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Query the default memory binding policy and physical locality of the current process or thread (the locality is returned in <code>cpuset</code> as CPUs near the locality's actual NUMA node(s)). </p>
<p>This function has two output parameters: <code>cpuset</code> and <code>policy</code>. The values returned in these parameters depend on both the <code>flags</code> passed in and the current memory binding policies and nodesets in the queried target.</p>
<p>Passing the <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a1b1b74aef138f64aff214a8cbdfe8eb4" title="Set policy for all threads of the specified (possibly multithreaded) process. This flag is mutually e...">HWLOC_MEMBIND_PROCESS</a> flag specifies that the query target is the current policies and nodesets for all the threads in the current process. Passing <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a1dc7dd5cdcd5796893a325a524555298" title="Set policy for a specific thread of the current process. This flag is mutually exclusive with HWLOC_M...">HWLOC_MEMBIND_THREAD</a> specifies that the query target is the current policy and nodeset for only the thread invoking this function.</p>
<p>If neither of these flags are passed (which is the most portable method), the process is assumed to be single threaded. This allows hwloc to use either process-based OS functions or thread-based OS functions, depending on which are available.</p>
<p><a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a0335311a0ee04166df2888d52b4a42c6">HWLOC_MEMBIND_STRICT</a> is only meaningful when <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a1b1b74aef138f64aff214a8cbdfe8eb4" title="Set policy for all threads of the specified (possibly multithreaded) process. This flag is mutually e...">HWLOC_MEMBIND_PROCESS</a> is also specified. In this case, hwloc will check the default memory policies and nodesets for all threads in the process. If they are not identical, -1 is returned and errno is set to EXDEV. If they are identical, the policy is returned in <code>policy</code>. <code>cpuset</code> is set to the union of CPUs near the NUMA node(s) in the nodeset.</p>
<p>Otherwise, if <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a1b1b74aef138f64aff214a8cbdfe8eb4" title="Set policy for all threads of the specified (possibly multithreaded) process. This flag is mutually e...">HWLOC_MEMBIND_PROCESS</a> is specified (and <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a0335311a0ee04166df2888d52b4a42c6">HWLOC_MEMBIND_STRICT</a> is <em>not</em> specified), the default nodeset from each thread is logically OR'ed together. <code>cpuset</code> is set to the union of CPUs near the NUMA node(s) in the resulting nodeset. If all threads' default policies are the same, <code>policy</code> is set to that policy. If they are different, <code>policy</code> is set to <a class="el" href="a00081.html#ggac9764f79505775d06407b40f5e4661e8a3185bd869b67817fb2bd5164bf360402" title="Returned by get_membind() functions when multiple threads or parts of a memory area have differing me...">HWLOC_MEMBIND_MIXED</a>.</p>
<p>In the <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a1dc7dd5cdcd5796893a325a524555298" title="Set policy for a specific thread of the current process. This flag is mutually exclusive with HWLOC_M...">HWLOC_MEMBIND_THREAD</a> case (or when neither <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a1b1b74aef138f64aff214a8cbdfe8eb4" title="Set policy for all threads of the specified (possibly multithreaded) process. This flag is mutually e...">HWLOC_MEMBIND_PROCESS</a> or <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a1dc7dd5cdcd5796893a325a524555298" title="Set policy for a specific thread of the current process. This flag is mutually exclusive with HWLOC_M...">HWLOC_MEMBIND_THREAD</a> is specified), there is only one nodeset and policy. The policy is returned in <code>policy</code>; <code>cpuset</code> is set to the union of CPUs near the NUMA node(s) in the <code>nodeset</code>.</p>
<p>If any other flags are specified, -1 is returned and errno is set to EINVAL. </p>

</div>
</div>
<a class="anchor" id="ga84ee275e84286d17a5853c52272a6a95"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int hwloc_get_membind_nodeset </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&#160;</td>
          <td class="paramname"><em>topology</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00073.html#ga37e35730fa7e775b5bb0afe893d6d508">hwloc_nodeset_t</a>&#160;</td>
          <td class="paramname"><em>nodeset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a> *&#160;</td>
          <td class="paramname"><em>policy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Query the default memory binding policy and physical locality of the current process or thread. </p>
<p>This function has two output parameters: <code>nodeset</code> and <code>policy</code>. The values returned in these parameters depend on both the <code>flags</code> passed in and the current memory binding policies and nodesets in the queried target.</p>
<p>Passing the <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a1b1b74aef138f64aff214a8cbdfe8eb4" title="Set policy for all threads of the specified (possibly multithreaded) process. This flag is mutually e...">HWLOC_MEMBIND_PROCESS</a> flag specifies that the query target is the current policies and nodesets for all the threads in the current process. Passing <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a1dc7dd5cdcd5796893a325a524555298" title="Set policy for a specific thread of the current process. This flag is mutually exclusive with HWLOC_M...">HWLOC_MEMBIND_THREAD</a> specifies that the query target is the current policy and nodeset for only the thread invoking this function.</p>
<p>If neither of these flags are passed (which is the most portable method), the process is assumed to be single threaded. This allows hwloc to use either process-based OS functions or thread-based OS functions, depending on which are available.</p>
<p><a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a0335311a0ee04166df2888d52b4a42c6">HWLOC_MEMBIND_STRICT</a> is only meaningful when <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a1b1b74aef138f64aff214a8cbdfe8eb4" title="Set policy for all threads of the specified (possibly multithreaded) process. This flag is mutually e...">HWLOC_MEMBIND_PROCESS</a> is also specified. In this case, hwloc will check the default memory policies and nodesets for all threads in the process. If they are not identical, -1 is returned and errno is set to EXDEV. If they are identical, the values are returned in <code>nodeset</code> and <code>policy</code>.</p>
<p>Otherwise, if <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a1b1b74aef138f64aff214a8cbdfe8eb4" title="Set policy for all threads of the specified (possibly multithreaded) process. This flag is mutually e...">HWLOC_MEMBIND_PROCESS</a> is specified (and <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a0335311a0ee04166df2888d52b4a42c6">HWLOC_MEMBIND_STRICT</a> is <em>not</em> specified), <code>nodeset</code> is set to the logical OR of all threads' default nodeset. If all threads' default policies are the same, <code>policy</code> is set to that policy. If they are different, <code>policy</code> is set to <a class="el" href="a00081.html#ggac9764f79505775d06407b40f5e4661e8a3185bd869b67817fb2bd5164bf360402" title="Returned by get_membind() functions when multiple threads or parts of a memory area have differing me...">HWLOC_MEMBIND_MIXED</a>.</p>
<p>In the <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a1dc7dd5cdcd5796893a325a524555298" title="Set policy for a specific thread of the current process. This flag is mutually exclusive with HWLOC_M...">HWLOC_MEMBIND_THREAD</a> case (or when neither <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a1b1b74aef138f64aff214a8cbdfe8eb4" title="Set policy for all threads of the specified (possibly multithreaded) process. This flag is mutually e...">HWLOC_MEMBIND_PROCESS</a> or <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a1dc7dd5cdcd5796893a325a524555298" title="Set policy for a specific thread of the current process. This flag is mutually exclusive with HWLOC_M...">HWLOC_MEMBIND_THREAD</a> is specified), there is only one nodeset and policy; they are returned in <code>nodeset</code> and <code>policy</code>, respectively.</p>
<p>If any other flags are specified, -1 is returned and errno is set to EINVAL. </p>

</div>
</div>
<a class="anchor" id="gada7b3bb7f278542dbb38dc3d6f527c29"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int hwloc_get_proc_membind </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&#160;</td>
          <td class="paramname"><em>topology</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">hwloc_pid_t&#160;</td>
          <td class="paramname"><em>pid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00073.html#ga4bbf39b68b6f568fb92739e7c0ea7801">hwloc_cpuset_t</a>&#160;</td>
          <td class="paramname"><em>cpuset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a> *&#160;</td>
          <td class="paramname"><em>policy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Query the default memory binding policy and physical locality of the specified process (the locality is returned in <code>cpuset</code> as CPUs near the locality's actual NUMA node(s)). </p>
<p>This function has two output parameters: <code>cpuset</code> and <code>policy</code>. The values returned in these parameters depend on both the <code>flags</code> passed in and the current memory binding policies and nodesets in the queried target.</p>
<p>Passing the <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a1b1b74aef138f64aff214a8cbdfe8eb4" title="Set policy for all threads of the specified (possibly multithreaded) process. This flag is mutually e...">HWLOC_MEMBIND_PROCESS</a> flag specifies that the query target is the current policies and nodesets for all the threads in the specified process. If <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a1b1b74aef138f64aff214a8cbdfe8eb4" title="Set policy for all threads of the specified (possibly multithreaded) process. This flag is mutually e...">HWLOC_MEMBIND_PROCESS</a> is not specified (which is the most portable method), the process is assumed to be single threaded. This allows hwloc to use either process-based OS functions or thread-based OS functions, depending on which are available.</p>
<p>Note that it does not make sense to pass <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a1dc7dd5cdcd5796893a325a524555298" title="Set policy for a specific thread of the current process. This flag is mutually exclusive with HWLOC_M...">HWLOC_MEMBIND_THREAD</a> to this function.</p>
<p>If <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a0335311a0ee04166df2888d52b4a42c6">HWLOC_MEMBIND_STRICT</a> is specified, hwloc will check the default memory policies and nodesets for all threads in the specified process. If they are not identical, -1 is returned and errno is set to EXDEV. If they are identical, the policy is returned in <code>policy</code>. <code>cpuset</code> is set to the union of CPUs near the NUMA node(s) in the nodeset.</p>
<p>Otherwise, the default nodeset from each thread is logically OR'ed together. <code>cpuset</code> is set to the union of CPUs near the NUMA node(s) in the resulting nodeset. If all threads' default policies are the same, <code>policy</code> is set to that policy. If they are different, <code>policy</code> is set to <a class="el" href="a00081.html#ggac9764f79505775d06407b40f5e4661e8a3185bd869b67817fb2bd5164bf360402" title="Returned by get_membind() functions when multiple threads or parts of a memory area have differing me...">HWLOC_MEMBIND_MIXED</a>.</p>
<p>If any other flags are specified, -1 is returned and errno is set to EINVAL.</p>
<dl class="section note"><dt>Note</dt><dd><code>hwloc_pid_t</code> is <code>pid_t</code> on Unix platforms, and <code>HANDLE</code> on native Windows platforms. </dd></dl>

</div>
</div>
<a class="anchor" id="gac5075b7a2bf55f48f4622351817addad"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int hwloc_get_proc_membind_nodeset </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&#160;</td>
          <td class="paramname"><em>topology</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">hwloc_pid_t&#160;</td>
          <td class="paramname"><em>pid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00073.html#ga37e35730fa7e775b5bb0afe893d6d508">hwloc_nodeset_t</a>&#160;</td>
          <td class="paramname"><em>nodeset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a> *&#160;</td>
          <td class="paramname"><em>policy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Query the default memory binding policy and physical locality of the specified process. </p>
<p>This function has two output parameters: <code>nodeset</code> and <code>policy</code>. The values returned in these parameters depend on both the <code>flags</code> passed in and the current memory binding policies and nodesets in the queried target.</p>
<p>Passing the <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a1b1b74aef138f64aff214a8cbdfe8eb4" title="Set policy for all threads of the specified (possibly multithreaded) process. This flag is mutually e...">HWLOC_MEMBIND_PROCESS</a> flag specifies that the query target is the current policies and nodesets for all the threads in the specified process. If <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a1b1b74aef138f64aff214a8cbdfe8eb4" title="Set policy for all threads of the specified (possibly multithreaded) process. This flag is mutually e...">HWLOC_MEMBIND_PROCESS</a> is not specified (which is the most portable method), the process is assumed to be single threaded. This allows hwloc to use either process-based OS functions or thread-based OS functions, depending on which are available.</p>
<p>Note that it does not make sense to pass <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a1dc7dd5cdcd5796893a325a524555298" title="Set policy for a specific thread of the current process. This flag is mutually exclusive with HWLOC_M...">HWLOC_MEMBIND_THREAD</a> to this function.</p>
<p>If <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a0335311a0ee04166df2888d52b4a42c6">HWLOC_MEMBIND_STRICT</a> is specified, hwloc will check the default memory policies and nodesets for all threads in the specified process. If they are not identical, -1 is returned and errno is set to EXDEV. If they are identical, the values are returned in <code>nodeset</code> and <code>policy</code>.</p>
<p>Otherwise, <code>nodeset</code> is set to the logical OR of all threads' default nodeset. If all threads' default policies are the same, <code>policy</code> is set to that policy. If they are different, <code>policy</code> is set to <a class="el" href="a00081.html#ggac9764f79505775d06407b40f5e4661e8a3185bd869b67817fb2bd5164bf360402" title="Returned by get_membind() functions when multiple threads or parts of a memory area have differing me...">HWLOC_MEMBIND_MIXED</a>.</p>
<p>If any other flags are specified, -1 is returned and errno is set to EINVAL.</p>
<dl class="section note"><dt>Note</dt><dd><code>hwloc_pid_t</code> is <code>pid_t</code> on Unix platforms, and <code>HANDLE</code> on native Windows platforms. </dd></dl>

</div>
</div>
<a class="anchor" id="ga93d2698ae5d7330be5e9f8ece6bc9b2c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int hwloc_set_area_membind </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&#160;</td>
          <td class="paramname"><em>topology</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00073.html#ga1f784433e9b606261f62d1134f6a3b25">hwloc_const_cpuset_t</a>&#160;</td>
          <td class="paramname"><em>cpuset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a>&#160;</td>
          <td class="paramname"><em>policy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Bind the already-allocated memory identified by (addr, len) to the NUMA node(s) near physical <code>cpuset</code>. </p>
<dl class="section return"><dt>Returns</dt><dd>-1 with errno set to ENOSYS if the action is not supported </dd>
<dd>
-1 with errno set to EXDEV if the binding cannot be enforced </dd></dl>

</div>
</div>
<a class="anchor" id="ga7f11bd709ac0cb93af613e2dd84165ad"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int hwloc_set_area_membind_nodeset </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&#160;</td>
          <td class="paramname"><em>topology</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00073.html#ga2f5276235841ad66a79bedad16a5a10c">hwloc_const_nodeset_t</a>&#160;</td>
          <td class="paramname"><em>nodeset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a>&#160;</td>
          <td class="paramname"><em>policy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Bind the already-allocated memory identified by (addr, len) to the NUMA node(s) in physical <code>nodeset</code>. </p>
<dl class="section return"><dt>Returns</dt><dd>-1 with errno set to ENOSYS if the action is not supported </dd>
<dd>
-1 with errno set to EXDEV if the binding cannot be enforced </dd></dl>

</div>
</div>
<a class="anchor" id="ga53a493e13ad8e5f924b50c07713ee5df"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int hwloc_set_membind </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&#160;</td>
          <td class="paramname"><em>topology</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00073.html#ga1f784433e9b606261f62d1134f6a3b25">hwloc_const_cpuset_t</a>&#160;</td>
          <td class="paramname"><em>cpuset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a>&#160;</td>
          <td class="paramname"><em>policy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the default memory binding policy of the current process or thread to prefer the NUMA node(s) near the specified physical <code>cpuset</code>. </p>
<p>If neither <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a1b1b74aef138f64aff214a8cbdfe8eb4" title="Set policy for all threads of the specified (possibly multithreaded) process. This flag is mutually e...">HWLOC_MEMBIND_PROCESS</a> nor <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a1dc7dd5cdcd5796893a325a524555298" title="Set policy for a specific thread of the current process. This flag is mutually exclusive with HWLOC_M...">HWLOC_MEMBIND_THREAD</a> is specified, the current process is assumed to be single-threaded. This is the most portable form as it permits hwloc to use either process-based OS functions or thread-based OS functions, depending on which are available.</p>
<dl class="section return"><dt>Returns</dt><dd>-1 with errno set to ENOSYS if the action is not supported </dd>
<dd>
-1 with errno set to EXDEV if the binding cannot be enforced </dd></dl>

</div>
</div>
<a class="anchor" id="ga5cac0bcbe770b43fc63a6b00ea4a7a9d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int hwloc_set_membind_nodeset </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&#160;</td>
          <td class="paramname"><em>topology</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00073.html#ga2f5276235841ad66a79bedad16a5a10c">hwloc_const_nodeset_t</a>&#160;</td>
          <td class="paramname"><em>nodeset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a>&#160;</td>
          <td class="paramname"><em>policy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the default memory binding policy of the current process or thread to prefer the NUMA node(s) specified by physical <code>nodeset</code>. </p>
<p>If neither <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a1b1b74aef138f64aff214a8cbdfe8eb4" title="Set policy for all threads of the specified (possibly multithreaded) process. This flag is mutually e...">HWLOC_MEMBIND_PROCESS</a> nor <a class="el" href="a00081.html#ggab00475fd98815bf4fb9aaf752030e7d2a1dc7dd5cdcd5796893a325a524555298" title="Set policy for a specific thread of the current process. This flag is mutually exclusive with HWLOC_M...">HWLOC_MEMBIND_THREAD</a> is specified, the current process is assumed to be single-threaded. This is the most portable form as it permits hwloc to use either process-based OS functions or thread-based OS functions, depending on which are available.</p>
<dl class="section return"><dt>Returns</dt><dd>-1 with errno set to ENOSYS if the action is not supported </dd>
<dd>
-1 with errno set to EXDEV if the binding cannot be enforced </dd></dl>

</div>
</div>
<a class="anchor" id="ga94b91473febe49fc7af09a0f4a72e53a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int hwloc_set_proc_membind </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&#160;</td>
          <td class="paramname"><em>topology</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">hwloc_pid_t&#160;</td>
          <td class="paramname"><em>pid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00073.html#ga1f784433e9b606261f62d1134f6a3b25">hwloc_const_cpuset_t</a>&#160;</td>
          <td class="paramname"><em>cpuset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a>&#160;</td>
          <td class="paramname"><em>policy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the default memory binding policy of the specified process to prefer the NUMA node(s) near the specified physical <code>cpuset</code>. </p>
<dl class="section return"><dt>Returns</dt><dd>-1 with errno set to ENOSYS if the action is not supported </dd>
<dd>
-1 with errno set to EXDEV if the binding cannot be enforced</dd></dl>
<dl class="section note"><dt>Note</dt><dd><code>hwloc_pid_t</code> is <code>pid_t</code> on Unix platforms, and <code>HANDLE</code> on native Windows platforms. </dd></dl>

</div>
</div>
<a class="anchor" id="ga21b042d94266a26a9c82b98c4bb30d01"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int hwloc_set_proc_membind_nodeset </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00076.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&#160;</td>
          <td class="paramname"><em>topology</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">hwloc_pid_t&#160;</td>
          <td class="paramname"><em>pid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00073.html#ga2f5276235841ad66a79bedad16a5a10c">hwloc_const_nodeset_t</a>&#160;</td>
          <td class="paramname"><em>nodeset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00081.html#gac9764f79505775d06407b40f5e4661e8">hwloc_membind_policy_t</a>&#160;</td>
          <td class="paramname"><em>policy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the default memory binding policy of the specified process to prefer the NUMA node(s) specified by physical <code>nodeset</code>. </p>
<dl class="section return"><dt>Returns</dt><dd>-1 with errno set to ENOSYS if the action is not supported </dd>
<dd>
-1 with errno set to EXDEV if the binding cannot be enforced</dd></dl>
<dl class="section note"><dt>Note</dt><dd><code>hwloc_pid_t</code> is <code>pid_t</code> on Unix platforms, and <code>HANDLE</code> on native Windows platforms. </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Oct 7 2014 11:56:52 for Hardware Locality (hwloc) by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.8
</small></address>
</body>
</html>