Compare commits
2350
Commits
compile_fixes
...
v5.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6b6e6f6c1e | ||
|
|
b0a0f03b96 | ||
|
|
f1982ca63d | ||
|
|
25e18a7de9 | ||
|
|
bb090b6d20 | ||
|
|
a9c4e3970f | ||
|
|
d5ecc2347a | ||
|
|
58971a430d | ||
|
|
1512274f4c | ||
|
|
e310d33c12 | ||
|
|
ad32ba0343 | ||
|
|
4e30a5b4e5 | ||
|
|
c8516f3dc4 | ||
|
|
aae0fdc114 | ||
|
|
a19d0f67b9 | ||
|
|
971f69fe1f | ||
|
|
7468c691ad | ||
|
|
620c2ec141 | ||
|
|
3081b6f98b | ||
|
|
8630339e43 | ||
|
|
528d10091f | ||
|
|
149c3cf3dd | ||
|
|
f12c3cf9dd | ||
|
|
1f08a0efb3 | ||
|
|
6cf85d1d01 | ||
|
|
b5101a460d | ||
|
|
a5784ef09e | ||
|
|
122ec25bf0 | ||
|
|
d013ad9eba | ||
|
|
d918ca6fa5 | ||
|
|
852819180f | ||
|
|
218111eb72 | ||
|
|
1531cfb7ee | ||
|
|
16a89f21dc | ||
|
|
79e5160e37 | ||
|
|
510e966dc0 | ||
|
|
8238d3207e | ||
|
|
e37bc4ad40 | ||
|
|
0f78b8b917 | ||
|
|
19061fe04f | ||
|
|
9c901eb65f | ||
|
|
ae33ff3a6e | ||
|
|
59dbd625c1 | ||
|
|
8eb4e355b9 | ||
|
|
8b76b01bfe | ||
|
|
ec57b4b024 | ||
|
|
46d6caa47c | ||
|
|
97b65ce19c | ||
|
|
55d0ef40b0 | ||
|
|
a6c56416fc | ||
|
|
cd3c482d5e | ||
|
|
c5cbb77fc7 | ||
|
|
d7f21f02b3 | ||
|
|
87dc8ce9b3 | ||
|
|
2e22aa1a9c | ||
|
|
8c56dbf971 | ||
|
|
a78169e9e0 | ||
|
|
39a60c8120 | ||
|
|
c57d8760bd | ||
|
|
3eed2a8780 | ||
|
|
23b0268a7f | ||
|
|
3d0de946bb | ||
|
|
866b8ead91 | ||
|
|
aa274960ff | ||
|
|
54d6eb851b | ||
|
|
86d7276f24 | ||
|
|
0918651438 | ||
|
|
272d9297b6 | ||
|
|
f5bfc71899 | ||
|
|
42e1ded55f | ||
|
|
6c410af5a8 | ||
|
|
57ae676181 | ||
|
|
7896ca6e52 | ||
|
|
c4a315dd5e | ||
|
|
bf26959b72 | ||
|
|
37b2d046be | ||
|
|
fa2e407873 | ||
|
|
c61cf57db5 | ||
|
|
ef3690f2db | ||
|
|
14d01ec7bd | ||
|
|
5dc9f70386 | ||
|
|
88e593bf96 | ||
|
|
efde2e6be6 | ||
|
|
5a78a3bc46 | ||
|
|
b276d803d4 | ||
|
|
da51ac430b | ||
|
|
01eb0a3c7f | ||
|
|
dc2b3cf4f8 | ||
|
|
c4621a5ed2 | ||
|
|
1c953a4d5b | ||
|
|
c64ce7aa9c | ||
|
|
acdc4fdfec | ||
|
|
7ef9c18b72 | ||
|
|
a69b4e79db | ||
|
|
740fc6c2b8 | ||
|
|
42202c868d | ||
|
|
8c133b605c | ||
|
|
b50acd7238 | ||
|
|
54db278695 | ||
|
|
011948bcef | ||
|
|
9f95d8b38f | ||
|
|
3d394a6fa2 | ||
|
|
68d2b648e0 | ||
|
|
283998404f | ||
|
|
a7b4d0fea6 | ||
|
|
59051dd59d | ||
|
|
cd836a37e7 | ||
|
|
4326d22380 | ||
|
|
161d3a35ff | ||
|
|
20a9d21dfb | ||
|
|
e902789aa7 | ||
|
|
3745bbd95b | ||
|
|
e63b2880b0 | ||
|
|
a9b70e1ef7 | ||
|
|
e300f753c5 | ||
|
|
efaeca5887 | ||
|
|
4d67305661 | ||
|
|
853bb6ca3e | ||
|
|
b16f23ae8e | ||
|
|
91e6368de0 | ||
|
|
e4451b9628 | ||
|
|
770bb8ef5f | ||
|
|
87b958a210 | ||
|
|
314ac90ba9 | ||
|
|
9f33822083 | ||
|
|
10a4b35bc5 | ||
|
|
7b1dd0b60d | ||
|
|
7a650741f7 | ||
|
|
2ce5f1b944 | ||
|
|
063a14372d | ||
|
|
dd70e1b571 | ||
|
|
1840b893c2 | ||
|
|
8bcde757ce | ||
|
|
1dff223c71 | ||
|
|
a7aa2b0740 | ||
|
|
fb45fefbca | ||
|
|
7b914c2531 | ||
|
|
75d517a27f | ||
|
|
4c98bc690e | ||
|
|
550b3a3a99 | ||
|
|
ef7e89352d | ||
|
|
9322d604ee | ||
|
|
5d92110630 | ||
|
|
4056037cc2 | ||
|
|
677ae5487f | ||
|
|
19956b3807 | ||
|
|
ab9122f2cb | ||
|
|
e62c6b0ed0 | ||
|
|
27a420fbc2 | ||
|
|
b775ebb382 | ||
|
|
ac80a5c6a6 | ||
|
|
c74100a552 | ||
|
|
03379106d6 | ||
|
|
9ad229f663 | ||
|
|
0900edf776 | ||
|
|
ea520027b9 | ||
|
|
04679b3b3b | ||
|
|
2bf5c1324a | ||
|
|
3d93ca1bf6 | ||
|
|
c548431611 | ||
|
|
0ab29f7394 | ||
|
|
30dab7ad14 | ||
|
|
0c5fa59221 | ||
|
|
267e84f97d | ||
|
|
344cca75c6 | ||
|
|
0dd8e682f4 | ||
|
|
da7e54819a | ||
|
|
4e70215307 | ||
|
|
6aa162f6ff | ||
|
|
d380074569 | ||
|
|
c406e7ff51 | ||
|
|
31ff6cffee | ||
|
|
a9e525c81e | ||
|
|
6157a5fc1b | ||
|
|
be3cb1ad33 | ||
|
|
a89ab4d6b0 | ||
|
|
966f4a8144 | ||
|
|
261cf24efc | ||
|
|
a3da10f4eb | ||
|
|
6cb8063497 | ||
|
|
a45f212693 | ||
|
|
7c72cd5471 | ||
|
|
66f2032708 | ||
|
|
7546c7d8b4 | ||
|
|
703e4ad2fe | ||
|
|
0b98280a1f | ||
|
|
4609bed6a4 | ||
|
|
99ccb11d89 | ||
|
|
8a5a513662 | ||
|
|
bf0fd22309 | ||
|
|
cc98d10fc6 | ||
|
|
a6a022faa2 | ||
|
|
a864ad1c9c | ||
|
|
0bc586933f | ||
|
|
2785a8b4d4 | ||
|
|
d5d5f6ae06 | ||
|
|
be3ba1d53e | ||
|
|
09e6a4fee0 | ||
|
|
efc60dd8c5 | ||
|
|
a52cd974b9 | ||
|
|
de4217489c | ||
|
|
3c658b5012 | ||
|
|
f6814aa825 | ||
|
|
01a529cbda | ||
|
|
a1475af1e4 | ||
|
|
07594d4f95 | ||
|
|
bad73faf28 | ||
|
|
8d3704d93b | ||
|
|
8bd56fadd6 | ||
|
|
23f9b584a8 | ||
|
|
141557963e | ||
|
|
ffabf3c5b7 | ||
|
|
9b1e95809c | ||
|
|
b8776bb001 | ||
|
|
84c20e8337 | ||
|
|
bae2409cce | ||
|
|
8f7c44257b | ||
|
|
2772ce249c | ||
|
|
bcfd9327cb | ||
|
|
01ff36fc28 | ||
|
|
6466b09fdc | ||
|
|
40d7a701fe | ||
|
|
78b9d303d3 | ||
|
|
d912013d1b | ||
|
|
898e6519d1 | ||
|
|
8c074a7d01 | ||
|
|
06d4b7efc3 | ||
|
|
78451a4223 | ||
|
|
6e69b4a795 | ||
|
|
1c36b46cb4 | ||
|
|
73abd04b95 | ||
|
|
29d6845d1f | ||
|
|
3871725979 | ||
|
|
199269bff7 | ||
|
|
0ebf0f7338 | ||
|
|
0ccceddae0 | ||
|
|
03646fe492 | ||
|
|
8b72fe935e | ||
|
|
1761aabab4 | ||
|
|
934375cfea | ||
|
|
b6735ac883 | ||
|
|
f4b060e0bd | ||
|
|
d016b967c5 | ||
|
|
ebf0ae3e97 | ||
|
|
41164fbb61 | ||
|
|
75f589c702 | ||
|
|
ac4c00d6d9 | ||
|
|
1f2f2edfac | ||
|
|
942510f1a5 | ||
|
|
02e7fe400c | ||
|
|
29c1105132 | ||
|
|
357a9e92e2 | ||
|
|
bf41d3916e | ||
|
|
acbad0c04e | ||
|
|
2526d51d1a | ||
|
|
a7bed6327a | ||
|
|
a47b0f4d3b | ||
|
|
2c220889c6 | ||
|
|
5fc8747feb | ||
|
|
6d8530d493 | ||
|
|
62090d0a97 | ||
|
|
f5caec488d | ||
|
|
48f6d0d800 | ||
|
|
d62178ec8c | ||
|
|
da84b26785 | ||
|
|
988ea40101 | ||
|
|
eb9070c833 | ||
|
|
c4dbc557eb | ||
|
|
b7b503d3ce | ||
|
|
180c93ea4f | ||
|
|
327bbec981 | ||
|
|
44299002e0 | ||
|
|
7175a8e4eb | ||
|
|
edd87115f1 | ||
|
|
9aefc183c6 | ||
|
|
2f9d958e96 | ||
|
|
3e9b867709 | ||
|
|
d3fc46b3a8 | ||
|
|
e8b5bbf7a1 | ||
|
|
d8b67e717c | ||
|
|
79ef18e885 | ||
|
|
e4bcae6156 | ||
|
|
23a91df9f6 | ||
|
|
e38d1e6c7f | ||
|
|
d8741595ae | ||
|
|
3e9e84ca19 | ||
|
|
3c9dd6ffc2 | ||
|
|
41a24e689e | ||
|
|
20ba1b7e96 | ||
|
|
475fd7ba2e | ||
|
|
15a76e7868 | ||
|
|
8ce3c16317 | ||
|
|
42d28c9ff6 | ||
|
|
2f753a3539 | ||
|
|
b74c41c8e4 | ||
|
|
58c070757d | ||
|
|
0082503bdf | ||
|
|
20fa89d093 | ||
|
|
0d6e0f8d23 | ||
|
|
1327538221 | ||
|
|
82372cbce8 | ||
|
|
7d76a8d602 | ||
|
|
69b07c5cc2 | ||
|
|
d3a31390b5 | ||
|
|
09a263e607 | ||
|
|
a6d27dc02c | ||
|
|
b290c49a40 | ||
|
|
bbcaf48cb0 | ||
|
|
a476fdfd8c | ||
|
|
a23e926924 | ||
|
|
816f2fce08 | ||
|
|
38c6030278 | ||
|
|
15385d4d68 | ||
|
|
91f55d3206 | ||
|
|
b807d63f92 | ||
|
|
3ec2dc3a6d | ||
|
|
1cb9b66aaa | ||
|
|
110c8caf8a | ||
|
|
2458e62da4 | ||
|
|
88af62aca2 | ||
|
|
e1d14fb943 | ||
|
|
7deb1e90d9 | ||
|
|
cd60bcc427 | ||
|
|
0fa16cbd4b | ||
|
|
ef252265d9 | ||
|
|
1f64563801 | ||
|
|
20106cfa04 | ||
|
|
85194d99da | ||
|
|
5e6b9b9c54 | ||
|
|
5c86d2faa2 | ||
|
|
0ffcf355fe | ||
|
|
3293d1c2e7 | ||
|
|
40e619cff2 | ||
|
|
66714ee449 | ||
|
|
02f4e087d7 | ||
|
|
58404e2e12 | ||
|
|
95fe993018 | ||
|
|
25d1876405 | ||
|
|
2fbd532d61 | ||
|
|
7b1493a249 | ||
|
|
b03f0c0403 | ||
|
|
fa0ce5aee7 | ||
|
|
b87b3bb812 | ||
|
|
8dc96916f1 | ||
|
|
c2865f4810 | ||
|
|
619017f9c2 | ||
|
|
296f43b2dd | ||
|
|
9bc46cbcc8 | ||
|
|
fbc34f98c6 | ||
|
|
3bd953491a | ||
|
|
30951093cd | ||
|
|
c35ceec273 | ||
|
|
6b8582a319 | ||
|
|
72b3f7c37b | ||
|
|
d582ce5033 | ||
|
|
7e481d61de | ||
|
|
3e5ced4a7b | ||
|
|
ed0a01e9c6 | ||
|
|
feeb9c61c1 | ||
|
|
7a1b25de22 | ||
|
|
7466bed857 | ||
|
|
cecb9c6cea | ||
|
|
2910070e24 | ||
|
|
05d9bcf89f | ||
|
|
8a8b8a4199 | ||
|
|
318db2ec51 | ||
|
|
14ea988d9c | ||
|
|
44dbf235c6 | ||
|
|
01a1c01bc1 | ||
|
|
7f158ed439 | ||
|
|
b7f873f1c3 | ||
|
|
a885b8892b | ||
|
|
52d43a80b1 | ||
|
|
1e9665909d | ||
|
|
f1e7266c85 | ||
|
|
91a4de033a | ||
|
|
4ea77e957d | ||
|
|
f05b44042a | ||
|
|
4e31893f6d | ||
|
|
10b1a9ecc6 | ||
|
|
b2d5ed373a | ||
|
|
ec4c632302 | ||
|
|
355ae29c63 | ||
|
|
57f5b2dffc | ||
|
|
9153afb3aa | ||
|
|
d92b1af1e1 | ||
|
|
d33c574ddd | ||
|
|
84e3a8902e | ||
|
|
c291d2fc55 | ||
|
|
23abe9612a | ||
|
|
fc5f6d1a51 | ||
|
|
d8128968a9 | ||
|
|
b3210c5a11 | ||
|
|
a010bf750e | ||
|
|
c00d2a334e | ||
|
|
9f3ebe6d59 | ||
|
|
38e83e61fc | ||
|
|
aee528ee66 | ||
|
|
590b97cc43 | ||
|
|
4261b70f8d | ||
|
|
b3087f5d6a | ||
|
|
f1e57a86f9 | ||
|
|
26be458e05 | ||
|
|
7e73a1fbf3 | ||
|
|
a7ea1e7a2f | ||
|
|
b77577114b | ||
|
|
03c4aa01ec | ||
|
|
dabd1e3bbb | ||
|
|
58848500b1 | ||
|
|
eb6cae0b72 | ||
|
|
21808e3720 | ||
|
|
2906e9c196 | ||
|
|
a2a8121ad8 | ||
|
|
8cb696b953 | ||
|
|
cd421f85b8 | ||
|
|
57fa4a2f01 | ||
|
|
1cb8998a1c | ||
|
|
115adf0049 | ||
|
|
4d8991fdf4 | ||
|
|
532049a9bc | ||
|
|
fc85321233 | ||
|
|
45346c6766 | ||
|
|
53053f5f30 | ||
|
|
b497dbb481 | ||
|
|
b9e5d4f575 | ||
|
|
f4b216d32b | ||
|
|
79e57bb854 | ||
|
|
31994ff365 | ||
|
|
7822181e31 | ||
|
|
b2636ecdf5 | ||
|
|
4890c2f5e9 | ||
|
|
2793edf8c7 | ||
|
|
efa8afedd7 | ||
|
|
e1ff6ef8e7 | ||
|
|
3c538d0595 | ||
|
|
487b8fcbaa | ||
|
|
f3ad8fc85e | ||
|
|
e75a2b8500 | ||
|
|
da1c642f83 | ||
|
|
6771d47230 | ||
|
|
9633476699 | ||
|
|
3a02107a18 | ||
|
|
cc5222bd7a | ||
|
|
647a157eac | ||
|
|
a571c99587 | ||
|
|
50927b298e | ||
|
|
cb7b4154cd | ||
|
|
106977aaf9 | ||
|
|
79c3d1355d | ||
|
|
26007b980a | ||
|
|
736d38cf88 | ||
|
|
a57ea371bd | ||
|
|
c4bf8bf6e8 | ||
|
|
67a6fe1dc7 | ||
|
|
5190cbe08f | ||
|
|
7db26f6aad | ||
|
|
7894b02f3c | ||
|
|
e936aaf5fc | ||
|
|
a73887b0cb | ||
|
|
fd81b96935 | ||
|
|
9089aadc9d | ||
|
|
592508470d | ||
|
|
229ca5b210 | ||
|
|
092bb045fe | ||
|
|
380859ed3c | ||
|
|
59448be097 | ||
|
|
d09a0f47d1 | ||
|
|
d4b34743e1 | ||
|
|
86d2b8a65f | ||
|
|
1347b4eeef | ||
|
|
99abef1e5d | ||
|
|
27b7e55379 | ||
|
|
5fba9d160d | ||
|
|
e5241b6e58 | ||
|
|
75a6d12dd0 | ||
|
|
d1c79701da | ||
|
|
bb98fa90bb | ||
|
|
f7d9fd0059 | ||
|
|
cbb6c8f978 | ||
|
|
1916a890f7 | ||
|
|
38d02d0287 | ||
|
|
da155176f1 | ||
|
|
92c9429d17 | ||
|
|
d266105a45 | ||
|
|
0dbdaab2a1 | ||
|
|
0972c55994 | ||
|
|
a97bf0c549 | ||
|
|
7ff88b2c7a | ||
|
|
20c202c219 | ||
|
|
7872d57d27 | ||
|
|
8413c6f107 | ||
|
|
a039a1bc3c | ||
|
|
ee2564e90e | ||
|
|
e02ab3c51e | ||
|
|
b715bb5124 | ||
|
|
bc7b1c7b51 | ||
|
|
0279914a41 | ||
|
|
02c2309efc | ||
|
|
3aebf8ab29 | ||
|
|
9ed8763002 | ||
|
|
342f336398 | ||
|
|
76fa77f9d5 | ||
|
|
6fbf149112 | ||
|
|
7fe7b38743 | ||
|
|
f5a4f6bdf4 | ||
|
|
c3d7abb004 | ||
|
|
f10783e9fb | ||
|
|
54ccb4df9e | ||
|
|
7c9f682686 | ||
|
|
33374b02bf | ||
|
|
1c82be419f | ||
|
|
da3d2db500 | ||
|
|
5ff8d37503 | ||
|
|
1eca7e34c7 | ||
|
|
f3be3d13a7 | ||
|
|
fa4e6ba00d | ||
|
|
1f66431b4a | ||
|
|
f6bd1372ab | ||
|
|
314721a1ef | ||
|
|
39f4a23296 | ||
|
|
fba9c840bf | ||
|
|
134c1a48c5 | ||
|
|
853b97fd85 | ||
|
|
9b6ceafc00 | ||
|
|
1055c6b484 | ||
|
|
d54066e90f | ||
|
|
4ec37c3bd3 | ||
|
|
46baf72ddd | ||
|
|
cc21057890 | ||
|
|
0ba9e0f8dd | ||
|
|
b166aff1bf | ||
|
|
5daed99b5c | ||
|
|
76e5519516 | ||
|
|
19ef3890e9 | ||
|
|
e16d2dfb5f | ||
|
|
7c25def9a0 | ||
|
|
c30b9dc868 | ||
|
|
5106a32402 | ||
|
|
0a0dbf6027 | ||
|
|
22d9e8ce65 | ||
|
|
3ab14c56f7 | ||
|
|
e60a8ce2f2 | ||
|
|
fc4b1319d0 | ||
|
|
eaaf22a4f8 | ||
|
|
440e8164a1 | ||
|
|
17ff4e873f | ||
|
|
c2ea297052 | ||
|
|
b5d9d24d3b | ||
|
|
0c7a108dc9 | ||
|
|
8b7107fd32 | ||
|
|
c70976ab30 | ||
|
|
d21f7e44ea | ||
|
|
04d2faf7f6 | ||
|
|
50c8580a33 | ||
|
|
2af190d9f8 | ||
|
|
fd4bea34b5 | ||
|
|
439e29a38a | ||
|
|
944edff974 | ||
|
|
33b1020859 | ||
|
|
3cd5152007 | ||
|
|
8b67a78dfa | ||
|
|
32ed397859 | ||
|
|
c8443f9a9e | ||
|
|
35c693ff33 | ||
|
|
7b16be3fab | ||
|
|
8696f09314 | ||
|
|
38120939d1 | ||
|
|
1dbdef57cd | ||
|
|
9a4161b048 | ||
|
|
4808a09a4f | ||
|
|
120daf0a04 | ||
|
|
2648ccacb6 | ||
|
|
cfb421fe3a | ||
|
|
d4ac0287e3 | ||
|
|
2d5544de8b | ||
|
|
eb1c67673d | ||
|
|
307ef33b65 | ||
|
|
747a4a928e | ||
|
|
bcd4fb04ad | ||
|
|
8981b91c2f | ||
|
|
4c65479744 | ||
|
|
131343d466 | ||
|
|
5cd50d39fb | ||
|
|
99c2604541 | ||
|
|
be459c7e26 | ||
|
|
c2fa863c55 | ||
|
|
3afdde7c56 | ||
|
|
5099745426 | ||
|
|
34b206057e | ||
|
|
1a86562f52 | ||
|
|
59c5134218 | ||
|
|
41615d418b | ||
|
|
9956f4f61b | ||
|
|
195e754247 | ||
|
|
0d7f49c3cc | ||
|
|
cd47c66c7a | ||
|
|
f943c1d3f4 | ||
|
|
16b57b8e23 | ||
|
|
94bda53a8a | ||
|
|
77400dde8a | ||
|
|
d034b38f4f | ||
|
|
eb2ec54b49 | ||
|
|
7cfbba40f0 | ||
|
|
8abfdc43f1 | ||
|
|
465d1b7934 | ||
|
|
360eb38691 | ||
|
|
1d9d0b212f | ||
|
|
951b43eae9 | ||
|
|
d7fa595ed5 | ||
|
|
88aae03968 | ||
|
|
53fe09b382 | ||
|
|
8eb1f32c6d | ||
|
|
a80bd01a4e | ||
|
|
6ce7b41f3e | ||
|
|
5a64a34e85 | ||
|
|
18428a513a | ||
|
|
f90eccb9ee | ||
|
|
7f5f6d954e | ||
|
|
9bfdc19946 | ||
|
|
27cf2a7c00 | ||
|
|
dcc2c9babe | ||
|
|
7261d1f283 | ||
|
|
71a2f9b1b4 | ||
|
|
b4dfc7d502 | ||
|
|
16fa37ea0e | ||
|
|
8e3ec37117 | ||
|
|
44e7a8a942 | ||
|
|
7e6d1fae1b | ||
|
|
f727bf95f7 | ||
|
|
beefadd929 | ||
|
|
41903baf9c | ||
|
|
266f2e8900 | ||
|
|
725fbf78ee | ||
|
|
2c3f9cd668 | ||
|
|
95423cc26c | ||
|
|
3fee01a94d | ||
|
|
a304f91816 | ||
|
|
bcb8dcc601 | ||
|
|
869612a867 | ||
|
|
26599b4f6c | ||
|
|
c7818eec49 | ||
|
|
7dc0315b10 | ||
|
|
235645f5ae | ||
|
|
1a8f69c990 | ||
|
|
f66299705b | ||
|
|
95770b8a52 | ||
|
|
6c69d894d6 | ||
|
|
f2d2041d60 | ||
|
|
bad3e8f745 | ||
|
|
e826aee8b2 | ||
|
|
e0b68a22ff | ||
|
|
428e595e5f | ||
|
|
c7cf97a957 | ||
|
|
0c98e6d015 | ||
|
|
614e880a0f | ||
|
|
cd28b531e8 | ||
|
|
0a2f8facfc | ||
|
|
91a958dbac | ||
|
|
0bfb601dd3 | ||
|
|
67e8236a06 | ||
|
|
75f2d31bf9 | ||
|
|
54fd1c83bc | ||
|
|
af29051e9d | ||
|
|
0e3cd8fbc7 | ||
|
|
b404783fea | ||
|
|
333a39dc33 | ||
|
|
1fa6601623 | ||
|
|
3d12201501 | ||
|
|
7707bd7bf3 | ||
|
|
a4a03d8df2 | ||
|
|
bfe8f716a3 | ||
|
|
2e0f4eb757 | ||
|
|
c0d1b24d27 | ||
|
|
707138d5c1 | ||
|
|
e2d397dde3 | ||
|
|
ef9afbf96f | ||
|
|
1e925aeb75 | ||
|
|
538d0ef92e | ||
|
|
62bbb6b12e | ||
|
|
56c1fec40b | ||
|
|
03e2232857 | ||
|
|
2093b42879 | ||
|
|
060cd5c941 | ||
|
|
f119b1ef18 | ||
|
|
d945eee8be | ||
|
|
71d6760f48 | ||
|
|
b061b05d5f | ||
|
|
9372eddb95 | ||
|
|
f2929c1d34 | ||
|
|
c5c1788372 | ||
|
|
05b3c803f9 | ||
|
|
460e951154 | ||
|
|
ff963fade8 | ||
|
|
9f32ab7e78 | ||
|
|
cae5cb86bc | ||
|
|
df4099c0d2 | ||
|
|
929e39d1f5 | ||
|
|
fe8a6c4fba | ||
|
|
5840d1fc52 | ||
|
|
de45608faa | ||
|
|
f28775a5b5 | ||
|
|
110747ff92 | ||
|
|
599e872fba | ||
|
|
19b668de4c | ||
|
|
8c24e72c07 | ||
|
|
95d9667583 | ||
|
|
0c1e09100f | ||
|
|
1624139e91 | ||
|
|
25119c7069 | ||
|
|
fae1ef5ded | ||
|
|
0d151aa3af | ||
|
|
8ce4a9b366 | ||
|
|
197e36df46 | ||
|
|
9a034cd5f6 | ||
|
|
0ab4126c57 | ||
|
|
b4d448baa9 | ||
|
|
0a968cc348 | ||
|
|
65598e3f22 | ||
|
|
f654899b7f | ||
|
|
0b0241012c | ||
|
|
ec7f1a0fe4 | ||
|
|
32ebb1d7d2 | ||
|
|
d4d448d43e | ||
|
|
511e94cabf | ||
|
|
a2ddb585ec | ||
|
|
de25d81b21 | ||
|
|
e36d334579 | ||
|
|
ec656a2071 | ||
|
|
9179b87231 | ||
|
|
132e115d29 | ||
|
|
f09c0fdc4e | ||
|
|
96b51145a3 | ||
|
|
895fefcea4 | ||
|
|
bcb7c04e40 | ||
|
|
2a7093e1d0 | ||
|
|
86f5c8a98d | ||
|
|
168f8b7ef6 | ||
|
|
241e2e938d | ||
|
|
a2b68c02de | ||
|
|
e531447d6c | ||
|
|
b370259726 | ||
|
|
3ea24c97d2 | ||
|
|
2fb8b34580 | ||
|
|
5113a00581 | ||
|
|
e6f36dbe8a | ||
|
|
4732fe03d0 | ||
|
|
458813e132 | ||
|
|
246d0517a8 | ||
|
|
427df44180 | ||
|
|
baa2f9dbbb | ||
|
|
4d7e619078 | ||
|
|
37d62f2dda | ||
|
|
0e9f302117 | ||
|
|
fee4574b1e | ||
|
|
b4cf849016 | ||
|
|
8122479c40 | ||
|
|
1630079948 | ||
|
|
a46eaab34c | ||
|
|
7d375cbd91 | ||
|
|
fba628b4be | ||
|
|
9c118be041 | ||
|
|
7091574577 | ||
|
|
fb1700e148 | ||
|
|
b94cf34372 | ||
|
|
a10b1434f3 | ||
|
|
f301984f51 | ||
|
|
2cef32fd2f | ||
|
|
1c32aebf8c | ||
|
|
752875e49d | ||
|
|
2c89c5656a | ||
|
|
950acfe8c8 | ||
|
|
3994918412 | ||
|
|
f34da2c072 | ||
|
|
8aa0a33dbb | ||
|
|
67210b0a6a | ||
|
|
1a5e5264fa | ||
|
|
8888dcec36 | ||
|
|
1ece6a3995 | ||
|
|
23b2098607 | ||
|
|
6f9279ca14 | ||
|
|
4af6809755 | ||
|
|
560d210c7a | ||
|
|
4434b73f46 | ||
|
|
fde4ed5b30 | ||
|
|
35403891ae | ||
|
|
461e06e27e | ||
|
|
572a3f9b89 | ||
|
|
1901515e92 | ||
|
|
b58d8b8c8d | ||
|
|
048578ab4c | ||
|
|
7b308a271e | ||
|
|
73b50bef3f | ||
|
|
75597cc3bf | ||
|
|
ec41b2150e | ||
|
|
ab1000bdd8 | ||
|
|
b72f8f6dda | ||
|
|
391c9b2965 | ||
|
|
ad8b827602 | ||
|
|
126d5866e1 | ||
|
|
88a23cedf7 | ||
|
|
658ed67342 | ||
|
|
54057e970a | ||
|
|
36d3063ff9 | ||
|
|
dfd55ed906 | ||
|
|
0a77ee90ee | ||
|
|
b222cb83eb | ||
|
|
29298b3d5f | ||
|
|
8cf08e5f3b | ||
|
|
08cbc417c3 | ||
|
|
98a41d86d0 | ||
|
|
dcc3e89174 | ||
|
|
48e09d5896 | ||
|
|
b0198ab8c0 | ||
|
|
e87ca3d5a8 | ||
|
|
edaed47358 | ||
|
|
334ce65cd8 | ||
|
|
2ffd1f5d24 | ||
|
|
2c83618fae | ||
|
|
1365d1a03a | ||
|
|
4766fdfaaa | ||
|
|
3e5fa60b4f | ||
|
|
88cef8693f | ||
|
|
fb6502be2f | ||
|
|
1ce5c6ff00 | ||
|
|
a5443a6247 | ||
|
|
aee9d1dc3b | ||
|
|
cc52f2f494 | ||
|
|
8347a21976 | ||
|
|
6444c30ae2 | ||
|
|
8e3686dcca | ||
|
|
88ac42587d | ||
|
|
90d12c7929 | ||
|
|
756e50ccf6 | ||
|
|
34d2c23324 | ||
|
|
40191136ba | ||
|
|
d91e3e7965 | ||
|
|
65357f0d45 | ||
|
|
0b099fcd3c | ||
|
|
15fb7210b5 | ||
|
|
90504c0387 | ||
|
|
23a5668d8f | ||
|
|
1dcd1e5cfc | ||
|
|
3396fb9118 | ||
|
|
1ff2179d2e | ||
|
|
c7fcf97d8c | ||
|
|
c64f8bd56a | ||
|
|
d3465f226c | ||
|
|
d11a695425 | ||
|
|
f4d332756d | ||
|
|
24fe102997 | ||
|
|
c8fbee9bb5 | ||
|
|
b83530ac8d | ||
|
|
ee5f616853 | ||
|
|
1ee4350153 | ||
|
|
186809f8fc | ||
|
|
700a94f653 | ||
|
|
8ca058d77c | ||
|
|
8ef66552a1 | ||
|
|
81627a7505 | ||
|
|
93fc77e39d | ||
|
|
fda3dbb06c | ||
|
|
3fa8315508 | ||
|
|
23338b9d59 | ||
|
|
adbc48bcc9 | ||
|
|
4add364a4e | ||
|
|
f20408777a | ||
|
|
b9fa80313e | ||
|
|
7a62176b20 | ||
|
|
b53571c526 | ||
|
|
54c7be0069 | ||
|
|
a286e88109 | ||
|
|
572075e879 | ||
|
|
a175581eb6 | ||
|
|
aeb2ee7ffe | ||
|
|
28e068244d | ||
|
|
85a2a2ffa3 | ||
|
|
b0143d81f3 | ||
|
|
f3e6552ce0 | ||
|
|
d38934cc1f | ||
|
|
bcd0303571 | ||
|
|
f3471ba931 | ||
|
|
22f822a340 | ||
|
|
50e6445e91 | ||
|
|
b50a6304cc | ||
|
|
be6e41419a | ||
|
|
aef87bfcf7 | ||
|
|
f3d723f343 | ||
|
|
31e63f1ce7 | ||
|
|
a7c8aa6695 | ||
|
|
fd9b7b8e97 | ||
|
|
7723c36577 | ||
|
|
e1966cb326 | ||
|
|
8613125969 | ||
|
|
23a50a9b79 | ||
|
|
04c3ae8020 | ||
|
|
1c84c4431f | ||
|
|
eca47868f0 | ||
|
|
20718948b7 | ||
|
|
ba7f792de1 | ||
|
|
594d3b9023 | ||
|
|
d3dcee62b0 | ||
|
|
4898e66aff | ||
|
|
abd081d9a4 | ||
|
|
82d4d8020f | ||
|
|
53abe14ecf | ||
|
|
9d88012358 | ||
|
|
e76bbc5295 | ||
|
|
f2d987a63d | ||
|
|
bd510b68e4 | ||
|
|
159f8b6628 | ||
|
|
f8d849930f | ||
|
|
684d020fb9 | ||
|
|
6435022be5 | ||
|
|
bc61916100 | ||
|
|
fedb5c6353 | ||
|
|
7a6234405c | ||
|
|
faaf2dd356 | ||
|
|
aa428375b8 | ||
|
|
97716ce543 | ||
|
|
ac0bab8498 | ||
|
|
4a306f73a6 | ||
|
|
fdfb1fcbe2 | ||
|
|
26be45c0f8 | ||
|
|
3ee0e176bc | ||
|
|
ff738d87d9 | ||
|
|
7ab75dc72e | ||
|
|
c42b48d349 | ||
|
|
2e67ea193d | ||
|
|
c07f1e0966 | ||
|
|
e8bf6c0a94 | ||
|
|
ca20e19104 | ||
|
|
054e1c81fe | ||
|
|
f2a10a9536 | ||
|
|
65a26b6e38 | ||
|
|
c4a388d4a1 | ||
|
|
bdaa7a483c | ||
|
|
327e134760 | ||
|
|
ec0f5c2a81 | ||
|
|
be48e326ca | ||
|
|
8b6a07b7ba | ||
|
|
26f66c4953 | ||
|
|
59f2b7c2e6 | ||
|
|
7e7ce3bb8f | ||
|
|
8ef8d3f2da | ||
|
|
6eae385b74 | ||
|
|
6d60062a7b | ||
|
|
55fb237e61 | ||
|
|
22829267ec | ||
|
|
945d779d12 | ||
|
|
0e993a1d7c | ||
|
|
31d005a3e4 | ||
|
|
da378a1d07 | ||
|
|
372f424399 | ||
|
|
f9adc44920 | ||
|
|
94f4c11942 | ||
|
|
27eb7f27be | ||
|
|
88ec961edf | ||
|
|
a4e994c039 | ||
|
|
bbdb152b2c | ||
|
|
ae0232d276 | ||
|
|
c5058ebee1 | ||
|
|
6d54904951 | ||
|
|
8aa5ed1e03 | ||
|
|
97b08f5483 | ||
|
|
54bbc283b1 | ||
|
|
510c2045d9 | ||
|
|
6264e81b85 | ||
|
|
1ecfe03852 | ||
|
|
a5f07a06f4 | ||
|
|
3d32af7ec6 | ||
|
|
6bfbad38af | ||
|
|
527786c0f3 | ||
|
|
8e01dbe90b | ||
|
|
359705c08d | ||
|
|
af41c94526 | ||
|
|
89de21d6a6 | ||
|
|
ea2a56acf5 | ||
|
|
ebce3647df | ||
|
|
ee9b50b0cb | ||
|
|
502fe74232 | ||
|
|
e42fe2628e | ||
|
|
28557ee271 | ||
|
|
950bff839f | ||
|
|
b3d4d162b3 | ||
|
|
2373eaccf1 | ||
|
|
9c87d5cabe | ||
|
|
363edba137 | ||
|
|
7401f4b7cf | ||
|
|
8b638d90be | ||
|
|
be0266ab8d | ||
|
|
8f94829fa3 | ||
|
|
84d17a5f72 | ||
|
|
4ff114bcfa | ||
|
|
0a4d1f114e | ||
|
|
7050029b5d | ||
|
|
b8d6bdf224 | ||
|
|
cc69607936 | ||
|
|
7fd0720ea1 | ||
|
|
919c89d5ee | ||
|
|
289149412b | ||
|
|
5b33aee802 | ||
|
|
6eb1f8add6 | ||
|
|
e8b73732d9 | ||
|
|
515c541079 | ||
|
|
b51b198697 | ||
|
|
49a0d4977c | ||
|
|
fc715bb56c | ||
|
|
5b632ffd58 | ||
|
|
bfab478873 | ||
|
|
96f847fa8f | ||
|
|
1f2ed12d07 | ||
|
|
cdbe9d2c23 | ||
|
|
df8d210c7e | ||
|
|
6c92429b55 | ||
|
|
1b9d47274a | ||
|
|
ff84677102 | ||
|
|
97335c7baa | ||
|
|
3fb051b8da | ||
|
|
3c2425daf5 | ||
|
|
0ef23ec9f1 | ||
|
|
72edb9426b | ||
|
|
369a6bd1e9 | ||
|
|
80257dfa77 | ||
|
|
4b2b9999f0 | ||
|
|
d01a2d759e | ||
|
|
a3e3b81db4 | ||
|
|
4b8c53d243 | ||
|
|
04bdc2a9f9 | ||
|
|
c3fadab01e | ||
|
|
9d5178360d | ||
|
|
c16cdea67e | ||
|
|
b25238baa9 | ||
|
|
de5d4dbed6 | ||
|
|
e7e70d9272 | ||
|
|
f8c4a65d99 | ||
|
|
89e8472e0f | ||
|
|
b81d389020 | ||
|
|
e2230c1c15 | ||
|
|
d000b8f809 | ||
|
|
e935c6dd5c | ||
|
|
4cb47f2e97 | ||
|
|
26e7d33b2c | ||
|
|
fe41bc4ab1 | ||
|
|
5d98cedeb1 | ||
|
|
eaf10517ec | ||
|
|
27229d1511 | ||
|
|
f094632d0c | ||
|
|
b18e55c498 | ||
|
|
c765962f8c | ||
|
|
22c533560c | ||
|
|
1a5657ba73 | ||
|
|
01d2f98f1e | ||
|
|
39ae0c9d43 | ||
|
|
a16c80b107 | ||
|
|
498f3e67a7 | ||
|
|
feef1367c6 | ||
|
|
4ba944c3eb | ||
|
|
e4d7cbfe2c | ||
|
|
10255ac477 | ||
|
|
28d5d87741 | ||
|
|
e938b8a1dd | ||
|
|
375589d028 | ||
|
|
2a28f06a75 | ||
|
|
5335463d44 | ||
|
|
c37742de0e | ||
|
|
ad57103fed | ||
|
|
aefa752cf9 | ||
|
|
7604f6792f | ||
|
|
3a6894cdd2 | ||
|
|
e522dd5788 | ||
|
|
6d1b29d7c6 | ||
|
|
fbd7290478 | ||
|
|
aa62b5ebe9 | ||
|
|
d21c58867e | ||
|
|
a72f9c1931 | ||
|
|
5caae0e6e9 | ||
|
|
ecba1a2fd4 | ||
|
|
bb802969d7 | ||
|
|
e8f72804f5 | ||
|
|
df7bafeb44 | ||
|
|
57dc5832a7 | ||
|
|
dc6c3bfe71 | ||
|
|
4bcdfb0c5d | ||
|
|
32fc058177 | ||
|
|
c8110e814c | ||
|
|
0a32c93dd5 | ||
|
|
9f30306d44 | ||
|
|
e7b480369b | ||
|
|
b077de1862 | ||
|
|
5c3a0414d0 | ||
|
|
dc30938cbc | ||
|
|
a14da4dfe3 | ||
|
|
2dc66b6bcc | ||
|
|
cfa0f8850d | ||
|
|
f50f714c92 | ||
|
|
56750fbaed | ||
|
|
3314ac96e3 | ||
|
|
7f0c97febf | ||
|
|
81597e4e64 | ||
|
|
4535fd3b8b | ||
|
|
2171b9622d | ||
|
|
e9feeb822a | ||
|
|
47308e7a14 | ||
|
|
a9ec9aa0ae | ||
|
|
4ff8dc478f | ||
|
|
e8a7af858a | ||
|
|
483f7d3222 | ||
|
|
eb6fa7e4af | ||
|
|
7a04c30907 | ||
|
|
cd5e9a5fd2 | ||
|
|
ec9e232d87 | ||
|
|
dee970724d | ||
|
|
60ade804fe | ||
|
|
e38f95a5ad | ||
|
|
5b7d5add43 | ||
|
|
11b19b264f | ||
|
|
c14090b8f4 | ||
|
|
457697f039 | ||
|
|
47515fa348 | ||
|
|
9df4b2b9b4 | ||
|
|
8672ffbe0b | ||
|
|
97842a346d | ||
|
|
c31ae4f8f4 | ||
|
|
ddbb355d96 | ||
|
|
91166f54fd | ||
|
|
cfa076f2ee | ||
|
|
c4f4a2c3ef | ||
|
|
9cb031adaa | ||
|
|
22b87358a2 | ||
|
|
7f1573dacd | ||
|
|
30b75cef3b | ||
|
|
9b071acc7c | ||
|
|
9b15b5cde3 | ||
|
|
2a24e4dbeb | ||
|
|
b5cd7336d9 | ||
|
|
db2671e28b | ||
|
|
0fe8d9889b | ||
|
|
d0c04bd6f5 | ||
|
|
95612d5db3 | ||
|
|
8b169ba4b7 | ||
|
|
9604d86756 | ||
|
|
7c1c878e2c | ||
|
|
80ec775b61 | ||
|
|
97f75f1589 | ||
|
|
5ae54e42b6 | ||
|
|
bb4770af4b | ||
|
|
38e42968fa | ||
|
|
6aad61d9ed | ||
|
|
52e72ee34b | ||
|
|
0c92e3ec86 | ||
|
|
fc52e9216e | ||
|
|
578583e31b | ||
|
|
37c457c0c7 | ||
|
|
f56006254e | ||
|
|
773c63eb49 | ||
|
|
c5f3e70cc3 | ||
|
|
d6fe68eaea | ||
|
|
bdb2664a81 | ||
|
|
12cd55a62e | ||
|
|
71b8520be6 | ||
|
|
f0d8e44f7c | ||
|
|
35a6b461d7 | ||
|
|
3e5624ac6b | ||
|
|
56163a78a4 | ||
|
|
7eac86ef6d | ||
|
|
505956c6f9 | ||
|
|
65a79bc548 | ||
|
|
ab27d9b08f | ||
|
|
3d34368dbe | ||
|
|
88c5e317c6 | ||
|
|
56cbc978fc | ||
|
|
7d0b46ec00 | ||
|
|
b935ba95eb | ||
|
|
d575eae926 | ||
|
|
5dc8ef5b47 | ||
|
|
bd094a4d5b | ||
|
|
bdf798068e | ||
|
|
b7559da532 | ||
|
|
84d2884b72 | ||
|
|
68503f2af2 | ||
|
|
97c0ca462d | ||
|
|
222d874de4 | ||
|
|
c215f94a2c | ||
|
|
e61571f3bd | ||
|
|
6ec405c989 | ||
|
|
a260633ad6 | ||
|
|
8bc23f5d28 | ||
|
|
a6fc4dfcc6 | ||
|
|
68d6acdd04 | ||
|
|
a5c30009e3 | ||
|
|
731705eee1 | ||
|
|
c2dbda9b6a | ||
|
|
66b99d9639 | ||
|
|
162be7f88c | ||
|
|
f2bd8c74dd | ||
|
|
705d27d642 | ||
|
|
5bcfe3dc38 | ||
|
|
a979061f86 | ||
|
|
d836647376 | ||
|
|
7a86e8704d | ||
|
|
1443ce8c38 | ||
|
|
47f3617541 | ||
|
|
c622a8abf8 | ||
|
|
22e656c9f3 | ||
|
|
26fb954458 | ||
|
|
3c1c589a24 | ||
|
|
6dbc7987d7 | ||
|
|
2ec4d9be58 | ||
|
|
cfeffb1afe | ||
|
|
d9a2f80281 | ||
|
|
49afd7d4c5 | ||
|
|
048815f32e | ||
|
|
2dbca202b7 | ||
|
|
41824b9b20 | ||
|
|
ca9902cec7 | ||
|
|
ec4093dc4d | ||
|
|
78ae4d647c | ||
|
|
67d2e3d65b | ||
|
|
77c72d5e40 | ||
|
|
a882df74e0 | ||
|
|
1e15565b37 | ||
|
|
2e9812bf9c | ||
|
|
200f4e28ad | ||
|
|
159347cef1 | ||
|
|
10c4c45137 | ||
|
|
e2f96f3eab | ||
|
|
d762172729 | ||
|
|
17a42cc769 | ||
|
|
b578ab0bf4 | ||
|
|
f49b7e0d1d | ||
|
|
e54b49ac4c | ||
|
|
73fef1b0b8 | ||
|
|
a78b99890e | ||
|
|
3161c7248d | ||
|
|
83bb4a0dff | ||
|
|
b47471880d | ||
|
|
efcc676b0b | ||
|
|
8a2eca39ce | ||
|
|
4ef817295e | ||
|
|
4502f10789 | ||
|
|
6e6c13123e | ||
|
|
b7df488618 | ||
|
|
980969ec59 | ||
|
|
5ff23db284 | ||
|
|
d2c353280e | ||
|
|
08da518c19 | ||
|
|
52e4b9eda3 | ||
|
|
8fe34cec06 | ||
|
|
ac0b8125e0 | ||
|
|
594dc58322 | ||
|
|
041354e665 | ||
|
|
bce0072026 | ||
|
|
10a88d5c86 | ||
|
|
664cfb8d6b | ||
|
|
5c7bda3752 | ||
|
|
80f89e0634 | ||
|
|
89435af570 | ||
|
|
c6c03ee21f | ||
|
|
3406400ae0 | ||
|
|
c8d43b84d8 | ||
|
|
d3b425470b | ||
|
|
7932b157c2 | ||
|
|
ff7cb41475 | ||
|
|
0f1448f9c3 | ||
|
|
45ab995a3a | ||
|
|
226712b467 | ||
|
|
366c45a2ec | ||
|
|
7c24f28f24 | ||
|
|
ac6bb9ff05 | ||
|
|
f196b77478 | ||
|
|
5418bfb8e8 | ||
|
|
f5dad061ee | ||
|
|
252cf5e319 | ||
|
|
f0e81aff07 | ||
|
|
d4c28bc485 | ||
|
|
927b581838 | ||
|
|
75fa316cfd | ||
|
|
c513733526 | ||
|
|
4edb920536 | ||
|
|
6c4c2a2432 | ||
|
|
71b745b612 | ||
|
|
9e81213746 | ||
|
|
09ae1a46d6 | ||
|
|
8840ab4bd7 | ||
|
|
63bbacc4ab | ||
|
|
c2d7c5bbcd | ||
|
|
dd4ac1654b | ||
|
|
3b2b5e1d1b | ||
|
|
a17226d419 | ||
|
|
1ea37fcf4f | ||
|
|
a998d21f71 | ||
|
|
8bdaeaa4c1 | ||
|
|
a881942e60 | ||
|
|
9f2abcd020 | ||
|
|
4e8a00e6b0 | ||
|
|
ad984d169b | ||
|
|
c9a10a9419 | ||
|
|
2fa611607b | ||
|
|
60ead966fb | ||
|
|
f3db15d2c9 | ||
|
|
3e071d1f9a | ||
|
|
1af1d38775 | ||
|
|
3c098ab96f | ||
|
|
6fe1cbaa94 | ||
|
|
13f646e8c4 | ||
|
|
3e493b1bca | ||
|
|
61f7f49070 | ||
|
|
a99b41c816 | ||
|
|
2afb128ebc | ||
|
|
d816a658e9 | ||
|
|
7f225a69a7 | ||
|
|
0a726e9021 | ||
|
|
980f0e9d5e | ||
|
|
aac27d834d | ||
|
|
5e0261c0eb | ||
|
|
fab8975463 | ||
|
|
dc4be43b57 | ||
|
|
8ce9da0e9c | ||
|
|
9eb550dc82 | ||
|
|
4c4d902075 | ||
|
|
586598297b | ||
|
|
eae6287d76 | ||
|
|
6ff807bd47 | ||
|
|
a41999e513 | ||
|
|
6b1be41055 | ||
|
|
0e070f8e1e | ||
|
|
50eeff67b0 | ||
|
|
d7fb3f1261 | ||
|
|
15001ba6c1 | ||
|
|
c42f0e1de0 | ||
|
|
5e2dcccb71 | ||
|
|
c84512a89e | ||
|
|
44aa7f9257 | ||
|
|
897c8052ee | ||
|
|
a6f9c30ac4 | ||
|
|
a2cee38fd3 | ||
|
|
f06c30d2f3 | ||
|
|
678f200b5b | ||
|
|
98af8856a9 | ||
|
|
3ab262e3da | ||
|
|
cb48077b31 | ||
|
|
7627338fb9 | ||
|
|
ed6f173da4 | ||
|
|
b3c0868343 | ||
|
|
8048346e7d | ||
|
|
e3e0a66adf | ||
|
|
fdabd59b7c | ||
|
|
2ba7fbfb94 | ||
|
|
0886db7ba6 | ||
|
|
d7ae96327b | ||
|
|
be2f5c3ee3 | ||
|
|
08e41b49cf | ||
|
|
6ed5e32a5d | ||
|
|
3813fe12c4 | ||
|
|
d2d9fee4bc | ||
|
|
68f53b8be1 | ||
|
|
80f4553a37 | ||
|
|
4907218145 | ||
|
|
98f67ebcfb | ||
|
|
e730b6e3ee | ||
|
|
c5eca33917 | ||
|
|
6e734eeedd | ||
|
|
50d95cc5c8 | ||
|
|
efe06fcecd | ||
|
|
a0b8992ea3 | ||
|
|
b068d0fb13 | ||
|
|
3161a5bed0 | ||
|
|
fa986e8cad | ||
|
|
a0e1884b54 | ||
|
|
a376881fc2 | ||
|
|
653799a4d8 | ||
|
|
377717d6e1 | ||
|
|
fda6c55176 | ||
|
|
4ccca8e7a8 | ||
|
|
d74107c05d | ||
|
|
be7458e4ce | ||
|
|
cf8d65a35d | ||
|
|
c604f054b9 | ||
|
|
363197ab7b | ||
|
|
9e373c89b8 | ||
|
|
4026c92b1b | ||
|
|
a3d5864e42 | ||
|
|
a968ee6fcd | ||
|
|
f918d0c0f7 | ||
|
|
5bfd409b6e | ||
|
|
d13ff164bf | ||
|
|
852cc013ac | ||
|
|
da87ffb3ae | ||
|
|
ba2dbba0cb | ||
|
|
7ace7af0b7 | ||
|
|
7365cbf830 | ||
|
|
d7fdac673c | ||
|
|
f305a7790d | ||
|
|
3f9809d6fc | ||
|
|
64cf7a314c | ||
|
|
5b9b7bb7ce | ||
|
|
643d5348cc | ||
|
|
936e29a1f3 | ||
|
|
a0149c995b | ||
|
|
f3c9a00c1c | ||
|
|
7866903555 | ||
|
|
e7c0edc734 | ||
|
|
2e0d90fc96 | ||
|
|
32c2185ff5 | ||
|
|
0d46b971f6 | ||
|
|
01a2f09e18 | ||
|
|
095de965c1 | ||
|
|
86c9680425 | ||
|
|
73b4f7873a | ||
|
|
00771be4e0 | ||
|
|
a3eeb76fe3 | ||
|
|
7b028a237c | ||
|
|
978dd8a7f5 | ||
|
|
9302109e72 | ||
|
|
534147a368 | ||
|
|
736c0fc956 | ||
|
|
e40b8e352e | ||
|
|
d120cca2f5 | ||
|
|
203257f3d7 | ||
|
|
432e3e0b1c | ||
|
|
a8857e6cba | ||
|
|
ac2094f975 | ||
|
|
088dac5743 | ||
|
|
d7faf88f39 | ||
|
|
11e653b85b | ||
|
|
9aa6ac8867 | ||
|
|
d0bf651ff9 | ||
|
|
87d33fba1a | ||
|
|
3cb3ea3902 | ||
|
|
e0ca7cb729 | ||
|
|
aed9670c57 | ||
|
|
5ae0f745a5 | ||
|
|
5e831e92dd | ||
|
|
d7c60b490b | ||
|
|
ca339aef1b | ||
|
|
a4b94b8e72 | ||
|
|
8b39e31ec3 | ||
|
|
db03b15e33 | ||
|
|
b260f1fffb | ||
|
|
57f5f598cb | ||
|
|
89be375da0 | ||
|
|
1132ee99e3 | ||
|
|
81effdd09b | ||
|
|
e785589e7b | ||
|
|
fd0d2a5489 | ||
|
|
21a0ccd612 | ||
|
|
ab3798a11d | ||
|
|
6e09787828 | ||
|
|
66368f2a91 | ||
|
|
a152681256 | ||
|
|
ee642f57f3 | ||
|
|
9726f64d2b | ||
|
|
abe3502ea7 | ||
|
|
9c5dcfdd76 | ||
|
|
d28f9eb1b9 | ||
|
|
d7cf910a03 | ||
|
|
2f3149e0a0 | ||
|
|
947f75098c | ||
|
|
378b5761d8 | ||
|
|
eea056aefd | ||
|
|
ebb8e3f816 | ||
|
|
4bbc9a5091 | ||
|
|
59d92024a2 | ||
|
|
e70a229a70 | ||
|
|
97d13bee18 | ||
|
|
1ebcebe762 | ||
|
|
4f0e303ff1 | ||
|
|
0f3086777c | ||
|
|
417dd585d3 | ||
|
|
8e728a1612 | ||
|
|
923fbbd9ed | ||
|
|
071ef69726 | ||
|
|
d05efa5b3b | ||
|
|
c5507af63c | ||
|
|
7afd470477 | ||
|
|
5c1f1f43f8 | ||
|
|
c0259d6f04 | ||
|
|
edd91aeb36 | ||
|
|
a372b4c3ec | ||
|
|
6aabe0fde7 | ||
|
|
3d4a904fe9 | ||
|
|
96fad23879 | ||
|
|
038488c0c4 | ||
|
|
2966aac16d | ||
|
|
18f8c34d4a | ||
|
|
8348d92e56 | ||
|
|
431e12a033 | ||
|
|
591e3f031d | ||
|
|
096350cf33 | ||
|
|
bab33460ab | ||
|
|
75ad54c9a2 | ||
|
|
c3396a6c8d | ||
|
|
08ea1440cf | ||
|
|
b1aa4a5c8b | ||
|
|
e780693add | ||
|
|
dfff06af91 | ||
|
|
81f45896d0 | ||
|
|
84667bff70 | ||
|
|
76b264dd7e | ||
|
|
3763d5c164 | ||
|
|
ec0faf1bd9 | ||
|
|
c0cf16f988 | ||
|
|
af40a25c52 | ||
|
|
505520ab09 | ||
|
|
797d4df6fd | ||
|
|
c6ec6fb82a | ||
|
|
34d41d8aa5 | ||
|
|
68a8dbb256 | ||
|
|
9292fee76f | ||
|
|
4a5eaaeb76 | ||
|
|
4de6308f6e | ||
|
|
5fa401d531 | ||
|
|
6648d60246 | ||
|
|
f7fbc91be3 | ||
|
|
2cf40e99f2 | ||
|
|
7d3280143c | ||
|
|
59eb392351 | ||
|
|
4e65528940 | ||
|
|
4925f7773c | ||
|
|
484ed5a521 | ||
|
|
3c56cb9977 | ||
|
|
8bfc141157 | ||
|
|
f467e1fce3 | ||
|
|
d66739931b | ||
|
|
eb83a56f8e | ||
|
|
86ad4e06b8 | ||
|
|
09f818bc20 | ||
|
|
bacac52eec | ||
|
|
47b0cfcbd2 | ||
|
|
3eaf0e07d2 | ||
|
|
0888eb4a00 | ||
|
|
928640dee0 | ||
|
|
422e41606b | ||
|
|
fb23cd0627 | ||
|
|
c277aaf3b4 | ||
|
|
8e0fbea741 | ||
|
|
1db665cda9 | ||
|
|
ef132d1337 | ||
|
|
063e4b44c0 | ||
|
|
38ecac9dd0 | ||
|
|
99f94354a6 | ||
|
|
a00157c44f | ||
|
|
b15f3515f3 | ||
|
|
66548863a4 | ||
|
|
c3934db151 | ||
|
|
550181a96b | ||
|
|
4db08588cc | ||
|
|
7bf2ef9dba | ||
|
|
aecbdde3c0 | ||
|
|
b745b98f3d | ||
|
|
5a57c953c9 | ||
|
|
61da5a9da8 | ||
|
|
6c7d27c711 | ||
|
|
3f379e3d70 | ||
|
|
ac49eb0c8a | ||
|
|
c857ac5840 | ||
|
|
749e093591 | ||
|
|
4a89b1b7c5 | ||
|
|
2e64e25ee1 | ||
|
|
b0e77e6afa | ||
|
|
46465a7942 | ||
|
|
273ba95485 | ||
|
|
bb958098f4 | ||
|
|
8251a1b736 | ||
|
|
c6e8eae7ae | ||
|
|
6b13b265e4 | ||
|
|
7769aa0f98 | ||
|
|
8d343fa60b | ||
|
|
e674d6f6c0 | ||
|
|
67065d00a1 | ||
|
|
ee84fc714a | ||
|
|
f4395e232b | ||
|
|
1d0a91aecb | ||
|
|
906b095592 | ||
|
|
0690168116 | ||
|
|
d3abc6e3ae | ||
|
|
4991298fb0 | ||
|
|
fbd0514a1f | ||
|
|
c54aaca680 | ||
|
|
fa3b63fe82 | ||
|
|
8e5174caeb | ||
|
|
fa158da45d | ||
|
|
641fce93e7 | ||
|
|
053941b983 | ||
|
|
ca9192e2fa | ||
|
|
a7bb8bb27c | ||
|
|
bc0c7045f4 | ||
|
|
1296894d25 | ||
|
|
028efd8242 | ||
|
|
d4f1cbbd3a | ||
|
|
cfa0d361b7 | ||
|
|
3ff53a8228 | ||
|
|
a151e92947 | ||
|
|
04a3125f02 | ||
|
|
0b58392719 | ||
|
|
59eb641bdf | ||
|
|
6314165e4d | ||
|
|
7c41737e39 | ||
|
|
a8d678d26d | ||
|
|
eb80bec044 | ||
|
|
bca90f9ef7 | ||
|
|
99e7e46da1 | ||
|
|
0faed417e5 | ||
|
|
dbc3625a80 | ||
|
|
a28f3fc568 | ||
|
|
28405f1f75 | ||
|
|
d19edaf43f | ||
|
|
299e560a2e | ||
|
|
f2db112964 | ||
|
|
887e242cea | ||
|
|
09680b7c6f | ||
|
|
1ebec13091 | ||
|
|
402053e9fe | ||
|
|
bcb5bc6742 | ||
|
|
3f7e0f708f | ||
|
|
9e2a305918 | ||
|
|
86fce15f71 | ||
|
|
cb00284d6e | ||
|
|
ccb1d5c533 | ||
|
|
677e9dd036 | ||
|
|
6c2197080c | ||
|
|
9fc237736e | ||
|
|
a3843bfe99 | ||
|
|
a719121aa1 | ||
|
|
3b332f4c57 | ||
|
|
e8dfc3f138 | ||
|
|
7eb5bdadcd | ||
|
|
0c65678e6c | ||
|
|
fc7fd14395 | ||
|
|
f47914ea05 | ||
|
|
475054f8bd | ||
|
|
ec24b8bc6e | ||
|
|
84af8a13bb | ||
|
|
f15d20d9c7 | ||
|
|
7fbdeedd6a | ||
|
|
3e4795c48b | ||
|
|
9da6cc96ed | ||
|
|
ec89f279f8 | ||
|
|
fda7b81f8d | ||
|
|
43bf55b363 | ||
|
|
847313fa93 | ||
|
|
026ced56b9 | ||
|
|
0d47a71887 | ||
|
|
16ad748b26 | ||
|
|
7ef83ea2e9 | ||
|
|
2914126d41 | ||
|
|
1c51d71eda | ||
|
|
15e36316ed | ||
|
|
2de3d4c238 | ||
|
|
e255e8a23e | ||
|
|
4ec4a516f5 | ||
|
|
2d3bb10b74 | ||
|
|
b6b9199396 | ||
|
|
c6243a942d | ||
|
|
2d0c00ff5f | ||
|
|
66e5f13e7a | ||
|
|
ae758ab46b | ||
|
|
7bec849a07 | ||
|
|
873752cd76 | ||
|
|
3f1bfac9c6 | ||
|
|
03b7d8d850 | ||
|
|
af08cd716d | ||
|
|
c6ed4c399a | ||
|
|
77ff594df3 | ||
|
|
6c6ba30cfa | ||
|
|
470090fc4a | ||
|
|
9a6a24d944 | ||
|
|
6920f879b0 | ||
|
|
7e16557875 | ||
|
|
68977f5138 | ||
|
|
549cca35ad | ||
|
|
a135f4f52c | ||
|
|
967bc9e1c7 | ||
|
|
f08a02dac5 | ||
|
|
78f8583063 | ||
|
|
f489746d4b | ||
|
|
0ae7410b24 | ||
|
|
fbf582220e | ||
|
|
401bb5b6a9 | ||
|
|
d983ce1e4a | ||
|
|
f6666c2283 | ||
|
|
cfef19ea19 | ||
|
|
69701e2fac | ||
|
|
d4d8154daf | ||
|
|
62836254be | ||
|
|
620a9086db | ||
|
|
0c06581bee | ||
|
|
c46aa40cca | ||
|
|
681efe652e | ||
|
|
fbee3af6ad | ||
|
|
2ac8459187 | ||
|
|
77d514201c | ||
|
|
d42f4b1414 | ||
|
|
f065f551a9 | ||
|
|
97d57e3052 | ||
|
|
6c3b947799 | ||
|
|
503e3053ee | ||
|
|
8493fd310e | ||
|
|
3f8034d75a | ||
|
|
aa4a55ac97 | ||
|
|
6bb42f8d7f | ||
|
|
3eea06a2b3 | ||
|
|
51797185e0 | ||
|
|
79f540894a | ||
|
|
8538eacf16 | ||
|
|
e05a901cdc | ||
|
|
731ad0ef1d | ||
|
|
efd3268550 | ||
|
|
a2d7e004d4 | ||
|
|
6df222cbcd | ||
|
|
aa9cff0400 | ||
|
|
d9a50e2d94 | ||
|
|
7118da8954 | ||
|
|
3d15e3f722 | ||
|
|
1b0b5fa224 | ||
|
|
e630b17282 | ||
|
|
11045c4399 | ||
|
|
ba13aba3a0 | ||
|
|
110e66b0c2 | ||
|
|
91e09d0959 | ||
|
|
eb8d0671f8 | ||
|
|
6410396372 | ||
|
|
789f74bba2 | ||
|
|
06a30111a8 | ||
|
|
f3b3ca41f7 | ||
|
|
ea5ea8da3d | ||
|
|
6d54ec5e24 | ||
|
|
b6f1106630 | ||
|
|
bfeeeb9f34 | ||
|
|
084a871019 | ||
|
|
6f79b52dfa | ||
|
|
54e221af43 | ||
|
|
428bb7cca0 | ||
|
|
6195349b50 | ||
|
|
896300be30 | ||
|
|
a168cbef13 | ||
|
|
760ad8f65c | ||
|
|
64a7ad038d | ||
|
|
fac8b716ab | ||
|
|
90c980b105 | ||
|
|
f028e4e68e | ||
|
|
e4e216f8cc | ||
|
|
71ad8ff26e | ||
|
|
95eaf3aada | ||
|
|
6051ebea33 | ||
|
|
d14beab331 | ||
|
|
445d37f24d | ||
|
|
fbc1d53416 | ||
|
|
7f04efa1a8 | ||
|
|
f8d42c5ec6 | ||
|
|
44e3dc083a | ||
|
|
e40beab163 | ||
|
|
ba78815203 | ||
|
|
22698eef45 | ||
|
|
7435fd6be9 | ||
|
|
0bc9d1d6f1 | ||
|
|
78aabf66ff | ||
|
|
e13b5ea614 | ||
|
|
5a836dc690 | ||
|
|
c847a62be6 | ||
|
|
35b359cdeb | ||
|
|
8f1d602a58 | ||
|
|
4f5a9c99f8 | ||
|
|
742d555754 | ||
|
|
ff2b31e9a3 | ||
|
|
788710fa44 | ||
|
|
0cd79860ec | ||
|
|
7bb1fe976b | ||
|
|
355ba680e6 | ||
|
|
1da0724a98 | ||
|
|
5919c4d1e9 | ||
|
|
ac58cbc764 | ||
|
|
0a76b9bcd8 | ||
|
|
660f01011c | ||
|
|
aef50770ba | ||
|
|
44c2e4cdbf | ||
|
|
d0a716f709 | ||
|
|
af514a1155 | ||
|
|
922fc6bf1d | ||
|
|
241526af3d | ||
|
|
4a9fb02aca | ||
|
|
21479f9ebc | ||
|
|
f56b7aaef2 | ||
|
|
555a6ce980 | ||
|
|
63f2530a04 | ||
|
|
97ca53e8ab | ||
|
|
0cd51d21b3 | ||
|
|
4394eedf5e | ||
|
|
b6b3811914 | ||
|
|
07e0f0f72f | ||
|
|
cff7b04fdc | ||
|
|
bf2b03202f | ||
|
|
3246b95129 | ||
|
|
308fa486ed | ||
|
|
7f0a2494ca | ||
|
|
91922131ce | ||
|
|
32a1a4da1e | ||
|
|
7d9209e38b | ||
|
|
23fbdd5fd6 | ||
|
|
4c308f7062 | ||
|
|
0a8dfc8935 | ||
|
|
50ea884353 | ||
|
|
f8d379424e | ||
|
|
db1d277847 | ||
|
|
015a0f42b0 | ||
|
|
39acc4df0e | ||
|
|
401cfa554f | ||
|
|
a07c0db3af | ||
|
|
fa36221bf6 | ||
|
|
8eb5823f43 | ||
|
|
ba954302f6 | ||
|
|
32c0b27765 | ||
|
|
f1333eb992 | ||
|
|
7fb3864e95 | ||
|
|
6f37695620 | ||
|
|
c3777932f6 | ||
|
|
f5909f2c18 | ||
|
|
ab601f284f | ||
|
|
52b92bc6ab | ||
|
|
36252140aa | ||
|
|
4e01e51338 | ||
|
|
a45d0fc482 | ||
|
|
bc6b7c949d | ||
|
|
9290786e73 | ||
|
|
d0c77132d8 | ||
|
|
a85314ecd3 | ||
|
|
ef7c5887b8 | ||
|
|
42e1112109 | ||
|
|
000ae23df4 | ||
|
|
2f5239b038 | ||
|
|
572d8e0609 | ||
|
|
3666698eeb | ||
|
|
3a207568cf | ||
|
|
e7b19b400a | ||
|
|
468c15935c | ||
|
|
6e3e80d10f | ||
|
|
69adaf75de | ||
|
|
94a549d660 | ||
|
|
17b80429dd | ||
|
|
4ef0fb2158 | ||
|
|
c9f7f77457 | ||
|
|
c58e1199d8 | ||
|
|
38a9c8c6c0 | ||
|
|
b4ea09446f | ||
|
|
f82598303a | ||
|
|
3289f393b5 | ||
|
|
5bb9eda3d4 | ||
|
|
37d8f254df | ||
|
|
dc73925823 | ||
|
|
632c1a112f | ||
|
|
cf6e3bebed | ||
|
|
50e96b1488 | ||
|
|
4bd29fcdab | ||
|
|
70f29030ae | ||
|
|
01f1eb8f87 | ||
|
|
a19700091a | ||
|
|
f32a44951a | ||
|
|
9351639fe5 | ||
|
|
e43fafda62 | ||
|
|
009a48d144 | ||
|
|
0a18ba8719 | ||
|
|
b36074dae3 | ||
|
|
1ac18c801b | ||
|
|
6fd40fdbc3 | ||
|
|
f6d871f4c4 | ||
|
|
66c47a4d06 | ||
|
|
e1b9781bda | ||
|
|
647406c1c1 | ||
|
|
89508a4fd4 | ||
|
|
f1308fcb08 | ||
|
|
ff1b4ccbca | ||
|
|
cefcc33c41 | ||
|
|
a5cb21177a | ||
|
|
cd3b6c9d5c | ||
|
|
63ec3e0170 | ||
|
|
ed5d0632b3 | ||
|
|
873fff969e | ||
|
|
8b7342cc67 | ||
|
|
16b407a1ff | ||
|
|
cb3790a209 | ||
|
|
ed93fb8a29 | ||
|
|
db56f485a8 | ||
|
|
b7b3e80a73 | ||
|
|
ed7cbd5a4b | ||
|
|
fe48716c0c | ||
|
|
92863ae784 | ||
|
|
80f2d39f64 | ||
|
|
4291a39afe | ||
|
|
b525305f9d | ||
|
|
009bf5476a | ||
|
|
10d8d28164 | ||
|
|
501c7a725d | ||
|
|
83bf475551 | ||
|
|
91a2ea769b | ||
|
|
184b030535 | ||
|
|
627713f627 | ||
|
|
e2a0d20737 | ||
|
|
a771a41a56 | ||
|
|
2035627d34 | ||
|
|
3e42887310 | ||
|
|
a1149c6326 | ||
|
|
7ef759e068 | ||
|
|
81da5ef3f9 | ||
|
|
efed56d73a | ||
|
|
5b631556be | ||
|
|
133f56d4f6 | ||
|
|
b0d58b5ddf | ||
|
|
6213929455 | ||
|
|
d78d6b22c6 | ||
|
|
98d3075f2f | ||
|
|
809a73be97 | ||
|
|
6b1c3f89ab | ||
|
|
02c7600ac7 | ||
|
|
29122cfa05 | ||
|
|
44143324d0 | ||
|
|
d48581ab72 | ||
|
|
617941ccf9 | ||
|
|
8606449fe1 | ||
|
|
88423d5bfd | ||
|
|
eb83bd77be | ||
|
|
541e4de976 | ||
|
|
b47078f14a | ||
|
|
f506064136 | ||
|
|
2e9c6cac74 | ||
|
|
6b2316b9aa | ||
|
|
e6ae9c9bab | ||
|
|
abbeead6fa | ||
|
|
c71a77ad16 | ||
|
|
6364bb1a79 | ||
|
|
61eb08813b | ||
|
|
42948bc052 | ||
|
|
ac4a9384e9 | ||
|
|
71e9725dc7 | ||
|
|
86274d062f | ||
|
|
98c48456e8 | ||
|
|
833ebe4ab9 | ||
|
|
8871307574 | ||
|
|
b6e4ca1402 | ||
|
|
e89b3655b8 | ||
|
|
a61003ccff | ||
|
|
441c323498 | ||
|
|
346677a10c | ||
|
|
5937533704 | ||
|
|
1617720681 | ||
|
|
2d1ae6f06d | ||
|
|
78cfb8474b | ||
|
|
167765ed32 | ||
|
|
0ee4c2743f | ||
|
|
86b0650a4d | ||
|
|
72dbb1d095 | ||
|
|
f07d53f783 | ||
|
|
d2ed982988 | ||
|
|
cb86d8916a | ||
|
|
49a4f03692 | ||
|
|
29bc56e589 | ||
|
|
62ef6778c9 | ||
|
|
ad56461850 | ||
|
|
be2a34d871 | ||
|
|
f52c65edf2 | ||
|
|
e3e243744c | ||
|
|
199b0b0c36 | ||
|
|
d840bc0dbd | ||
|
|
f34c984f2f | ||
|
|
083636b801 | ||
|
|
174c5846a5 | ||
|
|
606c74baf6 | ||
|
|
ed5d5d6633 | ||
|
|
4d4f22843c | ||
|
|
a2e3dc0a1d | ||
|
|
0530c7e564 | ||
|
|
06de4577d6 | ||
|
|
81a36f41ec | ||
|
|
de2eed4838 | ||
|
|
c628ae114b | ||
|
|
cac5a8b65d | ||
|
|
341adb516b | ||
|
|
6081a5873c | ||
|
|
7c415014b0 | ||
|
|
ffce9ebf9b | ||
|
|
de3e670282 | ||
|
|
7e0c3177d6 | ||
|
|
3b0a442dd2 | ||
|
|
71c350f73b | ||
|
|
cccd21d5c6 | ||
|
|
60ffbb72b4 | ||
|
|
f9db3144d6 | ||
|
|
e8b44eb33a | ||
|
|
fcad87788a | ||
|
|
de52b6375b | ||
|
|
7d036aadc2 | ||
|
|
499595f510 | ||
|
|
01f56d44dc | ||
|
|
bcb1240ccf | ||
|
|
a04ba58d9a | ||
|
|
dcbf01295b | ||
|
|
c40322945a | ||
|
|
1f0dae3c7f | ||
|
|
64577122ec | ||
|
|
7a4c9474f8 | ||
|
|
08007ed442 | ||
|
|
8f9e82e868 | ||
|
|
ecda721a3e | ||
|
|
9df5191d0a | ||
|
|
384ae4032d | ||
|
|
d0e1affa70 | ||
|
|
20a4c6cff3 | ||
|
|
d4cf5babd2 | ||
|
|
afd60f3f74 | ||
|
|
5ed1b45aad | ||
|
|
49cb8be3fd | ||
|
|
fc20100861 | ||
|
|
b49721d57d | ||
|
|
9383cda5ff | ||
|
|
c9f6868c51 | ||
|
|
d921cbea3c | ||
|
|
bd6b031738 | ||
|
|
d17abbf4e2 | ||
|
|
18b4a41899 | ||
|
|
a20c8bba4a | ||
|
|
609ec3d4c2 | ||
|
|
38894de7f5 | ||
|
|
34b3b01261 | ||
|
|
c750d3215e | ||
|
|
5bd9578445 | ||
|
|
362c8f80b1 | ||
|
|
7dc57bd96a | ||
|
|
978e62da15 | ||
|
|
9631ac63e1 | ||
|
|
8b565df63c | ||
|
|
3c1963d513 | ||
|
|
2da38b624e | ||
|
|
d3516e69c7 | ||
|
|
c6dfff5b61 | ||
|
|
eee3784224 | ||
|
|
644999645b | ||
|
|
c0837ddbcc | ||
|
|
46f2263a45 | ||
|
|
d4593397a7 | ||
|
|
fa59d52356 | ||
|
|
701a69ed4d | ||
|
|
eabcf0fed8 | ||
|
|
57c80d1fca | ||
|
|
f11a12e915 | ||
|
|
da55ed0032 | ||
|
|
e4f25b015c | ||
|
|
9c77672458 | ||
|
|
763f49243d | ||
|
|
53511a429c | ||
|
|
8528bbaf6c | ||
|
|
8155b2fca4 | ||
|
|
44c6326c11 | ||
|
|
4a670f7453 | ||
|
|
d13144285b | ||
|
|
c77e46af5c | ||
|
|
29fbdde45f | ||
|
|
db1e1e63ce | ||
|
|
ebab46b1fb | ||
|
|
5aa18b3547 | ||
|
|
1ffd2f315b | ||
|
|
d2d95729fe | ||
|
|
03f1cc2023 | ||
|
|
0af9df2aa5 | ||
|
|
bac364fac3 | ||
|
|
c8f102e5bb | ||
|
|
302b8a7ec2 | ||
|
|
8bd0dbd805 | ||
|
|
54cbdaf69e | ||
|
|
fc86d34d6e | ||
|
|
6820b5cae1 | ||
|
|
be49812350 | ||
|
|
c3c1c53df3 | ||
|
|
c1545d2f23 | ||
|
|
16220de83f | ||
|
|
044068eb7f | ||
|
|
d02963eec9 | ||
|
|
d8f4c209ab | ||
|
|
768220fcdc | ||
|
|
28a29d6922 | ||
|
|
403ed3368a | ||
|
|
03119a0831 | ||
|
|
3f302b9ecf | ||
|
|
1ae5a13266 | ||
|
|
a8a74bb8a5 | ||
|
|
f7c79ed474 | ||
|
|
e4ec8f9b98 | ||
|
|
31624d82af | ||
|
|
53e5959568 | ||
|
|
a62b2a97a0 | ||
|
|
c64b709956 | ||
|
|
4ca7de5ed8 | ||
|
|
9fd91769e9 | ||
|
|
80ce225981 | ||
|
|
664cf834c1 | ||
|
|
81b343c386 | ||
|
|
1a5a205969 | ||
|
|
d22d2b7b7f | ||
|
|
acd9aea8bb | ||
|
|
497fb6a0fd | ||
|
|
641209e3f3 | ||
|
|
729eef96f1 | ||
|
|
dba456b73a | ||
|
|
a52b715835 | ||
|
|
7a045a9a6b | ||
|
|
02b570290e | ||
|
|
17c02cee7d | ||
|
|
855b0c05e7 | ||
|
|
d262113e5d | ||
|
|
49af69dfdd | ||
|
|
f687d4fb98 | ||
|
|
5639ca070b | ||
|
|
893f757ebc | ||
|
|
b429928687 | ||
|
|
a751287188 | ||
|
|
67a41fe316 | ||
|
|
b2dc3a3d9c | ||
|
|
72c02940dd | ||
|
|
eb5c80460e | ||
|
|
8b13f9ab86 | ||
|
|
04944544ca | ||
|
|
1de180cd82 | ||
|
|
a2d8c8e104 | ||
|
|
704ab7234b | ||
|
|
c715f0e4be | ||
|
|
0f17efd238 | ||
|
|
43adf0a308 | ||
|
|
358e51d80a | ||
|
|
ba7002b9bb | ||
|
|
cd5255eea4 | ||
|
|
ba91b5dde4 | ||
|
|
4ac7d7780d | ||
|
|
9050858254 | ||
|
|
e3645fafb4 | ||
|
|
f4a291bdf2 | ||
|
|
d0f1ca15ec | ||
|
|
19a5c67e92 | ||
|
|
3b7e7aa13b | ||
|
|
47396311df | ||
|
|
97c0733917 | ||
|
|
84c9cbea61 | ||
|
|
958465f0b3 | ||
|
|
7365268efa | ||
|
|
4504493445 | ||
|
|
2025738ce2 | ||
|
|
c9ffc440c8 | ||
|
|
0ab42c2c00 | ||
|
|
f487fca502 | ||
|
|
0a051ea1c1 | ||
|
|
ef45eeea0d | ||
|
|
5d5ce20ee6 | ||
|
|
96dad4da1f | ||
|
|
a89f98b802 | ||
|
|
0d55b08656 | ||
|
|
a7af7a1f8e | ||
|
|
6b22a3f9f2 | ||
|
|
f34ceb42c0 | ||
|
|
626270fc82 | ||
|
|
834a914b39 | ||
|
|
8e814916c3 | ||
|
|
33223ded21 | ||
|
|
7ac5f45831 | ||
|
|
5a1a9e13f2 | ||
|
|
e102e93c9d | ||
|
|
2371a8b3b3 | ||
|
|
c10a839e82 | ||
|
|
925752a13d | ||
|
|
9558e60f9c | ||
|
|
089e4bb667 | ||
|
|
6b0d47796f | ||
|
|
185e565bec | ||
|
|
80df924169 | ||
|
|
77e9a88be3 | ||
|
|
8c38deace1 | ||
|
|
f73d3e71dc | ||
|
|
707413234f | ||
|
|
89098019cf | ||
|
|
915683cee9 | ||
|
|
00a4156fdf | ||
|
|
22e1b0a6a4 | ||
|
|
57009a1ebe | ||
|
|
cc88e14c87 | ||
|
|
de5aa838dd | ||
|
|
5ac4559da3 | ||
|
|
477d5e0c70 | ||
|
|
1525b7380f | ||
|
|
f8eb871244 | ||
|
|
0bbc678616 | ||
|
|
18a863b911 | ||
|
|
e31078c7b1 | ||
|
|
29a75e3d62 | ||
|
|
00c0c40ba5 | ||
|
|
03c1271cf2 | ||
|
|
d28b77b15f | ||
|
|
65281a94a5 | ||
|
|
a08f8acfc4 | ||
|
|
033a49e23d | ||
|
|
a427affe30 | ||
|
|
2eeedfe97f | ||
|
|
8a81227859 | ||
|
|
42acf62e5f | ||
|
|
28942ddac7 | ||
|
|
e027e9e85d | ||
|
|
40cf4d9a0a | ||
|
|
a114054182 | ||
|
|
33ed0a71cd | ||
|
|
d028418790 | ||
|
|
1ef16debfb | ||
|
|
1f3cd7087f | ||
|
|
53530e09c5 | ||
|
|
6a47311dfc | ||
|
|
c72557349a | ||
|
|
125deba083 | ||
|
|
9edd074a1d | ||
|
|
c7dbd7d6c5 | ||
|
|
fef4253c31 | ||
|
|
de5ac38179 | ||
|
|
3e4e2fd08a | ||
|
|
7698b97ca5 | ||
|
|
229466fdf1 | ||
|
|
259a909168 | ||
|
|
a65fd55d3f | ||
|
|
b97146827d | ||
|
|
bd8a490194 | ||
|
|
ab03414ea5 | ||
|
|
b462b22e59 | ||
|
|
982a34d067 | ||
|
|
cf5154f72e | ||
|
|
cfe0810936 | ||
|
|
02a360eca0 | ||
|
|
982df150f8 | ||
|
|
96d57f8d55 | ||
|
|
95ce1aa378 | ||
|
|
3bf40950e1 | ||
|
|
9200d87d30 | ||
|
|
27d1f4ed7c | ||
|
|
eb3640db00 | ||
|
|
3ed474aa05 | ||
|
|
935fb1eae2 | ||
|
|
954ac5c756 | ||
|
|
fa5d8e218e | ||
|
|
89e24b8f4a | ||
|
|
5a52229249 | ||
|
|
7d67db4b9f | ||
|
|
964cea9fba | ||
|
|
53cc8d7ce6 | ||
|
|
2c80701c7d | ||
|
|
f8a3861465 | ||
|
|
976c2425c4 | ||
|
|
0de6a2702b | ||
|
|
7534ce9996 | ||
|
|
f844032233 | ||
|
|
8f6844d7dd | ||
|
|
1c2fb8a0df | ||
|
|
b98c2df5a0 | ||
|
|
4376529929 | ||
|
|
760725aa5b | ||
|
|
0e1b0d6276 | ||
|
|
ab78df558e | ||
|
|
c262acb656 | ||
|
|
4bc127a2bd | ||
|
|
f934b0bbae | ||
|
|
a7cd95aa8b | ||
|
|
13c8765e00 | ||
|
|
8192fc3a8c | ||
|
|
1aaeeaa537 | ||
|
|
c8a6d75f1c | ||
|
|
cd969573ed | ||
|
|
bb5b1c5991 | ||
|
|
8934a2a78a | ||
|
|
8464262b28 | ||
|
|
4ef07b3f9d | ||
|
|
9f47c5a53b | ||
|
|
f07cc50f89 | ||
|
|
f708bf2a14 | ||
|
|
bbac261b64 | ||
|
|
22be3d06e3 | ||
|
|
c35d315148 | ||
|
|
2e7ab9a360 | ||
|
|
3b5a3c7249 | ||
|
|
4e3fea4f1a | ||
|
|
6430ab2861 | ||
|
|
ceaa949cb8 | ||
|
|
173cdcaccd | ||
|
|
d7322b6f2f | ||
|
|
0ed805f7f4 | ||
|
|
0df4deada4 | ||
|
|
d14ec7e975 | ||
|
|
262bc9d095 | ||
|
|
669db62ae1 | ||
|
|
d1f5aa7f87 | ||
|
|
14ee3418e5 | ||
|
|
151044871c | ||
|
|
b5cef76b74 | ||
|
|
e1ecc3ab8e | ||
|
|
1ce90bd39f | ||
|
|
f503ca0c69 | ||
|
|
3ede1e6d95 | ||
|
|
ae3ce0eba3 | ||
|
|
247cf937bb | ||
|
|
d882ccb6a2 | ||
|
|
80920cba73 | ||
|
|
c67f1a46e3 | ||
|
|
9aacdebf63 | ||
|
|
3d4399e160 | ||
|
|
5b26a16096 | ||
|
|
679290d632 | ||
|
|
163f95978b | ||
|
|
30e2f37ab7 | ||
|
|
2f3b3ae896 | ||
|
|
52e759540e | ||
|
|
c147eaf8f8 | ||
|
|
c40bd5fd61 | ||
|
|
0c94a88075 | ||
|
|
feee7d547a | ||
|
|
fae1ce2316 | ||
|
|
ae1a9be8b0 | ||
|
|
67950680b9 | ||
|
|
8e9eef76bf | ||
|
|
2e9fd96c57 | ||
|
|
b98fc4bfee | ||
|
|
9df3006aa8 | ||
|
|
3d42fa5b75 | ||
|
|
f3b502da78 | ||
|
|
18689db5f0 | ||
|
|
7b19bd3bb3 | ||
|
|
c8cf3a4df6 | ||
|
|
4900e98d70 | ||
|
|
84f1e03f9a | ||
|
|
4b8cd3ab71 | ||
|
|
7bc37d864f | ||
|
|
574fc36d95 | ||
|
|
159c09f29e | ||
|
|
bdc079dca4 | ||
|
|
aa345bf659 | ||
|
|
5b5b2f86c5 | ||
|
|
fa96f33bef | ||
|
|
ce9d66d6e4 | ||
|
|
ee9146d440 | ||
|
|
42a2e12656 | ||
|
|
9d450c4e7c | ||
|
|
1f0bd01302 | ||
|
|
975c5bc7fe | ||
|
|
b869f91532 | ||
|
|
3041842245 | ||
|
|
4f2bf52409 | ||
|
|
fbb8fcbb76 | ||
|
|
1fcac96abe | ||
|
|
343b54cdbe | ||
|
|
5123bc2e69 | ||
|
|
c533c5c8bc | ||
|
|
1bd8a08435 |
No files matched your search
@@ -1,14 +1,22 @@
|
||||
.*.swp
|
||||
core
|
||||
*.o
|
||||
*.log
|
||||
dump.rdb
|
||||
redis-benchmark
|
||||
keydb-benchmark
|
||||
redis-check-aof
|
||||
keydb-check-aof
|
||||
redis-check-rdb
|
||||
keydb-check-rdb
|
||||
redis-check-dump
|
||||
keydb-check-dump
|
||||
redis-cli
|
||||
keydb-cli
|
||||
redis-sentinel
|
||||
keydb-sentinel
|
||||
redis-server
|
||||
keydb-server
|
||||
doc-tools
|
||||
release
|
||||
misc/*
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
language: generic
|
||||
os: osx
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
script: make
|
||||
env: COMPILER_NAME=g++-6 CXX=g++-6 CC=gcc-6
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-6
|
||||
- nasm
|
||||
- uuid-dev
|
||||
sources: &sources
|
||||
- llvm-toolchain-precise-3.8
|
||||
- ubuntu-toolchain-r-test
|
||||
- os: linux
|
||||
script: make MALLOC=libc
|
||||
env: COMPILER_NAME=clang CXX=clang++-3.8 CC=clang-3.8 CXXFLAGS="-I/usr/include/libcxxabi/" LDFLAGS="-lc++"
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libc++abi-dev
|
||||
- clang-3.8
|
||||
- libc++-dev
|
||||
- libc++abi-dev
|
||||
- nasm
|
||||
- uuid-dev
|
||||
sources: *sources
|
||||
Vendored
+56
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"zmalloc.h": "c",
|
||||
"stat.h": "c",
|
||||
"array": "cpp",
|
||||
"atomic": "cpp",
|
||||
"*.tcc": "cpp",
|
||||
"cctype": "cpp",
|
||||
"chrono": "cpp",
|
||||
"clocale": "cpp",
|
||||
"cmath": "cpp",
|
||||
"condition_variable": "cpp",
|
||||
"cstdarg": "cpp",
|
||||
"cstddef": "cpp",
|
||||
"cstdint": "cpp",
|
||||
"cstdio": "cpp",
|
||||
"cstdlib": "cpp",
|
||||
"cstring": "cpp",
|
||||
"ctime": "cpp",
|
||||
"cwchar": "cpp",
|
||||
"cwctype": "cpp",
|
||||
"deque": "cpp",
|
||||
"list": "cpp",
|
||||
"unordered_map": "cpp",
|
||||
"vector": "cpp",
|
||||
"exception": "cpp",
|
||||
"fstream": "cpp",
|
||||
"functional": "cpp",
|
||||
"future": "cpp",
|
||||
"initializer_list": "cpp",
|
||||
"iomanip": "cpp",
|
||||
"iosfwd": "cpp",
|
||||
"iostream": "cpp",
|
||||
"istream": "cpp",
|
||||
"limits": "cpp",
|
||||
"memory": "cpp",
|
||||
"mutex": "cpp",
|
||||
"new": "cpp",
|
||||
"numeric": "cpp",
|
||||
"optional": "cpp",
|
||||
"ostream": "cpp",
|
||||
"ratio": "cpp",
|
||||
"scoped_allocator": "cpp",
|
||||
"sstream": "cpp",
|
||||
"stdexcept": "cpp",
|
||||
"streambuf": "cpp",
|
||||
"string_view": "cpp",
|
||||
"system_error": "cpp",
|
||||
"thread": "cpp",
|
||||
"cinttypes": "cpp",
|
||||
"tuple": "cpp",
|
||||
"type_traits": "cpp",
|
||||
"typeinfo": "cpp",
|
||||
"utility": "cpp"
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
Copyright (c) 2006-2015, Salvatore Sanfilippo
|
||||
Copyright (C) 2019, John Sully
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
|
||||
|
||||
RUN apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qqy \
|
||||
build-essential nasm autotools-dev autoconf libjemalloc-dev tcl tcl-dev uuid-dev \
|
||||
&& apt-get clean
|
||||
|
||||
CMD make
|
||||
@@ -1,106 +0,0 @@
|
||||
[Note: this is the Redis manifesto, for general information about
|
||||
installing and running Redis read the README file instead.]
|
||||
|
||||
Redis Manifesto
|
||||
===============
|
||||
|
||||
1 - A DSL for Abstract Data Types. Redis is a DSL (Domain Specific Language)
|
||||
that manipulates abstract data types and implemented as a TCP daemon.
|
||||
Commands manipulate a key space where keys are binary-safe strings and
|
||||
values are different kinds of abstract data types. Every data type
|
||||
represents an abstract version of a fundamental data structure. For instance
|
||||
Redis Lists are an abstract representation of linked lists. In Redis, the
|
||||
essence of a data type isn't just the kind of operations that the data types
|
||||
support, but also the space and time complexity of the data type and the
|
||||
operations performed upon it.
|
||||
|
||||
2 - Memory storage is #1. The Redis data set, composed of defined key-value
|
||||
pairs, is primarily stored in the computer's memory. The amount of memory in
|
||||
all kinds of computers, including entry-level servers, is increasing
|
||||
significantly each year. Memory is fast, and allows Redis to have very
|
||||
predictable performance. Datasets composed of 10k or 40 millions keys will
|
||||
perform similarly. Complex data types like Redis Sorted Sets are easy to
|
||||
implement and manipulate in memory with good performance, making Redis very
|
||||
simple. Redis will continue to explore alternative options (where data can
|
||||
be optionally stored on disk, say) but the main goal of the project remains
|
||||
the development of an in-memory database.
|
||||
|
||||
3 - Fundamental data structures for a fundamental API. The Redis API is a direct
|
||||
consequence of fundamental data structures. APIs can often be arbitrary but
|
||||
not an API that resembles the nature of fundamental data structures. If we
|
||||
ever meet intelligent life forms from another part of the universe, they'll
|
||||
likely know, understand and recognize the same basic data structures we have
|
||||
in our computer science books. Redis will avoid intermediate layers in API,
|
||||
so that the complexity is obvious and more complex operations can be
|
||||
performed as the sum of the basic operations.
|
||||
|
||||
4 - We believe in code efficiency. Computers get faster and faster, yet we
|
||||
believe that abusing computing capabilities is not wise: the amount of
|
||||
operations you can do for a given amount of energy remains anyway a
|
||||
significant parameter: it allows to do more with less computers and, at
|
||||
the same time, having a smaller environmental impact. Similarly Redis is
|
||||
able to "scale down" to smaller devices. It is perfectly usable in a
|
||||
Raspberry Pi and other small ARM based computers. Faster code having
|
||||
just the layers of abstractions that are really needed will also result,
|
||||
often, in more predictable performances. We think likewise about memory
|
||||
usage, one of the fundamental goals of the Redis project is to
|
||||
incrementally build more and more memory efficient data structures, so that
|
||||
problems that were not approachable in RAM in the past will be perfectly
|
||||
fine to handle in the future.
|
||||
|
||||
5 - Code is like a poem; it's not just something we write to reach some
|
||||
practical result. Sometimes people that are far from the Redis philosophy
|
||||
suggest using other code written by other authors (frequently in other
|
||||
languages) in order to implement something Redis currently lacks. But to us
|
||||
this is like if Shakespeare decided to end Enrico IV using the Paradiso from
|
||||
the Divina Commedia. Is using any external code a bad idea? Not at all. Like
|
||||
in "One Thousand and One Nights" smaller self contained stories are embedded
|
||||
in a bigger story, we'll be happy to use beautiful self contained libraries
|
||||
when needed. At the same time, when writing the Redis story we're trying to
|
||||
write smaller stories that will fit in to other code.
|
||||
|
||||
6 - We're against complexity. We believe designing systems is a fight against
|
||||
complexity. We'll accept to fight the complexity when it's worthwhile but
|
||||
we'll try hard to recognize when a small feature is not worth 1000s of lines
|
||||
of code. Most of the time the best way to fight complexity is by not
|
||||
creating it at all. Complexity is also a form of lock-in: code that is
|
||||
very hard to understand cannot be modified by users in an independent way
|
||||
regardless of the license. One of the main Redis goals is to remain
|
||||
understandable, enough for a single programmer to have a clear idea of how
|
||||
it works in detail just reading the source code for a couple of weeks.
|
||||
|
||||
7 - Threading is not a silver bullet. Instead of making Redis threaded we
|
||||
believe on the idea of an efficient (mostly) single threaded Redis core.
|
||||
Multiple of such cores, that may run in the same computer or may run
|
||||
in multiple computers, are abstracted away as a single big system by
|
||||
higher order protocols and features: Redis Cluster and the upcoming
|
||||
Redis Proxy are our main goals. A shared nothing approach is not just
|
||||
much simpler (see the previous point in this document), is also optimal
|
||||
in NUMA systems. In the specific case of Redis it allows for each instance
|
||||
to have a more limited amount of data, making the Redis persist-by-fork
|
||||
approach more sounding. In the future we may explore parallelism only for
|
||||
I/O, which is the low hanging fruit: minimal complexity could provide an
|
||||
improved single process experience.
|
||||
|
||||
8 - Two levels of API. The Redis API has two levels: 1) a subset of the API fits
|
||||
naturally into a distributed version of Redis and 2) a more complex API that
|
||||
supports multi-key operations. Both are useful if used judiciously but
|
||||
there's no way to make the more complex multi-keys API distributed in an
|
||||
opaque way without violating our other principles. We don't want to provide
|
||||
the illusion of something that will work magically when actually it can't in
|
||||
all cases. Instead we'll provide commands to quickly migrate keys from one
|
||||
instance to another to perform multi-key operations and expose the
|
||||
trade-offs to the user.
|
||||
|
||||
9 - We optimize for joy. We believe writing code is a lot of hard work, and the
|
||||
only way it can be worth is by enjoying it. When there is no longer joy in
|
||||
writing code, the best thing to do is stop. To prevent this, we'll avoid
|
||||
taking paths that will make Redis less of a joy to develop.
|
||||
|
||||
10 - All the above points are put together in what we call opportunistic
|
||||
programming: trying to get the most for the user with minimal increases
|
||||
in complexity (hanging fruits). Solve 95% of the problem with 5% of the
|
||||
code when it is acceptable. Avoid a fixed schedule but follow the flow of
|
||||
user requests, inspiration, Redis internal readiness for certain features
|
||||
(sometimes many past changes reach a critical point making a previously
|
||||
complex feature very easy to obtain).
|
||||
@@ -1,52 +1,86 @@
|
||||
This README is just a fast *quick start* document. You can find more detailed documentation at [redis.io](https://redis.io).
|
||||

|
||||
[](https://travis-ci.org/JohnSully/KeyDB) [](https://gitter.im/KeyDB/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[](https://stackshare.io/eq-alpha-technology-inc/eq-alpha-technology-inc)
|
||||
|
||||
What is Redis?
|
||||
What is KeyDB?
|
||||
--------------
|
||||
|
||||
Redis is often referred as a *data structures* server. What this means is that Redis provides access to mutable data structures via a set of commands, which are sent using a *server-client* model with TCP sockets and a simple protocol. So different processes can query and modify the same data structures in a shared way.
|
||||
KeyDB is a high performance fork of Redis focusing on multithreading, memory efficiency, and high throughput. In addition to multithreading KeyDB also has features only available in Redis Enterprise such as [Active Replication](https://github.com/JohnSully/KeyDB/wiki/Active-Replication), [FLASH storage](https://github.com/JohnSully/KeyDB/wiki/FLASH-Storage) support, and some not available at all such as direct backup to AWS S3.
|
||||
|
||||
Data structures implemented into Redis have a few special properties:
|
||||
On the same hardware KeyDB can perform twice as many queries per second as Redis, with 60% lower latency.
|
||||
|
||||
* Redis cares to store them on disk, even if they are always served and modified into the server memory. This means that Redis is fast, but that is also non-volatile.
|
||||
* Implementation of data structures stress on memory efficiency, so data structures inside Redis will likely use less memory compared to the same data structure modeled using an high level programming language.
|
||||
* Redis offers a number of features that are natural to find in a database, like replication, tunable levels of durability, cluster, high availability.
|
||||
KeyDB has full compatibility with the Redis protocol, modules, and scripts. This includes full support for transactions, and atomic execution of scripts. For more information see our architecture section below.
|
||||
|
||||
Another good example is to think of Redis as a more complex version of memcached, where the operations are not just SETs and GETs, but operations to work with complex data types like Lists, Sets, ordered data structures, and so forth.
|
||||
Try our docker container: https://hub.docker.com/r/eqalpha/keydb
|
||||
|
||||
If you want to know more, this is a list of selected starting points:
|
||||
Talk on Gitter: https://gitter.im/KeyDB
|
||||
|
||||
* Introduction to Redis data types. http://redis.io/topics/data-types-intro
|
||||
* Try Redis directly inside your browser. http://try.redis.io
|
||||
* The full list of Redis commands. http://redis.io/commands
|
||||
* There is much more inside the Redis official documentation. http://redis.io/documentation
|
||||
[Subscribe to the KeyDB mailing list](https://eqalpha.us20.list-manage.com/subscribe/post?u=978f486c2f95589b24591a9cc&id=4ab9220500)
|
||||
|
||||
Building Redis
|
||||
Management GUI: We recommend [FastoNoSQL](https://fastonosql.com/) which has official KeyDB support.
|
||||
|
||||
New: Active Replica Support
|
||||
---------------------------
|
||||
|
||||
New! KeyDB now has support for Active Replicas. This feature greatly simplifies hot-spare failover and allows you to distribute writes over replicas instead of just a single master. For more information [see the wiki page](https://github.com/JohnSully/KeyDB/wiki/Active-Replication).
|
||||
|
||||
Why fork Redis?
|
||||
---------------
|
||||
|
||||
The Redis maintainers have continually reiterated that they do not plan to support multithreading. While we have great respect for the redis team, we feel the analysis justifying this decision is incorrect. In addition we wanted open source implementations of features currently only available in proprietary modules. We feel a fork is the best way to accelerate development in the areas of most interest to us.
|
||||
|
||||
We plan to track the Redis repo closely and hope our projects can learn from each other.
|
||||
|
||||
Benchmarking KeyDB
|
||||
------------------
|
||||
|
||||
<img src=https://cdn-images-1.medium.com/max/1400/1*s7mTb7Qb0kxc951mz8bdgA.png width=420 height=300/><img src=https://cdn-images-1.medium.com/max/1400/1*R00A5U4AFGohGOYHMfT6fA.png height=300/>
|
||||
|
||||
Please note keydb-benchmark and redis-benchmark are currently single threaded and too slow to properly benchmark KeyDB. We recommend using a redis cluster benchmark tool such as [memtier](https://github.com/RedisLabs/memtier_benchmark). Please ensure your machine has enough cores for both KeyDB and memteir if testing locally. KeyDB expects exclusive use of any cores assigned to it.
|
||||
|
||||
For more details on how we benchmarked KeyDB along with performance numbers check out our blog post: [Redis Should Be Multithreaded](https://medium.com/@john_63123/redis-should-be-multi-threaded-e28319cab744?source=friends_link&sk=7ce8e9fe3ec8224a4d27ef075d085457)
|
||||
|
||||
New Configuration Options
|
||||
-------------------------
|
||||
|
||||
With new features comes new options:
|
||||
|
||||
server-threads N
|
||||
server-thread-affinity [true/false]
|
||||
|
||||
The number of threads used to serve requests. This should be related to the number of queues available in your network hardware, *not* the number of cores on your machine. Because KeyDB uses spinlocks to reduce latency; making this too high will reduce performance. We recommend using 4 here. By default this is set to one.
|
||||
|
||||
scratch-file-path /path
|
||||
|
||||
If you would like to use the [FLASH backed](https://github.com/JohnSully/KeyDB/wiki/FLASH-Storage) storage this option configures the directory for KeyDB's temporary files. This feature relies on snapshotting to work so must be used on a BTRFS filesystem. ZFS may also work but is untested. With this feature KeyDB will use RAM as a cache and page to disk as necessary. NOTE: This requires special compilation options, see Building KeyDB below.
|
||||
|
||||
db-s3-object /path/to/bucket
|
||||
|
||||
If you would like KeyDB to dump and load directly to AWS S3 this option specifies the bucket. Using this option with the traditional RDB options will result in KeyDB backing up twice to both locations. If both are specified KeyDB will first attempt to load from the local dump file and if that fails load from S3. This requires the AWS CLI tools to be installed and configured which are used under the hood to transfer the data.
|
||||
|
||||
All other configuration options behave as you'd expect. Your existing configuration files should continue to work unchanged.
|
||||
|
||||
Building KeyDB
|
||||
--------------
|
||||
|
||||
Redis can be compiled and used on Linux, OSX, OpenBSD, NetBSD, FreeBSD.
|
||||
We support big endian and little endian architectures, and both 32 bit
|
||||
and 64 bit systems.
|
||||
KeyDB can be compiled and is tested for use on Linux. KeyDB currently relies on SO_REUSEPORT's load balancing behavior which is available only in Linux. When we support marshalling connections across threads we plan to support other operating systems such as FreeBSD.
|
||||
|
||||
It may compile on Solaris derived systems (for instance SmartOS) but our
|
||||
support for this platform is *best effort* and Redis is not guaranteed to
|
||||
work as well as in Linux, OSX, and \*BSD there.
|
||||
Install dependencies:
|
||||
|
||||
It is as simple as:
|
||||
% sudo apt install build-essential nasm autotools-dev autoconf libjemalloc-dev tcl tcl-dev uuid-dev
|
||||
|
||||
Compiling is as simple as:
|
||||
|
||||
% make
|
||||
|
||||
You can run a 32 bit Redis binary using:
|
||||
You can enable flash support with (Note: autoconf and autotools must be installed):
|
||||
|
||||
% make 32bit
|
||||
|
||||
After building Redis, it is a good idea to test it using:
|
||||
|
||||
% make test
|
||||
% make MALLOC=memkind
|
||||
|
||||
Fixing build problems with dependencies or cached build options
|
||||
---------
|
||||
|
||||
Redis has some dependencies which are included into the `deps` directory.
|
||||
KeyDB has some dependencies which are included into the `deps` directory.
|
||||
`make` does not automatically rebuild dependencies even if something in
|
||||
the source code of dependencies changes.
|
||||
|
||||
@@ -66,11 +100,11 @@ command.
|
||||
Fixing problems building 32 bit binaries
|
||||
---------
|
||||
|
||||
If after building Redis with a 32 bit target you need to rebuild it
|
||||
If after building KeyDB with a 32 bit target you need to rebuild it
|
||||
with a 64 bit target, or the other way around, you need to perform a
|
||||
`make distclean` in the root directory of the Redis distribution.
|
||||
`make distclean` in the root directory of the KeyDB distribution.
|
||||
|
||||
In case of build errors when trying to build a 32 bit binary of Redis, try
|
||||
In case of build errors when trying to build a 32 bit binary of KeyDB, try
|
||||
the following steps:
|
||||
|
||||
* Install the packages libc6-dev-i386 (also try g++-multilib).
|
||||
@@ -80,8 +114,8 @@ the following steps:
|
||||
Allocator
|
||||
---------
|
||||
|
||||
Selecting a non-default memory allocator when building Redis is done by setting
|
||||
the `MALLOC` environment variable. Redis is compiled and linked against libc
|
||||
Selecting a non-default memory allocator when building KeyDB is done by setting
|
||||
the `MALLOC` environment variable. KeyDB is compiled and linked against libc
|
||||
malloc by default, with the exception of jemalloc being the default on Linux
|
||||
systems. This default was picked because jemalloc has proven to have fewer
|
||||
fragmentation problems than libc malloc.
|
||||
@@ -97,60 +131,60 @@ To compile against jemalloc on Mac OS X systems, use:
|
||||
Verbose build
|
||||
-------------
|
||||
|
||||
Redis will build with a user friendly colorized output by default.
|
||||
KeyDB will build with a user friendly colorized output by default.
|
||||
If you want to see a more verbose output use the following:
|
||||
|
||||
% make V=1
|
||||
|
||||
Running Redis
|
||||
Running KeyDB
|
||||
-------------
|
||||
|
||||
To run Redis with the default configuration just type:
|
||||
To run KeyDB with the default configuration just type:
|
||||
|
||||
% cd src
|
||||
% ./redis-server
|
||||
% ./keydb-server
|
||||
|
||||
If you want to provide your redis.conf, you have to run it using an additional
|
||||
If you want to provide your keydb.conf, you have to run it using an additional
|
||||
parameter (the path of the configuration file):
|
||||
|
||||
% cd src
|
||||
% ./redis-server /path/to/redis.conf
|
||||
% ./keydb-server /path/to/keydb.conf
|
||||
|
||||
It is possible to alter the Redis configuration by passing parameters directly
|
||||
It is possible to alter the KeyDB configuration by passing parameters directly
|
||||
as options using the command line. Examples:
|
||||
|
||||
% ./redis-server --port 9999 --replicaof 127.0.0.1 6379
|
||||
% ./redis-server /etc/redis/6379.conf --loglevel debug
|
||||
% ./keydb-server --port 9999 --replicaof 127.0.0.1 6379
|
||||
% ./keydb-server /etc/keydb/6379.conf --loglevel debug
|
||||
|
||||
All the options in redis.conf are also supported as options using the command
|
||||
All the options in keydb.conf are also supported as options using the command
|
||||
line, with exactly the same name.
|
||||
|
||||
Playing with Redis
|
||||
Playing with KeyDB
|
||||
------------------
|
||||
|
||||
You can use redis-cli to play with Redis. Start a redis-server instance,
|
||||
You can use keydb-cli to play with KeyDB. Start a keydb-server instance,
|
||||
then in another terminal try the following:
|
||||
|
||||
% cd src
|
||||
% ./redis-cli
|
||||
redis> ping
|
||||
% ./keydb-cli
|
||||
keydb> ping
|
||||
PONG
|
||||
redis> set foo bar
|
||||
keydb> set foo bar
|
||||
OK
|
||||
redis> get foo
|
||||
keydb> get foo
|
||||
"bar"
|
||||
redis> incr mycounter
|
||||
keydb> incr mycounter
|
||||
(integer) 1
|
||||
redis> incr mycounter
|
||||
keydb> incr mycounter
|
||||
(integer) 2
|
||||
redis>
|
||||
keydb>
|
||||
|
||||
You can find the list of all the available commands at http://redis.io/commands.
|
||||
|
||||
Installing Redis
|
||||
Installing KeyDB
|
||||
-----------------
|
||||
|
||||
In order to install Redis binaries into /usr/local/bin just use:
|
||||
In order to install KeyDB binaries into /usr/local/bin just use:
|
||||
|
||||
% make install
|
||||
|
||||
@@ -159,7 +193,7 @@ different destination.
|
||||
|
||||
Make install will just install binaries in your system, but will not configure
|
||||
init scripts and configuration files in the appropriate place. This is not
|
||||
needed if you want just to play a bit with Redis, but if you are installing
|
||||
needed if you want just to play a bit with KeyDB, but if you are installing
|
||||
it the proper way for a production system, we have a script doing this
|
||||
for Ubuntu and Debian systems:
|
||||
|
||||
@@ -169,280 +203,52 @@ for Ubuntu and Debian systems:
|
||||
_Note_: `install_server.sh` will not work on Mac OSX; it is built for Linux only.
|
||||
|
||||
The script will ask you a few questions and will setup everything you need
|
||||
to run Redis properly as a background daemon that will start again on
|
||||
to run KeyDB properly as a background daemon that will start again on
|
||||
system reboots.
|
||||
|
||||
You'll be able to stop and start Redis using the script named
|
||||
`/etc/init.d/redis_<portnumber>`, for instance `/etc/init.d/redis_6379`.
|
||||
You'll be able to stop and start KeyDB using the script named
|
||||
`/etc/init.d/keydb_<portnumber>`, for instance `/etc/init.d/keydb_6379`.
|
||||
|
||||
Multithreading Architecture
|
||||
---------------------------
|
||||
|
||||
KeyDB works by running the normal Redis event loop on multiple threads. Network IO, and query parsing are done concurrently. Each connection is assigned a thread on accept(). Access to the core hash table is guarded by spinlock. Because the hashtable access is extremely fast this lock has low contention. Transactions hold the lock for the duration of the EXEC command. Modules work in concert with the GIL which is only acquired when all server threads are paused. This maintains the atomicity guarantees modules expect.
|
||||
|
||||
Unlike most databases the core data structure is the fastest part of the system. Most of the query time comes from parsing the REPL protocol and copying data to/from the network.
|
||||
|
||||
Future work:
|
||||
- Allow rebalancing of connections to different threads after the connection
|
||||
- Allow multiple readers access to the hashtable concurrently
|
||||
|
||||
Docker Build
|
||||
------------
|
||||
|
||||
Run the following commands for a full source download and build:
|
||||
|
||||
```
|
||||
git clone git@github.com:JohnSully/KeyDB.git
|
||||
docker run -it --rm -v `pwd`/KeyDB:/build -w /build devopsdood/keydb-builder make
|
||||
```
|
||||
|
||||
Then you have fresh binaries built, you can also pass any other options to the make command above after the word make. E.g.
|
||||
|
||||
```docker run -it --rm -v `pwd`/KeyDB:/build -w /build devopsdood/keydb-builder make MAllOC=memkind```
|
||||
|
||||
The above commands will build you binaries in the src directory. Standard `make install` without Docker command will work after if you wish to install
|
||||
|
||||
If you'd prefer you can build the Dockerfile in the repo instead of pulling the above container for use:
|
||||
|
||||
`docker build -t KeyDB .`
|
||||
|
||||
Code contributions
|
||||
-----------------
|
||||
|
||||
Note: by contributing code to the Redis project in any form, including sending
|
||||
Note: by contributing code to the KeyDB project in any form, including sending
|
||||
a pull request via Github, a code fragment or patch via private email or
|
||||
public discussion groups, you agree to release your code under the terms
|
||||
of the BSD license that you can find in the [COPYING][1] file included in the Redis
|
||||
of the BSD license that you can find in the COPYING file included in the KeyDB
|
||||
source distribution.
|
||||
|
||||
Please see the [CONTRIBUTING][2] file in this source distribution for more
|
||||
Please see the CONTRIBUTING file in this source distribution for more
|
||||
information.
|
||||
|
||||
[1]: https://github.com/antirez/redis/blob/unstable/COPYING
|
||||
[2]: https://github.com/antirez/redis/blob/unstable/CONTRIBUTING
|
||||
|
||||
Redis internals
|
||||
===
|
||||
|
||||
If you are reading this README you are likely in front of a Github page
|
||||
or you just untarred the Redis distribution tar ball. In both the cases
|
||||
you are basically one step away from the source code, so here we explain
|
||||
the Redis source code layout, what is in each file as a general idea, the
|
||||
most important functions and structures inside the Redis server and so forth.
|
||||
We keep all the discussion at a high level without digging into the details
|
||||
since this document would be huge otherwise and our code base changes
|
||||
continuously, but a general idea should be a good starting point to
|
||||
understand more. Moreover most of the code is heavily commented and easy
|
||||
to follow.
|
||||
|
||||
Source code layout
|
||||
---
|
||||
|
||||
The Redis root directory just contains this README, the Makefile which
|
||||
calls the real Makefile inside the `src` directory and an example
|
||||
configuration for Redis and Sentinel. You can find a few shell
|
||||
scripts that are used in order to execute the Redis, Redis Cluster and
|
||||
Redis Sentinel unit tests, which are implemented inside the `tests`
|
||||
directory.
|
||||
|
||||
Inside the root are the following important directories:
|
||||
|
||||
* `src`: contains the Redis implementation, written in C.
|
||||
* `tests`: contains the unit tests, implemented in Tcl.
|
||||
* `deps`: contains libraries Redis uses. Everything needed to compile Redis is inside this directory; your system just needs to provide `libc`, a POSIX compatible interface and a C compiler. Notably `deps` contains a copy of `jemalloc`, which is the default allocator of Redis under Linux. Note that under `deps` there are also things which started with the Redis project, but for which the main repository is not `antirez/redis`.
|
||||
|
||||
There are a few more directories but they are not very important for our goals
|
||||
here. We'll focus mostly on `src`, where the Redis implementation is contained,
|
||||
exploring what there is inside each file. The order in which files are
|
||||
exposed is the logical one to follow in order to disclose different layers
|
||||
of complexity incrementally.
|
||||
|
||||
Note: lately Redis was refactored quite a bit. Function names and file
|
||||
names have been changed, so you may find that this documentation reflects the
|
||||
`unstable` branch more closely. For instance in Redis 3.0 the `server.c`
|
||||
and `server.h` files were named `redis.c` and `redis.h`. However the overall
|
||||
structure is the same. Keep in mind that all the new developments and pull
|
||||
requests should be performed against the `unstable` branch.
|
||||
|
||||
server.h
|
||||
---
|
||||
|
||||
The simplest way to understand how a program works is to understand the
|
||||
data structures it uses. So we'll start from the main header file of
|
||||
Redis, which is `server.h`.
|
||||
|
||||
All the server configuration and in general all the shared state is
|
||||
defined in a global structure called `server`, of type `struct redisServer`.
|
||||
A few important fields in this structure are:
|
||||
|
||||
* `server.db` is an array of Redis databases, where data is stored.
|
||||
* `server.commands` is the command table.
|
||||
* `server.clients` is a linked list of clients connected to the server.
|
||||
* `server.master` is a special client, the master, if the instance is a replica.
|
||||
|
||||
There are tons of other fields. Most fields are commented directly inside
|
||||
the structure definition.
|
||||
|
||||
Another important Redis data structure is the one defining a client.
|
||||
In the past it was called `redisClient`, now just `client`. The structure
|
||||
has many fields, here we'll just show the main ones:
|
||||
|
||||
struct client {
|
||||
int fd;
|
||||
sds querybuf;
|
||||
int argc;
|
||||
robj **argv;
|
||||
redisDb *db;
|
||||
int flags;
|
||||
list *reply;
|
||||
char buf[PROTO_REPLY_CHUNK_BYTES];
|
||||
... many other fields ...
|
||||
}
|
||||
|
||||
The client structure defines a *connected client*:
|
||||
|
||||
* The `fd` field is the client socket file descriptor.
|
||||
* `argc` and `argv` are populated with the command the client is executing, so that functions implementing a given Redis command can read the arguments.
|
||||
* `querybuf` accumulates the requests from the client, which are parsed by the Redis server according to the Redis protocol and executed by calling the implementations of the commands the client is executing.
|
||||
* `reply` and `buf` are dynamic and static buffers that accumulate the replies the server sends to the client. These buffers are incrementally written to the socket as soon as the file descriptor is writable.
|
||||
|
||||
As you can see in the client structure above, arguments in a command
|
||||
are described as `robj` structures. The following is the full `robj`
|
||||
structure, which defines a *Redis object*:
|
||||
|
||||
typedef struct redisObject {
|
||||
unsigned type:4;
|
||||
unsigned encoding:4;
|
||||
unsigned lru:LRU_BITS; /* lru time (relative to server.lruclock) */
|
||||
int refcount;
|
||||
void *ptr;
|
||||
} robj;
|
||||
|
||||
Basically this structure can represent all the basic Redis data types like
|
||||
strings, lists, sets, sorted sets and so forth. The interesting thing is that
|
||||
it has a `type` field, so that it is possible to know what type a given
|
||||
object has, and a `refcount`, so that the same object can be referenced
|
||||
in multiple places without allocating it multiple times. Finally the `ptr`
|
||||
field points to the actual representation of the object, which might vary
|
||||
even for the same type, depending on the `encoding` used.
|
||||
|
||||
Redis objects are used extensively in the Redis internals, however in order
|
||||
to avoid the overhead of indirect accesses, recently in many places
|
||||
we just use plain dynamic strings not wrapped inside a Redis object.
|
||||
|
||||
server.c
|
||||
---
|
||||
|
||||
This is the entry point of the Redis server, where the `main()` function
|
||||
is defined. The following are the most important steps in order to startup
|
||||
the Redis server.
|
||||
|
||||
* `initServerConfig()` setups the default values of the `server` structure.
|
||||
* `initServer()` allocates the data structures needed to operate, setup the listening socket, and so forth.
|
||||
* `aeMain()` starts the event loop which listens for new connections.
|
||||
|
||||
There are two special functions called periodically by the event loop:
|
||||
|
||||
1. `serverCron()` is called periodically (according to `server.hz` frequency), and performs tasks that must be performed from time to time, like checking for timedout clients.
|
||||
2. `beforeSleep()` is called every time the event loop fired, Redis served a few requests, and is returning back into the event loop.
|
||||
|
||||
Inside server.c you can find code that handles other vital things of the Redis server:
|
||||
|
||||
* `call()` is used in order to call a given command in the context of a given client.
|
||||
* `activeExpireCycle()` handles eviciton of keys with a time to live set via the `EXPIRE` command.
|
||||
* `freeMemoryIfNeeded()` is called when a new write command should be performed but Redis is out of memory according to the `maxmemory` directive.
|
||||
* The global variable `redisCommandTable` defines all the Redis commands, specifying the name of the command, the function implementing the command, the number of arguments required, and other properties of each command.
|
||||
|
||||
networking.c
|
||||
---
|
||||
|
||||
This file defines all the I/O functions with clients, masters and replicas
|
||||
(which in Redis are just special clients):
|
||||
|
||||
* `createClient()` allocates and initializes a new client.
|
||||
* the `addReply*()` family of functions are used by commands implementations in order to append data to the client structure, that will be transmitted to the client as a reply for a given command executed.
|
||||
* `writeToClient()` transmits the data pending in the output buffers to the client and is called by the *writable event handler* `sendReplyToClient()`.
|
||||
* `readQueryFromClient()` is the *readable event handler* and accumulates data from read from the client into the query buffer.
|
||||
* `processInputBuffer()` is the entry point in order to parse the client query buffer according to the Redis protocol. Once commands are ready to be processed, it calls `processCommand()` which is defined inside `server.c` in order to actually execute the command.
|
||||
* `freeClient()` deallocates, disconnects and removes a client.
|
||||
|
||||
aof.c and rdb.c
|
||||
---
|
||||
|
||||
As you can guess from the names these files implement the RDB and AOF
|
||||
persistence for Redis. Redis uses a persistence model based on the `fork()`
|
||||
system call in order to create a thread with the same (shared) memory
|
||||
content of the main Redis thread. This secondary thread dumps the content
|
||||
of the memory on disk. This is used by `rdb.c` to create the snapshots
|
||||
on disk and by `aof.c` in order to perform the AOF rewrite when the
|
||||
append only file gets too big.
|
||||
|
||||
The implementation inside `aof.c` has additional functions in order to
|
||||
implement an API that allows commands to append new commands into the AOF
|
||||
file as clients execute them.
|
||||
|
||||
The `call()` function defined inside `server.c` is responsible to call
|
||||
the functions that in turn will write the commands into the AOF.
|
||||
|
||||
db.c
|
||||
---
|
||||
|
||||
Certain Redis commands operate on specific data types, others are general.
|
||||
Examples of generic commands are `DEL` and `EXPIRE`. They operate on keys
|
||||
and not on their values specifically. All those generic commands are
|
||||
defined inside `db.c`.
|
||||
|
||||
Moreover `db.c` implements an API in order to perform certain operations
|
||||
on the Redis dataset without directly accessing the internal data structures.
|
||||
|
||||
The most important functions inside `db.c` which are used in many commands
|
||||
implementations are the following:
|
||||
|
||||
* `lookupKeyRead()` and `lookupKeyWrite()` are used in order to get a pointer to the value associated to a given key, or `NULL` if the key does not exist.
|
||||
* `dbAdd()` and its higher level counterpart `setKey()` create a new key in a Redis database.
|
||||
* `dbDelete()` removes a key and its associated value.
|
||||
* `emptyDb()` removes an entire single database or all the databases defined.
|
||||
|
||||
The rest of the file implements the generic commands exposed to the client.
|
||||
|
||||
object.c
|
||||
---
|
||||
|
||||
The `robj` structure defining Redis objects was already described. Inside
|
||||
`object.c` there are all the functions that operate with Redis objects at
|
||||
a basic level, like functions to allocate new objects, handle the reference
|
||||
counting and so forth. Notable functions inside this file:
|
||||
|
||||
* `incrRefcount()` and `decrRefCount()` are used in order to increment or decrement an object reference count. When it drops to 0 the object is finally freed.
|
||||
* `createObject()` allocates a new object. There are also specialized functions to allocate string objects having a specific content, like `createStringObjectFromLongLong()` and similar functions.
|
||||
|
||||
This file also implements the `OBJECT` command.
|
||||
|
||||
replication.c
|
||||
---
|
||||
|
||||
This is one of the most complex files inside Redis, it is recommended to
|
||||
approach it only after getting a bit familiar with the rest of the code base.
|
||||
In this file there is the implementation of both the master and replica role
|
||||
of Redis.
|
||||
|
||||
One of the most important functions inside this file is `replicationFeedSlaves()` that writes commands to the clients representing replica instances connected
|
||||
to our master, so that the replicas can get the writes performed by the clients:
|
||||
this way their data set will remain synchronized with the one in the master.
|
||||
|
||||
This file also implements both the `SYNC` and `PSYNC` commands that are
|
||||
used in order to perform the first synchronization between masters and
|
||||
replicas, or to continue the replication after a disconnection.
|
||||
|
||||
Other C files
|
||||
---
|
||||
|
||||
* `t_hash.c`, `t_list.c`, `t_set.c`, `t_string.c` and `t_zset.c` contains the implementation of the Redis data types. They implement both an API to access a given data type, and the client commands implementations for these data types.
|
||||
* `ae.c` implements the Redis event loop, it's a self contained library which is simple to read and understand.
|
||||
* `sds.c` is the Redis string library, check http://github.com/antirez/sds for more information.
|
||||
* `anet.c` is a library to use POSIX networking in a simpler way compared to the raw interface exposed by the kernel.
|
||||
* `dict.c` is an implementation of a non-blocking hash table which rehashes incrementally.
|
||||
* `scripting.c` implements Lua scripting. It is completely self contained from the rest of the Redis implementation and is simple enough to understand if you are familar with the Lua API.
|
||||
* `cluster.c` implements the Redis Cluster. Probably a good read only after being very familiar with the rest of the Redis code base. If you want to read `cluster.c` make sure to read the [Redis Cluster specification][3].
|
||||
|
||||
[3]: http://redis.io/topics/cluster-spec
|
||||
|
||||
Anatomy of a Redis command
|
||||
---
|
||||
|
||||
All the Redis commands are defined in the following way:
|
||||
|
||||
void foobarCommand(client *c) {
|
||||
printf("%s",c->argv[1]->ptr); /* Do something with the argument. */
|
||||
addReply(c,shared.ok); /* Reply something to the client. */
|
||||
}
|
||||
|
||||
The command is then referenced inside `server.c` in the command table:
|
||||
|
||||
{"foobar",foobarCommand,2,"rtF",0,NULL,0,0,0,0,0},
|
||||
|
||||
In the above example `2` is the number of arguments the command takes,
|
||||
while `"rtF"` are the command flags, as documented in the command table
|
||||
top comment inside `server.c`.
|
||||
|
||||
After the command operates in some way, it returns a reply to the client,
|
||||
usually using `addReply()` or a similar function defined inside `networking.c`.
|
||||
|
||||
There are tons of commands implementations inside the Redis source code
|
||||
that can serve as examples of actual commands implementations. To write
|
||||
a few toy commands can be a good exercise to familiarize with the code base.
|
||||
|
||||
There are also many other files not described here, but it is useless to
|
||||
cover everything. We want to just help you with the first steps.
|
||||
Eventually you'll find your way inside the Redis code base :-)
|
||||
|
||||
Enjoy!
|
||||
Vendored
+5
@@ -53,6 +53,11 @@ linenoise: .make-prerequisites
|
||||
|
||||
.PHONY: linenoise
|
||||
|
||||
.PHONY: memkind
|
||||
memkind:
|
||||
cd memkind && $(MAKE)
|
||||
|
||||
|
||||
ifeq ($(uname_S),SunOS)
|
||||
# Make isinf() available
|
||||
LUA_CFLAGS= -D__C99FEATURES__=1
|
||||
|
||||
Vendored
+2
-2
@@ -23,9 +23,9 @@ INSTALL_INCLUDE_PATH= $(DESTDIR)$(PREFIX)/$(INCLUDE_PATH)
|
||||
INSTALL_LIBRARY_PATH= $(DESTDIR)$(PREFIX)/$(LIBRARY_PATH)
|
||||
INSTALL_PKGCONF_PATH= $(INSTALL_LIBRARY_PATH)/$(PKGCONF_PATH)
|
||||
|
||||
# redis-server configuration used for testing
|
||||
# keydb-server configuration used for testing
|
||||
REDIS_PORT=56379
|
||||
REDIS_SERVER=redis-server
|
||||
REDIS_SERVER=keydb-server
|
||||
define REDIS_TEST_CONFIG
|
||||
daemonize yes
|
||||
pidfile /tmp/hiredis-test-redis.pid
|
||||
|
||||
Vendored
+12
-1
@@ -45,31 +45,41 @@ typedef char *sds;
|
||||
* However is here to document the layout of type 5 SDS strings. */
|
||||
struct __attribute__ ((__packed__)) sdshdr5 {
|
||||
unsigned char flags; /* 3 lsb of type, and 5 msb of string length */
|
||||
#ifndef __cplusplus
|
||||
char buf[];
|
||||
#endif
|
||||
};
|
||||
struct __attribute__ ((__packed__)) sdshdr8 {
|
||||
uint8_t len; /* used */
|
||||
uint8_t alloc; /* excluding the header and null terminator */
|
||||
unsigned char flags; /* 3 lsb of type, 5 unused bits */
|
||||
#ifndef __cplusplus
|
||||
char buf[];
|
||||
#endif
|
||||
};
|
||||
struct __attribute__ ((__packed__)) sdshdr16 {
|
||||
uint16_t len; /* used */
|
||||
uint16_t alloc; /* excluding the header and null terminator */
|
||||
unsigned char flags; /* 3 lsb of type, 5 unused bits */
|
||||
#ifndef __cplusplus
|
||||
char buf[];
|
||||
#endif
|
||||
};
|
||||
struct __attribute__ ((__packed__)) sdshdr32 {
|
||||
uint32_t len; /* used */
|
||||
uint32_t alloc; /* excluding the header and null terminator */
|
||||
unsigned char flags; /* 3 lsb of type, 5 unused bits */
|
||||
#ifndef __cplusplus
|
||||
char buf[];
|
||||
#endif
|
||||
};
|
||||
struct __attribute__ ((__packed__)) sdshdr64 {
|
||||
uint64_t len; /* used */
|
||||
uint64_t alloc; /* excluding the header and null terminator */
|
||||
unsigned char flags; /* 3 lsb of type, 5 unused bits */
|
||||
#ifndef __cplusplus
|
||||
char buf[];
|
||||
#endif
|
||||
};
|
||||
|
||||
#define SDS_TYPE_5 0
|
||||
@@ -85,7 +95,8 @@ struct __attribute__ ((__packed__)) sdshdr64 {
|
||||
|
||||
static inline size_t sdslen(const sds s) {
|
||||
unsigned char flags = s[-1];
|
||||
switch(flags&SDS_TYPE_MASK) {
|
||||
|
||||
switch(__builtin_expect((flags&SDS_TYPE_MASK), SDS_TYPE_5)) {
|
||||
case SDS_TYPE_5:
|
||||
return SDS_TYPE_5_LEN(flags);
|
||||
case SDS_TYPE_8:
|
||||
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
export JE_PREFIX=jemk_
|
||||
|
||||
.PHONY: all
|
||||
all:
|
||||
cd src; ./build_jemalloc.sh
|
||||
cd src; ./build.sh
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
cd src; make clean
|
||||
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
.cproject
|
||||
.project
|
||||
autom4te.cache/
|
||||
*.a
|
||||
*.o
|
||||
*.so
|
||||
*.la
|
||||
*.lo
|
||||
.deps/
|
||||
.dirstamp
|
||||
.libs/
|
||||
/aclocal.m4
|
||||
/ar-lib
|
||||
/compile
|
||||
/config.guess
|
||||
/config.h
|
||||
/config.h.in
|
||||
/config.log
|
||||
/config.status
|
||||
/config.sub
|
||||
/configure
|
||||
/depcomp
|
||||
/config_tls.h
|
||||
/install-sh
|
||||
/libtool
|
||||
/ltmain.sh
|
||||
/m4/
|
||||
/memkind-*.spec
|
||||
/memkind-*.tar.gz
|
||||
/Makefile
|
||||
/Makefile.in
|
||||
/missing
|
||||
/stamp-h1
|
||||
/stamp-h2
|
||||
/jemalloc/obj/
|
||||
/jemalloc/configure
|
||||
/src/memkind_defines.h.in
|
||||
/test/all_tests
|
||||
/test/.deps/
|
||||
/test/.dirstamp
|
||||
/test/.libs/
|
||||
/test/*.o
|
||||
/test/performance/.deps/
|
||||
/test/*.so
|
||||
/test/check.sh.log
|
||||
/test/check.sh.trs
|
||||
/test-suite.log
|
||||
/VERSION
|
||||
/examples/.deps/
|
||||
/examples/.dirstamp
|
||||
/examples/.libs/
|
||||
/examples/*.o
|
||||
/examples/*.lo
|
||||
/examples/*.la
|
||||
/memkind-hbw-nodes
|
||||
/test/allocator_perf_tool_tests
|
||||
/test/autohbw_candidates
|
||||
/test/locality_test
|
||||
/test/decorator_test
|
||||
/test/eratosthenes
|
||||
/test/environerr_hbw_malloc_test
|
||||
/test/environerr_test
|
||||
/test/freeing_memory_segfault_test
|
||||
/test/filter_memkind
|
||||
/test/gb_page_tests_bind_policy
|
||||
/test/hello_hbw
|
||||
/test/hello_memkind
|
||||
/test/hello_memkind_debug
|
||||
/test/mallocerr_test
|
||||
/test/memkind_allocated
|
||||
/test/new_kind
|
||||
/test/perf_tool
|
||||
/test/pmem_kinds
|
||||
/test/pmem_malloc
|
||||
/test/pmem_malloc_unlimited
|
||||
/test/pmem_usable_size
|
||||
/test/pmem_alignment
|
||||
/test/pmem_and_default_kind
|
||||
/test/pmem_multithreads
|
||||
/test/pmem_multithreads_onekind
|
||||
/test/pmem_free_with_unknown_kind
|
||||
/test/pmem_cpp_allocator
|
||||
/test/schedcpu_test
|
||||
/test/tieddisterr_test
|
||||
/test/alloc_benchmark_glibc
|
||||
/test/alloc_benchmark_hbw
|
||||
/test/alloc_benchmark_tbb
|
||||
/test/alloc_benchmark_pmem
|
||||
/test/autohbw_test_helper
|
||||
/test/environ_err_hbw_malloc_test
|
||||
/test/trace_mechanism_test_helper
|
||||
/examples/autohbw_candidates
|
||||
/examples/eratosthenes
|
||||
/examples/filter_memkind
|
||||
/examples/hello_hbw
|
||||
/examples/hello_memkind
|
||||
/examples/hello_memkind_debug
|
||||
/examples/memkind_allocated
|
||||
/examples/new_kind
|
||||
/examples/numakind_test
|
||||
/examples/numakind_macro.h
|
||||
/examples/pmem_kinds
|
||||
/examples/pmem_malloc
|
||||
/examples/pmem_malloc_unlimited
|
||||
/examples/pmem_usable_size
|
||||
/examples/pmem_alignment
|
||||
/examples/pmem_and_default_kind
|
||||
/examples/pmem_multithreads
|
||||
/examples/pmem_multithreads_onekind
|
||||
/examples/pmem_free_with_unknown_kind
|
||||
/examples/pmem_cpp_allocator
|
||||
/test-driver
|
||||
/vs
|
||||
Vendored
+80
@@ -0,0 +1,80 @@
|
||||
dist: trusty
|
||||
sudo: required
|
||||
language: cpp
|
||||
cache: ccache
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
|
||||
- name: "Astyle"
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- g++-4.8
|
||||
before_install:
|
||||
- ./install_astyle.sh
|
||||
script:
|
||||
- ./astyle.sh
|
||||
|
||||
- name: "GCC 4.8"
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- g++-4.8
|
||||
- libnuma-dev
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-4.8 && CXX=g++-4.8 && JEMALLOC_CC=gcc-4.8 && JEMALLOC_CXX=g++-4.8"
|
||||
install:
|
||||
script:
|
||||
- CXX=$JEMALLOC_CXX CC=$JEMALLOC_CC LDFLAGS="-lrt -Wl,--no-as-needed" ./build_jemalloc.sh
|
||||
- ./autogen.sh
|
||||
- LDFLAGS="-lrt -Wl,--no-as-needed" ./configure
|
||||
- make all
|
||||
- make checkprogs
|
||||
before_install:
|
||||
- eval "${MATRIX_EVAL}"
|
||||
|
||||
- name: "GCC 8.0"
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- g++-8
|
||||
- libnuma-dev
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8 && JEMALLOC_CC=gcc-8 && JEMALLOC_CXX=g++-8"
|
||||
install:
|
||||
script:
|
||||
- CXX=$JEMALLOC_CXX CC=$JEMALLOC_CC LDFLAGS="-lrt -Wl,--no-as-needed" ./build_jemalloc.sh
|
||||
- ./autogen.sh
|
||||
- LDFLAGS="-lrt -Wl,--no-as-needed" ./configure
|
||||
- make all
|
||||
- make checkprogs
|
||||
before_install:
|
||||
- eval "${MATRIX_EVAL}"
|
||||
|
||||
- name: "Clang 7"
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-trusty-7
|
||||
packages:
|
||||
- g++-4.8
|
||||
- clang-7
|
||||
- libnuma-dev
|
||||
env:
|
||||
- MATRIX_EVAL="CC=clang-7 && CXX=clang++-7 && JEMALLOC_CC=gcc-4.8 && JEMALLOC_CXX=g++-4.8"
|
||||
install:
|
||||
script:
|
||||
- CXX=$JEMALLOC_CXX CC=$JEMALLOC_CC LDFLAGS="-lrt -Wl,--no-as-needed" ./build_jemalloc.sh
|
||||
- ./autogen.sh
|
||||
- LDFLAGS="-lrt -Wl,--no-as-needed" ./configure
|
||||
- make all
|
||||
before_install:
|
||||
- eval "${MATRIX_EVAL}"
|
||||
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
Christopher Cantalupo <christopher.m.cantalupo@intel.com>
|
||||
Vishwanath Venkatesan <vishwanath.venkatesan@intel.com>
|
||||
Steven Hampson <steven.t.hampson@intel.com>
|
||||
Krzysztof Czurylo <krzysztof.czurylo@intel.com>
|
||||
Leobardo Rountree <leobardo.r.rountree@intel.com>
|
||||
Hector Barajas Villalobos <hector.a.barajas.villalobos@intel.com>
|
||||
Ruchira Sasanka <ruchira.sasanka@intel.com>
|
||||
Krzysztof Kulakowski <krzysztof.kulakowski@intel.com>
|
||||
Rafael Aquini <aquini@redhat.com>
|
||||
Alexandr Konovalov <alexandr.konovalov@intel.com>
|
||||
Grzegorz Ozanski <grzegorz.ozanski@intel.com>
|
||||
Artur Koziej <artur.koziej@intel.com>
|
||||
Jakub Dlugolecki <jakub.dlugolecki@intel.com>
|
||||
Lukasz Anaczkowski <lukasz.anaczkowski@intel.com>
|
||||
Agata Wozniak <agata.wozniak@intel.com>
|
||||
Grzegorz Andrejczuk <grzegorz.andrejczuk@intel.com>
|
||||
Kamil Patelczyk <kamil.patelczyk@intel.com>
|
||||
Jeff Hammond <jeff.r.hammond@intel.com>
|
||||
Aleksandra Hernik <aleksandra.hernik@intel.com>
|
||||
Pawel Kochanek <pawel.b.kochanek@intel.com>
|
||||
Katarzyna Wasiuta <katarzyna.wasiuta@intel.com>
|
||||
Krzysztof Filipek <krzysztof.filipek@intel.com>
|
||||
Michal Biesek <michal.biesek@intel.com>
|
||||
Vendored
+134
@@ -0,0 +1,134 @@
|
||||
CONTRIBUTING
|
||||
============
|
||||
|
||||
This file is intended to help those interested in contributing to the
|
||||
memkind library.
|
||||
|
||||
|
||||
COMMUNICATION
|
||||
=============
|
||||
|
||||
Please participate in the memkind mailing list:
|
||||
|
||||
https://lists.01.org/mailman/listinfo/memkind
|
||||
|
||||
There is also the option of opening an issue through github:
|
||||
|
||||
https://github.com/memkind/memkind/issues
|
||||
|
||||
The mailing list is intended for discussion and the issues are useful
|
||||
for tracking progress on tasks. The TODO file lists out a number of
|
||||
topics, and in order to prioritize one of them please open a github
|
||||
issue with a related subject.
|
||||
|
||||
|
||||
TESTING
|
||||
=======
|
||||
|
||||
The tests require a Linux kernel newer than 3.11 (the details are
|
||||
documented in the memkind README), and the reservation of 3000 huge
|
||||
pages. The huge pages can be reserved with the following command:
|
||||
|
||||
$ sudo echo 3000 > /proc/sys/vm/nr_hugepages
|
||||
|
||||
Only in the case where gigabyte pages have been reserved will the
|
||||
tests associated with gigabyte pages be executed. Reserving gigabyte
|
||||
pages may require a modification to the kernel command line unless the
|
||||
kernel is quite recent.
|
||||
|
||||
To test memkind simply execute the "make check" target after building.
|
||||
This target calls memkind/test/test.sh with parameters
|
||||
depending on the environment.
|
||||
|
||||
Most of the tests are written within the gtest framework, however, as
|
||||
part of testing the example programs are also executed and the return
|
||||
code of the executable determines pass or fail. The autotools test
|
||||
infrastructure is used as a high level executor, but it does not track
|
||||
individual tests. The consequence of this is that the autotools
|
||||
output records only one high level test which passes in the case where
|
||||
every underlying test was successful and fails if any underlying test
|
||||
fails. The individual test results are recorded in the directory
|
||||
called "gtest_output." Here you will find the log of the tests in
|
||||
gtest_output/test.out and a set of junit style xml results: one for
|
||||
each test. Note that a side effect of having only one autotools test
|
||||
is that autotools parallel testing is disabled. We have
|
||||
multi-threaded tests that use the OpenMP run-time which enables more
|
||||
purposeful and deterministic testing of threading issues. Note that
|
||||
the OpenMP run-time is only required for testing, it is not used by
|
||||
the memkind library internally.
|
||||
|
||||
|
||||
CODING STYLE
|
||||
============
|
||||
|
||||
Before submitting a patch for inclusion, please run the modified
|
||||
source code files through astyle with the following options
|
||||
|
||||
$ astyle --style=linux --indent=spaces=4 -S --max-continuation-indent=80 \
|
||||
--max-code-length=80 --break-after-logical --indent-namespaces -z2 \
|
||||
--align-pointer=name
|
||||
|
||||
More information about astyle can be found here:
|
||||
|
||||
http://astyle.sourceforge.net/
|
||||
|
||||
In C, source code constants are in all caps and everything else is in
|
||||
all lower case. Underscores are used to separate words within a
|
||||
symbol name. No camel case shall be used in C code. The test code is
|
||||
largely written in C++. Here camel-case should be used for class
|
||||
names and should always have a capitalized first letter. Other
|
||||
symbols in C++ should generally follow the C style.
|
||||
|
||||
Most symbols with global scope shall be prefixed with "memkind_" or
|
||||
"hbw_" depending on which interface they are a part of.
|
||||
|
||||
Any global variable shall have _g appended to the variable name and in
|
||||
most cases shall be statically scoped within a single compilation
|
||||
unit. The exception to that rule are static memory kinds that are
|
||||
declared as extern within the associated interface header and are
|
||||
constant after initialization. Global variables should be used in a
|
||||
very narrow set of circumstances and in most cases modifications
|
||||
should be guarded with pthread_once(3).
|
||||
|
||||
Functions not used outside of the compilation unit shall be declared
|
||||
as static. All functions which are not declared as static shall be
|
||||
documented in a man page and have an associated interface header file.
|
||||
|
||||
Preprocessor mark-up is discouraged when other options are possible.
|
||||
Please use enum in place of #define when value control at configure or
|
||||
build time is not required.
|
||||
|
||||
|
||||
TESTS
|
||||
=====
|
||||
|
||||
The current state of the tests is not nearly as well organized as it
|
||||
could be. That being said, it is quite simple to add a new test.
|
||||
Most C++ files in the test directory are associated with a single
|
||||
gtest testing::Test class. These classes usually have several
|
||||
associated test fixtures in the same file. If a new test can be added
|
||||
as a fixture to an existing class, simply add the fixture to the file
|
||||
and the test will be incorporated into the test infrastructure.
|
||||
If a new class is required, create a new file and add it to the list
|
||||
of "test_all_tests_SOURCES" in memkind/test/Makfile.mk and it will
|
||||
be incorporated into the test infrastructure.
|
||||
|
||||
There are a few files which define classes which are not google test
|
||||
classes. These are check.cpp, trial_generator.cpp and main.cpp. The
|
||||
check.cpp file defines a class Check that can be used to validate
|
||||
fundamental memkind features like NUMA node location, and page size.
|
||||
The trial_generator.cpp file is used to abstract a sequence of
|
||||
allocation and deallocation calls while performing checks on the
|
||||
results of each call; this can be used to apply similar tests to all
|
||||
of the different allocation APIs. The main.cpp file is a simple
|
||||
wrapper around testing::InitGoogleTest and RUN_ALL_TESTS().
|
||||
|
||||
|
||||
SUBMITTING A PATCH
|
||||
==================
|
||||
|
||||
Please be sure that all tests pass before submission and that the
|
||||
style conforms to the specifications given here. If a new feature is
|
||||
implemented in the patch, please also include unit tests and an
|
||||
example which exercises this feature. Once these requirements have
|
||||
been met, please submit a pull request through github.
|
||||
Vendored
+25
@@ -0,0 +1,25 @@
|
||||
Unless otherwise specified, files in the memkind source distribution are
|
||||
subject to the following license:
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of Intel Corporation nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
Vendored
+219
@@ -0,0 +1,219 @@
|
||||
* Mon Dec 10 2018 Michal Biesek <michal.biesek@intel.com> v1.8.0
|
||||
- Fixed error with realloc/free method with passing thread-specific cache flag
|
||||
- Fixed error with memkind_create_pmem(), if other PMEM kind was destroyed before
|
||||
- Fixed error with zeroing large allocations in PMEM kind
|
||||
- Added support to create kind without maximum size limit of PMEM kind (max_size=0)
|
||||
- Extended memkind API with memkind_malloc_usable_size()
|
||||
- Removed EXPERIMENTAL from most methods in memkind API
|
||||
- Added MEMKIND_ERROR_ARENAS_CREATE code
|
||||
- Added C++ allocator for PMEM kind
|
||||
- Extended PMEM examples
|
||||
- Fixed integration with Travis CI
|
||||
- Extended Travis CI configuration with Astyle and Coverage
|
||||
- Added PMEM kind tests
|
||||
|
||||
* Wed Jan 24 2018 Pawel Kochanek <pawel.b.kochanek@intel.com> v1.7.0
|
||||
- Updated internally used jemalloc to upstream version 5.0.
|
||||
- Fixed error that has been occuring while memkind was dynamically loaded.
|
||||
- Fixed MEMKIND_HBW_NODES behavior for single NUMA node system.
|
||||
- Removed licenses other than BSD 3-clause from COPYING.
|
||||
- Changed build instructions.
|
||||
- Added configurable jemalloc prefix in build scripts.
|
||||
- Upgraded gtest to version 1.8.0.
|
||||
- Added memory footprint tests.
|
||||
- Added locality test for MEMKIND_PREFERRED.
|
||||
- Applied test parametrization in BATests.
|
||||
- Fixed problems with pytest testing in Travis.
|
||||
- Added huge page configuration in several tests.
|
||||
- Removed several symbols that are no longer exposed in public API from man pages.
|
||||
- Fixed HBW_POLICY_BIND_ALL documentation.
|
||||
|
||||
* Tue Jun 13 2017 Artur Koziej <artur.koziej@intel.com> v1.6.0
|
||||
- Introduced new policy HBW_POLICY_BIND_ALL.
|
||||
- Introduced MEMKIND_HBW_ALL, MEMKIND_HBW_ALL_HUGETLB and MEMKIND_REGULAR kinds.
|
||||
- Fixed hbw_posix_memalign_psize() return value in case of unsupported policy and
|
||||
page size combination.
|
||||
- Documented supported policy and page size combination for
|
||||
hbw_posix_memalign_psize().
|
||||
- Merged libmemkind.a and libjemalloc_pic.a into a single static library.
|
||||
- Fixed OOM during tcache acquisition.
|
||||
- Tuned huge pages configuration in memkind tests.
|
||||
- Added stress tests for allocations with large random sizes.
|
||||
- Added stress tests for allocations with random kinds.
|
||||
- Extended policy and NUMA node binding tests.
|
||||
- Fixed several Travis build problems.
|
||||
- Removed gb_page_tests_preferred_policy tests.
|
||||
|
||||
* Tue Feb 21 2017 Krzysztof Kulakowski <krzysztof.kulakowski@intel.com> v1.5.0
|
||||
- Intel(R) TBB scalable_allocator can be used as heap management alternative
|
||||
to jemalloc (requires installed Intel (R) TBB package and environment variable
|
||||
MEMKIND_HEAP_MANAGER=TBB)
|
||||
- Updated internally used jemalloc to upstream version 4.3.1 (previously modified 3.5.1)
|
||||
- Introduced new environment option MEMKIND_HOG_MEMORY. Setting it to "1" will prevent
|
||||
memkind from releasing memory to OS.
|
||||
- Introduced support for KNM processor from Intel(R) Xeon Phi(TM) family
|
||||
- General cleanup of build scripts (e.g. fixed issues found on Ubuntu,
|
||||
introduced simple build.sh script)
|
||||
- Deprecated support for gigabyte-pages
|
||||
- Removed number of previously deprecated symbols
|
||||
|
||||
* Thu Nov 17 2016 Krzysztof Kulakowski <krzysztof.kulakowski@intel.com> v1.4.0
|
||||
- Introduced hbw_verify_memory_region() for verifying if provided memory
|
||||
region fully falls into high-bandwidth memory (for details please take a look
|
||||
at man/hbwmalloc.3).
|
||||
- New API for creating kinds using set of predefined attributes:
|
||||
memkind_create_kind(), memkind_destroy_kind() (for details please take a look
|
||||
at man/memkind.3).
|
||||
- Fixed issue in autohbw where it was reporting limit error regardless of
|
||||
value provided.
|
||||
- Added logging on error paths.
|
||||
- Test base fixes and improvements.
|
||||
|
||||
* Tue Sep 27 2016 Krzysztof Kulakowski <krzysztof.kulakowski@intel.com> v1.3.0
|
||||
- Introduced logging mechanism (for details please take a look at
|
||||
man/memkind.3).
|
||||
- Deprecated symbols: memkind_finalize(), memkind_get_num_kind(),
|
||||
memkind_get_kind_by_partition(), memkind_get_kind_by_name(),
|
||||
memkind_partition_mmap(), memkind_get_size(), MEMKIND_ERROR_MEMALIGN,
|
||||
MEMKIND_ERROR_MALLCTL, MEMKIND_ERROR_GETCPU, MEMKIND_ERROR_PMTT,
|
||||
MEMKIND_ERROR_TIEDISTANCE, MEMKIND_ERROR_ALIGNMENT, MEMKIND_ERROR_MALLOCX,
|
||||
MEMKIND_ERROR_REPNAME, MEMKIND_ERROR_PTHREAD, MEMKIND_ERROR_BADPOLICY,
|
||||
MEMKIND_ERROR_REPPOLICY.
|
||||
- Added integration with hwloc (turned on with --with-hwloc).
|
||||
- Cleanup of symbols exposed by libmemkind.so (e.g. no longer exposing libnuma
|
||||
and jemalloc symbols).
|
||||
- AutoHBW files have been moved to "memkind/autohbw" directory, code has
|
||||
been refactored and tests have been added to appropriate scenarios.
|
||||
- Library is now built with flags improving security (can be turned off
|
||||
with --disable-secure configure time option).
|
||||
- Changed configuration of jemalloc to turn off unused features.
|
||||
|
||||
* Thu Aug 18 2016 Krzysztof Kulakowski <krzysztof.kulakowski@intel.com> v1.2.0
|
||||
- memkind_create() and memkind_ops have been deprecated (moved to
|
||||
memkind_deprecated.h).
|
||||
- Deprecated the headers from memkind/internal and added compile-time
|
||||
warnings to them (plan is to remove those from rpm packages).
|
||||
- autohbw files have been moved to memkind/autohbw directory.
|
||||
- API decorators (memkind_malloc_pre, memkind_malloc_post etc.) now
|
||||
need to be enabled with configure-time option --enable-decorators.
|
||||
- Allocation time optimizations with up to 20% improvement.
|
||||
|
||||
* Wed Jul 13 2016 Krzysztof Kulakowski <krzysztof.kulakowski@intel.com> v1.1.1
|
||||
- Performance improvement for memkind_free() in scenario where NULL
|
||||
was passed as kind (reduced by 60%).
|
||||
- Introduced integration with Travis CI.
|
||||
- Fixed issue where memory returned from calloc was not filled with zeroes
|
||||
when using memkind_pmem kinds.
|
||||
- Fixed issue where interleave kinds was failing on systems without
|
||||
Transparent Huge Pages module configured.
|
||||
- Resolved several issues that was causing compilation errors on some systems.
|
||||
- test/test.sh is now able to detect system configuration, and run only those
|
||||
tests which requirements are meet.
|
||||
- Added gtest to repo to avoid downloading it during build proecess.
|
||||
|
||||
* Mon May 23 2016 Krzysztof Kulakowski <krzysztof.kulakowski@intel.com> v1.1.0
|
||||
- Implemented algorithm for detecting high-bandwidth memory on Intel Xeon Phi X200
|
||||
without parsing PMTT.
|
||||
- PMTT-parsing service has been removed.
|
||||
- memkind struct definition from memkind.h has been replaced by forward
|
||||
declaration. Definition has been moved to /internal/memkind_private.h and
|
||||
shouldn't be considered as part of library interface anymore.
|
||||
- Performance improvment for hugetlb kinds (check_available() is no longer
|
||||
parsing sysfs every time).
|
||||
- Performance fix by removing --enable-safe from jemmaloc build flags.
|
||||
- New tests for validating high-bandwidth memory detection has been added.
|
||||
- AFTS has been split into two groups: memkind-afts.ts and memkind-afts-ext.ts,
|
||||
based on amount of required memory (for details view test/README).
|
||||
|
||||
* Thu Mar 03 2016 Artur Koziej <artur.koziej@intel.com> v1.0.0
|
||||
- hbwmalloc.h released as stable API.
|
||||
- Introduce API standards: STANDARD API, NON-STANDARD API, EXPERIMENTAL API.
|
||||
- Introduce memkind versioning API.
|
||||
- Fix type names in hbwmalloc API.
|
||||
- Change error codes to POSIX standard ones in hbwmalloc API.
|
||||
- Move API headers to include directory.
|
||||
- Move NON-STANDARD API, or EXPERIMENTAL API to include/memkind/internal directory.
|
||||
- New man page (memkind_interleave.3) describing interleave kind.
|
||||
- Significant documentation improvement.
|
||||
- Performance fix for jemalloc - significantly decrease of library initialization time.
|
||||
- Enforce 2MB alignment in jemalloc due to the Linux kernel bug (munmap() fails for
|
||||
huge pages, when the size is not aligned).
|
||||
- Move to systemd defined service (memkind.service), drop init.d script.
|
||||
- New rpm layout (memkind and memkind-devel).
|
||||
- Remove false dependency on OpenMP.
|
||||
- Extend test base for stress, longevity and initialization performance tests.
|
||||
- Fix memory leak in ctl_growk().
|
||||
- Rename namespace: hbwmalloc -> hbw.
|
||||
- Rename class: hbwmalloc_allocator -> allocator.
|
||||
|
||||
* Thu Oct 15 2015 Krzysztof Kulakowski <krzysztof.kulakowski@intel.com> v0.3.0
|
||||
- Added two new kinds: MEMKIND_INTERLEAVE and MEMKIND_HBW_INTERLEAVE
|
||||
(for details please take a look at man/memkind.3)
|
||||
- Added support for file-backed memory heaps
|
||||
(for details please take a look at man/memkind_pmem.3)
|
||||
- Added autohbw library, that intercepts the standard heap allocations,
|
||||
which let use high-bandwidth memory without modifying existing codebase
|
||||
(for details please take a look at examples/autohbw_README)
|
||||
- jemalloc is now, staticly linked, internal component of memkind RPM
|
||||
instead of rpm dependency.
|
||||
- Added memkind_allocated example which demonstrates usage of memkind
|
||||
with alignas() alignment specifier introduced in C++11
|
||||
(for details please take a look at examples/README)
|
||||
- Added support for using thread local storage to improve performance in
|
||||
multithreaded applications (enabled by configure time option: --enable-tls)
|
||||
- Added posibility to set number of jemalloc arenas per kind by
|
||||
configure time parameter or enviromental variable
|
||||
(for details please take a look at MEMKIND_ARENA_NUM_PER_KIND section
|
||||
of man/memkind.3).
|
||||
- Added decorators to the memkind allocation APIs.
|
||||
These are weak symbols (pre and post for each API) which can modify
|
||||
the input and output of each of the calls.
|
||||
- Significantly extended test base (new groups of tests: performance,
|
||||
multithreaded, PMTT, nagtive, stress).
|
||||
|
||||
* Fri Jan 9 2015 Christopher Cantalupo <christopher.m.cantalupo@intel.com> v0.2.0
|
||||
- Bumped memkind ABI version to 0:1:0.
|
||||
- Removed memkind_get_kind_for_free() from externally facing API's. Instead if
|
||||
memkind_free() is called with zero passed for the kind then
|
||||
memkind_get_kind_for_free() is called internally.
|
||||
- Moved to single callback memkind_partition_mmap() to simplify
|
||||
jemalloc modifications.
|
||||
- Added hooks for setting file descriptor and offset for mmap enabling
|
||||
file-backed memory kinds.
|
||||
- Added a void pointer called "priv" to memkind structure for storing data for
|
||||
user-defined kinds.
|
||||
- Removed call to sched_getcpu(), now thread id is hashed to determine the arena
|
||||
index.
|
||||
- Added weak symbol hooks for decorating the heap management functions.
|
||||
- Fixed several issues with init.d/memkind script and spec file scriptlets that
|
||||
are exposed by SLES-12.
|
||||
- Introduced an example library called numakind.
|
||||
The numakind library will allocate from the closest NUMA node to a thread as
|
||||
measured when that thread makes its first allocation call.
|
||||
- Fixed error handling in memkind_gbtlb_mmap() that could cause a segfault when
|
||||
gigabyte pages are not available.
|
||||
- Added tests for PMTT parser.
|
||||
- Removed binary mock PMTT table from source code, replaced it with a hexdump.
|
||||
- Fixed a number of issues in test scripts which were suppressing errors.
|
||||
- Removed unnecessary includes from header files.
|
||||
- Better error checking in example code.
|
||||
- Documentation update and clean up.
|
||||
|
||||
* Thu Nov 13 2014 Christopher Cantalupo <christopher.m.cantalupo@intel.com> v0.1.0
|
||||
- Increased test code coverage significantly.
|
||||
- Fixed bug in memkind_error_message() for MEMKIND_ERROR_TOOMANY.
|
||||
- Removed memkind_arena_free() API since it was redundant with memkind_default_free().
|
||||
- Static memkind structs are now declared as extern in the headers and defined in the
|
||||
source files files rather than being statically defined in the headers.
|
||||
|
||||
* Thu Oct 30 2014 Christopher Cantalupo <christopher.m.cantalupo@intel.com> v0.0.9
|
||||
- Now building with autotools.
|
||||
- Updated documentation.
|
||||
- Fixed typo in copyright.
|
||||
- Fixed test scripts to properly handle return code of each test.
|
||||
- Added C++03 standard allocator that uses hbw_malloc and hbw_free.
|
||||
* Tue Sep 30 2014 Christopher Cantalupo <christopher.m.cantalupo@intel.com> v0.0.8
|
||||
- Added GBTLB functionality, code clean up, documentation updates,
|
||||
examples directory. Examples includes stream modified to use
|
||||
memkind interface. Code coverage still lacking, and documentation
|
||||
incomplete.
|
||||
Vendored
+370
@@ -0,0 +1,370 @@
|
||||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
notice and this notice are preserved. This file is offered as-is,
|
||||
without warranty of any kind.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
Briefly, the shell commands `./configure; make; make install' should
|
||||
configure, build, and install this package. The following
|
||||
more-detailed instructions are generic; see the `README' file for
|
||||
instructions specific to this package. Some packages provide this
|
||||
`INSTALL' file but do not implement all of the features documented
|
||||
below. The lack of an optional feature in a given package is not
|
||||
necessarily a bug. More recommendations for GNU packages can be found
|
||||
in *note Makefile Conventions: (standards)Makefile Conventions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You need `configure.ac' if
|
||||
you want to change it or regenerate `configure' using a newer version
|
||||
of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system.
|
||||
|
||||
Running `configure' might take a while. While running, it prints
|
||||
some messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package, generally using the just-built uninstalled binaries.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation. When installing into a prefix owned by root, it is
|
||||
recommended that the package be configured and built as a regular
|
||||
user, and only the `make install' phase executed with root
|
||||
privileges.
|
||||
|
||||
5. Optionally, type `make installcheck' to repeat any self-tests, but
|
||||
this time using the binaries in their final installed location.
|
||||
This target does not install anything. Running this target as a
|
||||
regular user, particularly if the prior `make install' required
|
||||
root privileges, verifies that the installation completed
|
||||
correctly.
|
||||
|
||||
6. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
7. Often, you can also type `make uninstall' to remove the installed
|
||||
files again. In practice, not all packages have tested that
|
||||
uninstallation works correctly, even though it is required by the
|
||||
GNU Coding Standards.
|
||||
|
||||
8. Some packages, particularly those that use Automake, provide `make
|
||||
distcheck', which can by used by developers to test that all other
|
||||
targets like `make install' and `make uninstall' work correctly.
|
||||
This target is generally not run by end users.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. Run `./configure --help'
|
||||
for details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you can use GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'. This
|
||||
is known as a "VPATH" build.
|
||||
|
||||
With a non-GNU `make', it is safer to compile the package for one
|
||||
architecture at a time in the source code directory. After you have
|
||||
installed the package for one architecture, use `make distclean' before
|
||||
reconfiguring for another architecture.
|
||||
|
||||
On MacOS X 10.5 and later systems, you can create libraries and
|
||||
executables that work on multiple system types--known as "fat" or
|
||||
"universal" binaries--by specifying multiple `-arch' options to the
|
||||
compiler but only a single `-arch' option to the preprocessor. Like
|
||||
this:
|
||||
|
||||
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||
CPP="gcc -E" CXXCPP="g++ -E"
|
||||
|
||||
This is not guaranteed to produce working output in all cases, you
|
||||
may have to build one architecture at a time and combine the results
|
||||
using the `lipo' tool if you have problems.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' installs the package's commands under
|
||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||
can specify an installation prefix other than `/usr/local' by giving
|
||||
`configure' the option `--prefix=PREFIX', where PREFIX must be an
|
||||
absolute file name.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||
PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them. In general, the
|
||||
default for these options is expressed in terms of `${prefix}', so that
|
||||
specifying just `--prefix' will affect all of the other directory
|
||||
specifications that were not explicitly provided.
|
||||
|
||||
The most portable way to affect installation locations is to pass the
|
||||
correct locations to `configure'; however, many packages provide one or
|
||||
both of the following shortcuts of passing variable assignments to the
|
||||
`make install' command line to change installation locations without
|
||||
having to reconfigure or recompile.
|
||||
|
||||
The first method involves providing an override variable for each
|
||||
affected directory. For example, `make install
|
||||
prefix=/alternate/directory' will choose an alternate location for all
|
||||
directory configuration variables that were expressed in terms of
|
||||
`${prefix}'. Any directories that were specified during `configure',
|
||||
but not in terms of `${prefix}', must each be overridden at install
|
||||
time for the entire installation to be relocated. The approach of
|
||||
makefile variable overrides for each directory variable is required by
|
||||
the GNU Coding Standards, and ideally causes no recompilation.
|
||||
However, some platforms have known limitations with the semantics of
|
||||
shared libraries that end up requiring recompilation when using this
|
||||
method, particularly noticeable in packages that use GNU Libtool.
|
||||
|
||||
The second method involves providing the `DESTDIR' variable. For
|
||||
example, `make install DESTDIR=/alternate/directory' will prepend
|
||||
`/alternate/directory' before all installation names. The approach of
|
||||
`DESTDIR' overrides is not required by the GNU Coding Standards, and
|
||||
does not work on platforms that have drive letters. On the other hand,
|
||||
it does better at avoiding recompilation issues, and works well even
|
||||
when some directory options were not specified in terms of `${prefix}'
|
||||
at `configure' time.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Some packages offer the ability to configure how verbose the
|
||||
execution of `make' will be. For these packages, running `./configure
|
||||
--enable-silent-rules' sets the default to minimal output, which can be
|
||||
overridden with `make V=1'; while running `./configure
|
||||
--disable-silent-rules' sets the default to verbose, which can be
|
||||
overridden with `make V=0'.
|
||||
|
||||
Particular systems
|
||||
==================
|
||||
|
||||
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
|
||||
CC is not installed, it is recommended to use the following options in
|
||||
order to use an ANSI C compiler:
|
||||
|
||||
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
|
||||
|
||||
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
||||
|
||||
HP-UX `make' updates targets which have the same time stamps as
|
||||
their prerequisites, which makes it generally unusable when shipped
|
||||
generated files such as `configure' are involved. Use GNU `make'
|
||||
instead.
|
||||
|
||||
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
||||
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
||||
a workaround. If GNU CC is not installed, it is therefore recommended
|
||||
to try
|
||||
|
||||
./configure CC="cc"
|
||||
|
||||
and if that doesn't work, try
|
||||
|
||||
./configure CC="cc -nodtk"
|
||||
|
||||
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
|
||||
directory contains several dysfunctional programs; working variants of
|
||||
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
|
||||
in your `PATH', put it _after_ `/usr/bin'.
|
||||
|
||||
On Haiku, software installed for all users goes in `/boot/common',
|
||||
not `/usr/local'. It is recommended to use the following options:
|
||||
|
||||
./configure --prefix=/boot/common
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out
|
||||
automatically, but needs to determine by the type of machine the package
|
||||
will run on. Usually, assuming the package is built to be run on the
|
||||
_same_ architectures, `configure' can figure that out, but if it prints
|
||||
a message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS
|
||||
KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the option `--target=TYPE' to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||
an Autoconf limitation. Until the limitation is lifted, you can use
|
||||
this workaround:
|
||||
|
||||
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of all of the options to `configure', and exit.
|
||||
|
||||
`--help=short'
|
||||
`--help=recursive'
|
||||
Print a summary of the options unique to this package's
|
||||
`configure', and exit. The `short' variant lists options used
|
||||
only in the top level, while the `recursive' variant lists options
|
||||
also present in any nested packages.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--prefix=DIR'
|
||||
Use DIR as the installation prefix. *note Installation Names::
|
||||
for more details, including other options available for fine-tuning
|
||||
the installation locations.
|
||||
|
||||
`--no-create'
|
||||
`-n'
|
||||
Run the configure checks, but stop before creating any output
|
||||
files.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
Vendored
+469
@@ -0,0 +1,469 @@
|
||||
AUTHORS
|
||||
COPYING
|
||||
CONTRIBUTING
|
||||
ChangeLog
|
||||
INSTALL
|
||||
Makefile.am
|
||||
NEWS
|
||||
PULL_REQUEST_TEMPLATE.md
|
||||
README
|
||||
.travis.yml
|
||||
astyle.sh
|
||||
autogen.sh
|
||||
build.sh
|
||||
build_jemalloc.sh
|
||||
configure.ac
|
||||
autohbw/Makefile.mk
|
||||
autohbw/autohbw.c
|
||||
autohbw/autohbw_get_src_lines.pl
|
||||
autohbw/autohbw_README
|
||||
autohbw/autohbw_test.sh
|
||||
examples/autohbw_candidates.c
|
||||
examples/filter_example.c
|
||||
examples/hello_memkind_example.c
|
||||
examples/README
|
||||
examples/Makefile.mk
|
||||
examples/hello_hbw_example.c
|
||||
examples/memkind_allocated_example.cpp
|
||||
examples/memkind_allocated.hpp
|
||||
examples/memkind_decorator_debug.c
|
||||
examples/pmem_kinds.c
|
||||
examples/pmem_malloc.c
|
||||
examples/pmem_malloc_unlimited.c
|
||||
examples/pmem_usable_size.c
|
||||
examples/pmem_alignment.c
|
||||
examples/pmem_and_default_kind.c
|
||||
examples/pmem_multithreads.c
|
||||
examples/pmem_multithreads_onekind.c
|
||||
examples/pmem_free_with_unknown_kind.c
|
||||
examples/pmem_cpp_allocator.cpp
|
||||
install_astyle.sh
|
||||
m4/ax_cxx_compile_stdcxx.m4
|
||||
m4/ax_cxx_compile_stdcxx_11.m4
|
||||
m4/ax_pthread.m4
|
||||
man/memkind-hbw-nodes.1
|
||||
man/hbwmalloc.3
|
||||
man/memkind.3
|
||||
man/memkind_arena.3
|
||||
man/memkind_default.3
|
||||
man/memkind_hbw.3
|
||||
man/memkind_hugetlb.3
|
||||
man/memkind_pmem.3
|
||||
man/hbwallocator.3
|
||||
man/pmemallocator.3
|
||||
man/autohbw.7
|
||||
memkind.spec.mk
|
||||
src/heap_manager.c
|
||||
src/hbwmalloc.c
|
||||
src/memkind.c
|
||||
src/memkind_arena.c
|
||||
src/memkind_default.c
|
||||
src/memkind_gbtlb.c
|
||||
src/memkind_hbw.c
|
||||
src/memkind_regular.c
|
||||
src/memkind_hugetlb.c
|
||||
src/memkind_interleave.c
|
||||
src/memkind_pmem.c
|
||||
src/memkind_log.c
|
||||
src/memkind-hbw-nodes.c
|
||||
src/tbb_wrapper.c
|
||||
src/Makefile.mk
|
||||
include/hbwmalloc.h
|
||||
include/memkind.h
|
||||
include/memkind_deprecated.h
|
||||
include/hbw_allocator.h
|
||||
include/pmem_allocator.h
|
||||
include/memkind/internal/heap_manager.h
|
||||
include/memkind/internal/memkind_arena.h
|
||||
include/memkind/internal/memkind_default.h
|
||||
include/memkind/internal/memkind_gbtlb.h
|
||||
include/memkind/internal/memkind_hbw.h
|
||||
include/memkind/internal/memkind_regular.h
|
||||
include/memkind/internal/memkind_hugetlb.h
|
||||
include/memkind/internal/memkind_interleave.h
|
||||
include/memkind/internal/memkind_pmem.h
|
||||
include/memkind/internal/memkind_private.h
|
||||
include/memkind/internal/memkind_log.h
|
||||
include/memkind/internal/tbb_wrapper.h
|
||||
include/memkind/internal/tbb_mem_pool_policy.h
|
||||
test/Makefile.mk
|
||||
test/Allocator.hpp
|
||||
test/TestPolicy.hpp
|
||||
test/test.sh
|
||||
test/multithreaded_tests.cpp
|
||||
test/gb_page_tests_bind_policy.cpp
|
||||
test/environ_err_hbw_malloc_test.cpp
|
||||
test/negative_tests.cpp
|
||||
test/trial_generator.cpp
|
||||
test/check.h
|
||||
test/trial_generator.h
|
||||
test/bat_tests.cpp
|
||||
test/main.cpp
|
||||
test/common.h
|
||||
test/static_kinds_list.h
|
||||
test/check.cpp
|
||||
test/error_message_tests.cpp
|
||||
test/get_arena_test.cpp
|
||||
test/locality_test.cpp
|
||||
test/memkind_pmem_tests.cpp
|
||||
test/memkind_pmem_long_time_tests.cpp
|
||||
test/memory_footprint_test.cpp
|
||||
test/memory_manager.h
|
||||
test/random_sizes_allocator.h
|
||||
test/proc_stat.h
|
||||
test/static_kinds_tests.cpp
|
||||
test/huge_page_test.cpp
|
||||
test/hbw_verify_function_test.cpp
|
||||
test/hbw_detection_test.py
|
||||
test/autohbw_test.py
|
||||
test/trace_mechanism_test.py
|
||||
test/memkind-afts.ts
|
||||
test/memkind-afts-ext.ts
|
||||
test/memkind-slts.ts
|
||||
test/memkind-perf.ts
|
||||
test/memkind-perf-ext.ts
|
||||
test/memkind-pytests.ts
|
||||
test/performance/framework.hpp
|
||||
test/performance/framework.cpp
|
||||
test/performance/operations.hpp
|
||||
test/performance/perf_tests.hpp
|
||||
test/performance/perf_tests.cpp
|
||||
test/hbw_allocator_tests.cpp
|
||||
test/decorator_test.cpp
|
||||
test/decorator_test.h
|
||||
test/alloc_performance_tests.cpp
|
||||
test/allocator_perf_tool/AllocationSizes.hpp
|
||||
test/allocator_perf_tool/Allocation_info.hpp
|
||||
test/allocator_perf_tool/Allocation_info.cpp
|
||||
test/allocator_perf_tool/Allocator.hpp
|
||||
test/allocator_perf_tool/AllocatorFactory.hpp
|
||||
test/allocator_perf_tool/CSVLogger.hpp
|
||||
test/allocator_perf_tool/CommandLine.hpp
|
||||
test/allocator_perf_tool/Configuration.hpp
|
||||
test/allocator_perf_tool/ConsoleLog.hpp
|
||||
test/allocator_perf_tool/FunctionCalls.hpp
|
||||
test/allocator_perf_tool/FunctionCallsPerformanceTask.cpp
|
||||
test/allocator_perf_tool/FunctionCallsPerformanceTask.h
|
||||
test/allocator_perf_tool/GTestAdapter.hpp
|
||||
test/allocator_perf_tool/Iterator.hpp
|
||||
test/allocator_perf_tool/JemallocAllocatorWithTimer.hpp
|
||||
test/allocator_perf_tool/Makefile
|
||||
test/allocator_perf_tool/MemkindAllocatorWithTimer.hpp
|
||||
test/allocator_perf_tool/Numastat.hpp
|
||||
test/allocator_perf_tool/Runnable.hpp
|
||||
test/allocator_perf_tool/PmemMockup.cpp
|
||||
test/allocator_perf_tool/PmemMockup.hpp
|
||||
test/allocator_perf_tool/ScenarioWorkload.cpp
|
||||
test/allocator_perf_tool/ScenarioWorkload.h
|
||||
test/allocator_perf_tool/StandardAllocatorWithTimer.hpp
|
||||
test/allocator_perf_tool/Stats.hpp
|
||||
test/allocator_perf_tool/StressIncreaseToMax.cpp
|
||||
test/allocator_perf_tool/StressIncreaseToMax.h
|
||||
test/allocator_perf_tool/Task.hpp
|
||||
test/allocator_perf_tool/TaskFactory.hpp
|
||||
test/allocator_perf_tool/Tests.hpp
|
||||
test/allocator_perf_tool/Thread.hpp
|
||||
test/allocator_perf_tool/TimerSysTime.hpp
|
||||
test/allocator_perf_tool/VectorIterator.hpp
|
||||
test/allocator_perf_tool/Workload.hpp
|
||||
test/allocator_perf_tool/WrappersMacros.hpp
|
||||
test/allocator_perf_tool/HugePageUnmap.hpp
|
||||
test/allocator_perf_tool/HugePageOrganizer.hpp
|
||||
test/allocator_perf_tool/HBWmallocAllocatorWithTimer.hpp
|
||||
test/allocator_perf_tool/main.cpp
|
||||
test/allocate_to_max_stress_test.cpp
|
||||
test/memkind_versioning_tests.cpp
|
||||
test/heap_manager_init_perf_test.cpp
|
||||
test/autohbw_test_helper.c
|
||||
test/trace_mechanism_test_helper.c
|
||||
test/python_framework/cmd_helper.py
|
||||
test/python_framework/huge_page_organizer.py
|
||||
test/python_framework/__init__.py
|
||||
test/draw_plots.py
|
||||
test/run_alloc_benchmark.sh
|
||||
test/alloc_benchmark.c
|
||||
test/load_tbbmalloc_symbols.c
|
||||
test/tbbmalloc.h
|
||||
test/freeing_memory_segfault_test.cpp
|
||||
test/dlopen_test.cpp
|
||||
test/gtest_fused/gtest/gtest-all.cc
|
||||
test/gtest_fused/gtest/gtest.h
|
||||
test/pmem_allocator_tests.cpp
|
||||
jemalloc/.appveyor.yml
|
||||
jemalloc/.autom4te.cfg
|
||||
jemalloc/.gitattributes
|
||||
jemalloc/.gitignore
|
||||
jemalloc/.travis.yml
|
||||
jemalloc/COPYING
|
||||
jemalloc/ChangeLog
|
||||
jemalloc/INSTALL.md
|
||||
jemalloc/Makefile.in
|
||||
jemalloc/README
|
||||
jemalloc/autogen.sh
|
||||
jemalloc/bin/jemalloc-config.in
|
||||
jemalloc/bin/jemalloc.sh.in
|
||||
jemalloc/bin/jeprof.in
|
||||
jemalloc/build-aux/config.guess
|
||||
jemalloc/build-aux/config.sub
|
||||
jemalloc/build-aux/install-sh
|
||||
jemalloc/config.stamp.in
|
||||
jemalloc/configure.ac
|
||||
jemalloc/doc/html.xsl.in
|
||||
jemalloc/doc/jemalloc.xml.in
|
||||
jemalloc/doc/manpages.xsl.in
|
||||
jemalloc/doc/stylesheet.xsl
|
||||
jemalloc/include/jemalloc/internal/arena_externs.h
|
||||
jemalloc/include/jemalloc/internal/arena_inlines_a.h
|
||||
jemalloc/include/jemalloc/internal/arena_inlines_b.h
|
||||
jemalloc/include/jemalloc/internal/arena_structs_a.h
|
||||
jemalloc/include/jemalloc/internal/arena_structs_b.h
|
||||
jemalloc/include/jemalloc/internal/arena_types.h
|
||||
jemalloc/include/jemalloc/internal/assert.h
|
||||
jemalloc/include/jemalloc/internal/atomic.h
|
||||
jemalloc/include/jemalloc/internal/atomic_c11.h
|
||||
jemalloc/include/jemalloc/internal/atomic_gcc_atomic.h
|
||||
jemalloc/include/jemalloc/internal/atomic_gcc_sync.h
|
||||
jemalloc/include/jemalloc/internal/atomic_msvc.h
|
||||
jemalloc/include/jemalloc/internal/background_thread_externs.h
|
||||
jemalloc/include/jemalloc/internal/background_thread_inlines.h
|
||||
jemalloc/include/jemalloc/internal/background_thread_structs.h
|
||||
jemalloc/include/jemalloc/internal/base_externs.h
|
||||
jemalloc/include/jemalloc/internal/base_inlines.h
|
||||
jemalloc/include/jemalloc/internal/base_structs.h
|
||||
jemalloc/include/jemalloc/internal/base_types.h
|
||||
jemalloc/include/jemalloc/internal/bit_util.h
|
||||
jemalloc/include/jemalloc/internal/bitmap.h
|
||||
jemalloc/include/jemalloc/internal/ckh.h
|
||||
jemalloc/include/jemalloc/internal/ctl.h
|
||||
jemalloc/include/jemalloc/internal/extent_dss.h
|
||||
jemalloc/include/jemalloc/internal/extent_externs.h
|
||||
jemalloc/include/jemalloc/internal/extent_inlines.h
|
||||
jemalloc/include/jemalloc/internal/extent_mmap.h
|
||||
jemalloc/include/jemalloc/internal/extent_structs.h
|
||||
jemalloc/include/jemalloc/internal/extent_types.h
|
||||
jemalloc/include/jemalloc/internal/hash.h
|
||||
jemalloc/include/jemalloc/internal/hooks.h
|
||||
jemalloc/include/jemalloc/internal/jemalloc_internal_decls.h
|
||||
jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h.in
|
||||
jemalloc/include/jemalloc/internal/jemalloc_internal_externs.h
|
||||
jemalloc/include/jemalloc/internal/jemalloc_internal_includes.h
|
||||
jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_a.h
|
||||
jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_b.h
|
||||
jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h
|
||||
jemalloc/include/jemalloc/internal/jemalloc_internal_macros.h
|
||||
jemalloc/include/jemalloc/internal/jemalloc_internal_types.h
|
||||
jemalloc/include/jemalloc/internal/jemalloc_preamble.h.in
|
||||
jemalloc/include/jemalloc/internal/large_externs.h
|
||||
jemalloc/include/jemalloc/internal/malloc_io.h
|
||||
jemalloc/include/jemalloc/internal/mutex.h
|
||||
jemalloc/include/jemalloc/internal/mutex_pool.h
|
||||
jemalloc/include/jemalloc/internal/mutex_prof.h
|
||||
jemalloc/include/jemalloc/internal/nstime.h
|
||||
jemalloc/include/jemalloc/internal/pages.h
|
||||
jemalloc/include/jemalloc/internal/ph.h
|
||||
jemalloc/include/jemalloc/internal/private_namespace.sh
|
||||
jemalloc/include/jemalloc/internal/private_symbols.sh
|
||||
jemalloc/include/jemalloc/internal/prng.h
|
||||
jemalloc/include/jemalloc/internal/prof_externs.h
|
||||
jemalloc/include/jemalloc/internal/prof_inlines_a.h
|
||||
jemalloc/include/jemalloc/internal/prof_inlines_b.h
|
||||
jemalloc/include/jemalloc/internal/prof_structs.h
|
||||
jemalloc/include/jemalloc/internal/prof_types.h
|
||||
jemalloc/include/jemalloc/internal/public_namespace.sh
|
||||
jemalloc/include/jemalloc/internal/public_unnamespace.sh
|
||||
jemalloc/include/jemalloc/internal/ql.h
|
||||
jemalloc/include/jemalloc/internal/qr.h
|
||||
jemalloc/include/jemalloc/internal/rb.h
|
||||
jemalloc/include/jemalloc/internal/rtree.h
|
||||
jemalloc/include/jemalloc/internal/rtree_tsd.h
|
||||
jemalloc/include/jemalloc/internal/size_classes.sh
|
||||
jemalloc/include/jemalloc/internal/smoothstep.h
|
||||
jemalloc/include/jemalloc/internal/smoothstep.sh
|
||||
jemalloc/include/jemalloc/internal/spin.h
|
||||
jemalloc/include/jemalloc/internal/stats.h
|
||||
jemalloc/include/jemalloc/internal/stats_tsd.h
|
||||
jemalloc/include/jemalloc/internal/sz.h
|
||||
jemalloc/include/jemalloc/internal/tcache_externs.h
|
||||
jemalloc/include/jemalloc/internal/tcache_inlines.h
|
||||
jemalloc/include/jemalloc/internal/tcache_structs.h
|
||||
jemalloc/include/jemalloc/internal/tcache_types.h
|
||||
jemalloc/include/jemalloc/internal/ticker.h
|
||||
jemalloc/include/jemalloc/internal/tsd.h
|
||||
jemalloc/include/jemalloc/internal/tsd_generic.h
|
||||
jemalloc/include/jemalloc/internal/tsd_malloc_thread_cleanup.h
|
||||
jemalloc/include/jemalloc/internal/tsd_tls.h
|
||||
jemalloc/include/jemalloc/internal/tsd_types.h
|
||||
jemalloc/include/jemalloc/internal/tsd_win.h
|
||||
jemalloc/include/jemalloc/internal/util.h
|
||||
jemalloc/include/jemalloc/internal/witness.h
|
||||
jemalloc/include/jemalloc/jemalloc.sh
|
||||
jemalloc/include/jemalloc/jemalloc_defs.h.in
|
||||
jemalloc/include/jemalloc/jemalloc_macros.h.in
|
||||
jemalloc/include/jemalloc/jemalloc_mangle.sh
|
||||
jemalloc/include/jemalloc/jemalloc_protos.h.in
|
||||
jemalloc/include/jemalloc/jemalloc_rename.sh
|
||||
jemalloc/include/jemalloc/jemalloc_typedefs.h.in
|
||||
jemalloc/include/msvc_compat/C99/stdbool.h
|
||||
jemalloc/include/msvc_compat/C99/stdint.h
|
||||
jemalloc/include/msvc_compat/strings.h
|
||||
jemalloc/include/msvc_compat/windows_extra.h
|
||||
jemalloc/jemalloc.pc.in
|
||||
jemalloc/m4/ax_cxx_compile_stdcxx.m4
|
||||
jemalloc/msvc/ReadMe.txt
|
||||
jemalloc/msvc/jemalloc_vc2015.sln
|
||||
jemalloc/msvc/projects/vc2015/jemalloc/jemalloc.vcxproj
|
||||
jemalloc/msvc/projects/vc2015/jemalloc/jemalloc.vcxproj.filters
|
||||
jemalloc/msvc/projects/vc2015/test_threads/test_threads.cpp
|
||||
jemalloc/msvc/projects/vc2015/test_threads/test_threads.h
|
||||
jemalloc/msvc/projects/vc2015/test_threads/test_threads.vcxproj
|
||||
jemalloc/msvc/projects/vc2015/test_threads/test_threads.vcxproj.filters
|
||||
jemalloc/msvc/projects/vc2015/test_threads/test_threads_main.cpp
|
||||
jemalloc/run_tests.sh
|
||||
jemalloc/scripts/gen_run_tests.py
|
||||
jemalloc/scripts/gen_travis.py
|
||||
jemalloc/src/arena.c
|
||||
jemalloc/src/background_thread.c
|
||||
jemalloc/src/base.c
|
||||
jemalloc/src/bitmap.c
|
||||
jemalloc/src/ckh.c
|
||||
jemalloc/src/ctl.c
|
||||
jemalloc/src/extent.c
|
||||
jemalloc/src/extent_dss.c
|
||||
jemalloc/src/extent_mmap.c
|
||||
jemalloc/src/hash.c
|
||||
jemalloc/src/hooks.c
|
||||
jemalloc/src/jemalloc.c
|
||||
jemalloc/src/jemalloc_cpp.cpp
|
||||
jemalloc/src/large.c
|
||||
jemalloc/src/malloc_io.c
|
||||
jemalloc/src/mutex.c
|
||||
jemalloc/src/mutex_pool.c
|
||||
jemalloc/src/nstime.c
|
||||
jemalloc/src/pages.c
|
||||
jemalloc/src/prng.c
|
||||
jemalloc/src/prof.c
|
||||
jemalloc/src/rtree.c
|
||||
jemalloc/src/spin.c
|
||||
jemalloc/src/stats.c
|
||||
jemalloc/src/sz.c
|
||||
jemalloc/src/tcache.c
|
||||
jemalloc/src/ticker.c
|
||||
jemalloc/src/tsd.c
|
||||
jemalloc/src/witness.c
|
||||
jemalloc/src/zone.c
|
||||
jemalloc/test/include/test/SFMT-alti.h
|
||||
jemalloc/test/include/test/SFMT-params.h
|
||||
jemalloc/test/include/test/SFMT-params11213.h
|
||||
jemalloc/test/include/test/SFMT-params1279.h
|
||||
jemalloc/test/include/test/SFMT-params132049.h
|
||||
jemalloc/test/include/test/SFMT-params19937.h
|
||||
jemalloc/test/include/test/SFMT-params216091.h
|
||||
jemalloc/test/include/test/SFMT-params2281.h
|
||||
jemalloc/test/include/test/SFMT-params4253.h
|
||||
jemalloc/test/include/test/SFMT-params44497.h
|
||||
jemalloc/test/include/test/SFMT-params607.h
|
||||
jemalloc/test/include/test/SFMT-params86243.h
|
||||
jemalloc/test/include/test/SFMT-sse2.h
|
||||
jemalloc/test/include/test/SFMT.h
|
||||
jemalloc/test/include/test/btalloc.h
|
||||
jemalloc/test/include/test/extent_hooks.h
|
||||
jemalloc/test/include/test/jemalloc_test.h.in
|
||||
jemalloc/test/include/test/jemalloc_test_defs.h.in
|
||||
jemalloc/test/include/test/math.h
|
||||
jemalloc/test/include/test/mq.h
|
||||
jemalloc/test/include/test/mtx.h
|
||||
jemalloc/test/include/test/test.h
|
||||
jemalloc/test/include/test/thd.h
|
||||
jemalloc/test/include/test/timer.h
|
||||
jemalloc/test/integration/MALLOCX_ARENA.c
|
||||
jemalloc/test/integration/aligned_alloc.c
|
||||
jemalloc/test/integration/allocated.c
|
||||
jemalloc/test/integration/extent.c
|
||||
jemalloc/test/integration/extent.sh
|
||||
jemalloc/test/integration/mallocx.c
|
||||
jemalloc/test/integration/mallocx.sh
|
||||
jemalloc/test/integration/overflow.c
|
||||
jemalloc/test/integration/posix_memalign.c
|
||||
jemalloc/test/integration/rallocx.c
|
||||
jemalloc/test/integration/sdallocx.c
|
||||
jemalloc/test/integration/thread_arena.c
|
||||
jemalloc/test/integration/thread_tcache_enabled.c
|
||||
jemalloc/test/integration/xallocx.c
|
||||
jemalloc/test/integration/xallocx.sh
|
||||
jemalloc/test/src/SFMT.c
|
||||
jemalloc/test/src/btalloc.c
|
||||
jemalloc/test/src/btalloc_0.c
|
||||
jemalloc/test/src/btalloc_1.c
|
||||
jemalloc/test/src/math.c
|
||||
jemalloc/test/src/mq.c
|
||||
jemalloc/test/src/mtx.c
|
||||
jemalloc/test/src/test.c
|
||||
jemalloc/test/src/thd.c
|
||||
jemalloc/test/src/timer.c
|
||||
jemalloc/test/stress/microbench.c
|
||||
jemalloc/test/test.sh.in
|
||||
jemalloc/test/unit/SFMT.c
|
||||
jemalloc/test/unit/a0.c
|
||||
jemalloc/test/unit/arena_reset.c
|
||||
jemalloc/test/unit/arena_reset_prof.c
|
||||
jemalloc/test/unit/arena_reset_prof.sh
|
||||
jemalloc/test/unit/atomic.c
|
||||
jemalloc/test/unit/background_thread.c
|
||||
jemalloc/test/unit/base.c
|
||||
jemalloc/test/unit/bit_util.c
|
||||
jemalloc/test/unit/bitmap.c
|
||||
jemalloc/test/unit/ckh.c
|
||||
jemalloc/test/unit/decay.c
|
||||
jemalloc/test/unit/decay.sh
|
||||
jemalloc/test/unit/extent_quantize.c
|
||||
jemalloc/test/unit/fork.c
|
||||
jemalloc/test/unit/hash.c
|
||||
jemalloc/test/unit/hooks.c
|
||||
jemalloc/test/unit/junk.c
|
||||
jemalloc/test/unit/junk.sh
|
||||
jemalloc/test/unit/junk_alloc.c
|
||||
jemalloc/test/unit/junk_alloc.sh
|
||||
jemalloc/test/unit/junk_free.c
|
||||
jemalloc/test/unit/junk_free.sh
|
||||
jemalloc/test/unit/mallctl.c
|
||||
jemalloc/test/unit/malloc_io.c
|
||||
jemalloc/test/unit/math.c
|
||||
jemalloc/test/unit/mq.c
|
||||
jemalloc/test/unit/mtx.c
|
||||
jemalloc/test/unit/nstime.c
|
||||
jemalloc/test/unit/pack.c
|
||||
jemalloc/test/unit/pack.sh
|
||||
jemalloc/test/unit/pages.c
|
||||
jemalloc/test/unit/ph.c
|
||||
jemalloc/test/unit/prng.c
|
||||
jemalloc/test/unit/prof_accum.c
|
||||
jemalloc/test/unit/prof_accum.sh
|
||||
jemalloc/test/unit/prof_active.c
|
||||
jemalloc/test/unit/prof_active.sh
|
||||
jemalloc/test/unit/prof_gdump.c
|
||||
jemalloc/test/unit/prof_gdump.sh
|
||||
jemalloc/test/unit/prof_idump.c
|
||||
jemalloc/test/unit/prof_idump.sh
|
||||
jemalloc/test/unit/prof_reset.c
|
||||
jemalloc/test/unit/prof_reset.sh
|
||||
jemalloc/test/unit/prof_tctx.c
|
||||
jemalloc/test/unit/prof_tctx.sh
|
||||
jemalloc/test/unit/prof_thread_name.c
|
||||
jemalloc/test/unit/prof_thread_name.sh
|
||||
jemalloc/test/unit/ql.c
|
||||
jemalloc/test/unit/qr.c
|
||||
jemalloc/test/unit/rb.c
|
||||
jemalloc/test/unit/retained.c
|
||||
jemalloc/test/unit/rtree.c
|
||||
jemalloc/test/unit/size_classes.c
|
||||
jemalloc/test/unit/slab.c
|
||||
jemalloc/test/unit/smoothstep.c
|
||||
jemalloc/test/unit/spin.c
|
||||
jemalloc/test/unit/stats.c
|
||||
jemalloc/test/unit/stats_print.c
|
||||
jemalloc/test/unit/ticker.c
|
||||
jemalloc/test/unit/tsd.c
|
||||
jemalloc/test/unit/witness.c
|
||||
jemalloc/test/unit/zero.c
|
||||
jemalloc/test/unit/zero.sh
|
||||
build_jemalloc.sh
|
||||
Vendored
+435
@@ -0,0 +1,435 @@
|
||||
#
|
||||
# Copyright (C) 2014 - 2018 Intel Corporation.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
# this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/jemalloc/obj/include
|
||||
|
||||
lib_LTLIBRARIES = libmemkind.la
|
||||
|
||||
libmemkind_la_SOURCES = src/hbwmalloc.c \
|
||||
src/heap_manager.c \
|
||||
src/memkind_arena.c \
|
||||
src/memkind.c \
|
||||
src/memkind_default.c \
|
||||
src/memkind_gbtlb.c \
|
||||
src/memkind_hbw.c \
|
||||
src/memkind_regular.c \
|
||||
src/memkind_hugetlb.c \
|
||||
src/memkind_pmem.c \
|
||||
src/memkind_interleave.c \
|
||||
src/memkind_log.c \
|
||||
src/tbb_wrapper.c \
|
||||
# end
|
||||
|
||||
|
||||
libmemkind_la_LIBADD = jemalloc/obj/lib/libjemalloc_pic.a
|
||||
libmemkind_la_LDFLAGS = -version-info 0:1:0 -ldl
|
||||
include_HEADERS = include/hbwmalloc.h \
|
||||
include/hbw_allocator.h \
|
||||
include/pmem_allocator.h \
|
||||
include/memkind.h \
|
||||
include/memkind_deprecated.h \
|
||||
# end
|
||||
|
||||
nonstandardincludedir = $(includedir)/memkind/internal
|
||||
nonstandardinclude_HEADERS = include/memkind/internal/memkind_arena.h \
|
||||
include/memkind/internal/heap_manager.h \
|
||||
include/memkind/internal/memkind_default.h \
|
||||
include/memkind/internal/memkind_gbtlb.h \
|
||||
include/memkind/internal/memkind_hbw.h \
|
||||
include/memkind/internal/memkind_regular.h \
|
||||
include/memkind/internal/memkind_hugetlb.h \
|
||||
include/memkind/internal/memkind_interleave.h \
|
||||
include/memkind/internal/memkind_pmem.h \
|
||||
include/memkind/internal/memkind_private.h \
|
||||
include/memkind/internal/memkind_log.h \
|
||||
include/memkind/internal/tbb_wrapper.h \
|
||||
include/memkind/internal/tbb_mem_pool_policy.h \
|
||||
# end
|
||||
|
||||
EXTRA_DIST = astyle.sh \
|
||||
autogen.sh \
|
||||
build.sh \
|
||||
build_jemalloc.sh \
|
||||
examples/README \
|
||||
test/test.sh \
|
||||
VERSION \
|
||||
CONTRIBUTING \
|
||||
memkind-$(VERSION).spec \
|
||||
memkind.spec.mk \
|
||||
jemalloc/.appveyor.yml \
|
||||
jemalloc/.autom4te.cfg \
|
||||
jemalloc/.gitattributes \
|
||||
jemalloc/.gitignore \
|
||||
jemalloc/.travis.yml \
|
||||
jemalloc/COPYING \
|
||||
jemalloc/ChangeLog \
|
||||
jemalloc/INSTALL.md \
|
||||
jemalloc/Makefile.in \
|
||||
jemalloc/README \
|
||||
jemalloc/autogen.sh \
|
||||
jemalloc/bin/jemalloc-config.in \
|
||||
jemalloc/bin/jemalloc.sh.in \
|
||||
jemalloc/bin/jeprof.in \
|
||||
jemalloc/build-aux/config.guess \
|
||||
jemalloc/build-aux/config.sub \
|
||||
jemalloc/build-aux/install-sh \
|
||||
jemalloc/config.stamp.in \
|
||||
jemalloc/configure.ac \
|
||||
jemalloc/doc/html.xsl.in \
|
||||
jemalloc/doc/jemalloc.xml.in \
|
||||
jemalloc/doc/manpages.xsl.in \
|
||||
jemalloc/doc/stylesheet.xsl \
|
||||
jemalloc/include/jemalloc/internal/arena_externs.h \
|
||||
jemalloc/include/jemalloc/internal/arena_inlines_a.h \
|
||||
jemalloc/include/jemalloc/internal/arena_inlines_b.h \
|
||||
jemalloc/include/jemalloc/internal/arena_structs_a.h \
|
||||
jemalloc/include/jemalloc/internal/arena_structs_b.h \
|
||||
jemalloc/include/jemalloc/internal/arena_types.h \
|
||||
jemalloc/include/jemalloc/internal/assert.h \
|
||||
jemalloc/include/jemalloc/internal/atomic.h \
|
||||
jemalloc/include/jemalloc/internal/atomic_c11.h \
|
||||
jemalloc/include/jemalloc/internal/atomic_gcc_atomic.h \
|
||||
jemalloc/include/jemalloc/internal/atomic_gcc_sync.h \
|
||||
jemalloc/include/jemalloc/internal/atomic_msvc.h \
|
||||
jemalloc/include/jemalloc/internal/background_thread_externs.h \
|
||||
jemalloc/include/jemalloc/internal/background_thread_inlines.h \
|
||||
jemalloc/include/jemalloc/internal/background_thread_structs.h \
|
||||
jemalloc/include/jemalloc/internal/base_externs.h \
|
||||
jemalloc/include/jemalloc/internal/base_inlines.h \
|
||||
jemalloc/include/jemalloc/internal/base_structs.h \
|
||||
jemalloc/include/jemalloc/internal/base_types.h \
|
||||
jemalloc/include/jemalloc/internal/bit_util.h \
|
||||
jemalloc/include/jemalloc/internal/bitmap.h \
|
||||
jemalloc/include/jemalloc/internal/ckh.h \
|
||||
jemalloc/include/jemalloc/internal/ctl.h \
|
||||
jemalloc/include/jemalloc/internal/extent_dss.h \
|
||||
jemalloc/include/jemalloc/internal/extent_externs.h \
|
||||
jemalloc/include/jemalloc/internal/extent_inlines.h \
|
||||
jemalloc/include/jemalloc/internal/extent_mmap.h \
|
||||
jemalloc/include/jemalloc/internal/extent_structs.h \
|
||||
jemalloc/include/jemalloc/internal/extent_types.h \
|
||||
jemalloc/include/jemalloc/internal/hash.h \
|
||||
jemalloc/include/jemalloc/internal/hooks.h \
|
||||
jemalloc/include/jemalloc/internal/jemalloc_internal_decls.h \
|
||||
jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h.in \
|
||||
jemalloc/include/jemalloc/internal/jemalloc_internal_externs.h \
|
||||
jemalloc/include/jemalloc/internal/jemalloc_internal_includes.h \
|
||||
jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_a.h \
|
||||
jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_b.h \
|
||||
jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h \
|
||||
jemalloc/include/jemalloc/internal/jemalloc_internal_macros.h \
|
||||
jemalloc/include/jemalloc/internal/jemalloc_internal_types.h \
|
||||
jemalloc/include/jemalloc/internal/jemalloc_preamble.h.in \
|
||||
jemalloc/include/jemalloc/internal/large_externs.h \
|
||||
jemalloc/include/jemalloc/internal/malloc_io.h \
|
||||
jemalloc/include/jemalloc/internal/mutex.h \
|
||||
jemalloc/include/jemalloc/internal/mutex_pool.h \
|
||||
jemalloc/include/jemalloc/internal/mutex_prof.h \
|
||||
jemalloc/include/jemalloc/internal/nstime.h \
|
||||
jemalloc/include/jemalloc/internal/pages.h \
|
||||
jemalloc/include/jemalloc/internal/ph.h \
|
||||
jemalloc/include/jemalloc/internal/private_namespace.sh \
|
||||
jemalloc/include/jemalloc/internal/private_symbols.sh \
|
||||
jemalloc/include/jemalloc/internal/prng.h \
|
||||
jemalloc/include/jemalloc/internal/prof_externs.h \
|
||||
jemalloc/include/jemalloc/internal/prof_inlines_a.h \
|
||||
jemalloc/include/jemalloc/internal/prof_inlines_b.h \
|
||||
jemalloc/include/jemalloc/internal/prof_structs.h \
|
||||
jemalloc/include/jemalloc/internal/prof_types.h \
|
||||
jemalloc/include/jemalloc/internal/public_namespace.sh \
|
||||
jemalloc/include/jemalloc/internal/public_unnamespace.sh \
|
||||
jemalloc/include/jemalloc/internal/ql.h \
|
||||
jemalloc/include/jemalloc/internal/qr.h \
|
||||
jemalloc/include/jemalloc/internal/rb.h \
|
||||
jemalloc/include/jemalloc/internal/rtree.h \
|
||||
jemalloc/include/jemalloc/internal/rtree_tsd.h \
|
||||
jemalloc/include/jemalloc/internal/size_classes.sh \
|
||||
jemalloc/include/jemalloc/internal/smoothstep.h \
|
||||
jemalloc/include/jemalloc/internal/smoothstep.sh \
|
||||
jemalloc/include/jemalloc/internal/spin.h \
|
||||
jemalloc/include/jemalloc/internal/stats.h \
|
||||
jemalloc/include/jemalloc/internal/stats_tsd.h \
|
||||
jemalloc/include/jemalloc/internal/sz.h \
|
||||
jemalloc/include/jemalloc/internal/tcache_externs.h \
|
||||
jemalloc/include/jemalloc/internal/tcache_inlines.h \
|
||||
jemalloc/include/jemalloc/internal/tcache_structs.h \
|
||||
jemalloc/include/jemalloc/internal/tcache_types.h \
|
||||
jemalloc/include/jemalloc/internal/ticker.h \
|
||||
jemalloc/include/jemalloc/internal/tsd.h \
|
||||
jemalloc/include/jemalloc/internal/tsd_generic.h \
|
||||
jemalloc/include/jemalloc/internal/tsd_malloc_thread_cleanup.h \
|
||||
jemalloc/include/jemalloc/internal/tsd_tls.h \
|
||||
jemalloc/include/jemalloc/internal/tsd_types.h \
|
||||
jemalloc/include/jemalloc/internal/tsd_win.h \
|
||||
jemalloc/include/jemalloc/internal/util.h \
|
||||
jemalloc/include/jemalloc/internal/witness.h \
|
||||
jemalloc/include/jemalloc/jemalloc.sh \
|
||||
jemalloc/include/jemalloc/jemalloc_defs.h.in \
|
||||
jemalloc/include/jemalloc/jemalloc_macros.h.in \
|
||||
jemalloc/include/jemalloc/jemalloc_mangle.sh \
|
||||
jemalloc/include/jemalloc/jemalloc_protos.h.in \
|
||||
jemalloc/include/jemalloc/jemalloc_rename.sh \
|
||||
jemalloc/include/jemalloc/jemalloc_typedefs.h.in \
|
||||
jemalloc/include/msvc_compat/C99/stdbool.h \
|
||||
jemalloc/include/msvc_compat/C99/stdint.h \
|
||||
jemalloc/include/msvc_compat/strings.h \
|
||||
jemalloc/include/msvc_compat/windows_extra.h \
|
||||
jemalloc/jemalloc.pc.in \
|
||||
jemalloc/m4/ax_cxx_compile_stdcxx.m4 \
|
||||
jemalloc/msvc/ReadMe.txt \
|
||||
jemalloc/msvc/jemalloc_vc2015.sln \
|
||||
jemalloc/msvc/projects/vc2015/jemalloc/jemalloc.vcxproj \
|
||||
jemalloc/msvc/projects/vc2015/jemalloc/jemalloc.vcxproj.filters \
|
||||
jemalloc/msvc/projects/vc2015/test_threads/test_threads.cpp \
|
||||
jemalloc/msvc/projects/vc2015/test_threads/test_threads.h \
|
||||
jemalloc/msvc/projects/vc2015/test_threads/test_threads.vcxproj \
|
||||
jemalloc/msvc/projects/vc2015/test_threads/test_threads.vcxproj.filters \
|
||||
jemalloc/msvc/projects/vc2015/test_threads/test_threads_main.cpp \
|
||||
jemalloc/run_tests.sh \
|
||||
jemalloc/scripts/gen_run_tests.py \
|
||||
jemalloc/scripts/gen_travis.py \
|
||||
jemalloc/src/arena.c \
|
||||
jemalloc/src/background_thread.c \
|
||||
jemalloc/src/base.c \
|
||||
jemalloc/src/bitmap.c \
|
||||
jemalloc/src/ckh.c \
|
||||
jemalloc/src/ctl.c \
|
||||
jemalloc/src/extent.c \
|
||||
jemalloc/src/extent_dss.c \
|
||||
jemalloc/src/extent_mmap.c \
|
||||
jemalloc/src/hash.c \
|
||||
jemalloc/src/hooks.c \
|
||||
jemalloc/src/jemalloc.c \
|
||||
jemalloc/src/jemalloc_cpp.cpp \
|
||||
jemalloc/src/large.c \
|
||||
jemalloc/src/malloc_io.c \
|
||||
jemalloc/src/mutex.c \
|
||||
jemalloc/src/mutex_pool.c \
|
||||
jemalloc/src/nstime.c \
|
||||
jemalloc/src/pages.c \
|
||||
jemalloc/src/prng.c \
|
||||
jemalloc/src/prof.c \
|
||||
jemalloc/src/rtree.c \
|
||||
jemalloc/src/spin.c \
|
||||
jemalloc/src/stats.c \
|
||||
jemalloc/src/sz.c \
|
||||
jemalloc/src/tcache.c \
|
||||
jemalloc/src/ticker.c \
|
||||
jemalloc/src/tsd.c \
|
||||
jemalloc/src/witness.c \
|
||||
jemalloc/src/zone.c \
|
||||
jemalloc/test/include/test/SFMT-alti.h \
|
||||
jemalloc/test/include/test/SFMT-params.h \
|
||||
jemalloc/test/include/test/SFMT-params11213.h \
|
||||
jemalloc/test/include/test/SFMT-params1279.h \
|
||||
jemalloc/test/include/test/SFMT-params132049.h \
|
||||
jemalloc/test/include/test/SFMT-params19937.h \
|
||||
jemalloc/test/include/test/SFMT-params216091.h \
|
||||
jemalloc/test/include/test/SFMT-params2281.h \
|
||||
jemalloc/test/include/test/SFMT-params4253.h \
|
||||
jemalloc/test/include/test/SFMT-params44497.h \
|
||||
jemalloc/test/include/test/SFMT-params607.h \
|
||||
jemalloc/test/include/test/SFMT-params86243.h \
|
||||
jemalloc/test/include/test/SFMT-sse2.h \
|
||||
jemalloc/test/include/test/SFMT.h \
|
||||
jemalloc/test/include/test/btalloc.h \
|
||||
jemalloc/test/include/test/extent_hooks.h \
|
||||
jemalloc/test/include/test/jemalloc_test.h.in \
|
||||
jemalloc/test/include/test/jemalloc_test_defs.h.in \
|
||||
jemalloc/test/include/test/math.h \
|
||||
jemalloc/test/include/test/mq.h \
|
||||
jemalloc/test/include/test/mtx.h \
|
||||
jemalloc/test/include/test/test.h \
|
||||
jemalloc/test/include/test/thd.h \
|
||||
jemalloc/test/include/test/timer.h \
|
||||
jemalloc/test/integration/MALLOCX_ARENA.c \
|
||||
jemalloc/test/integration/aligned_alloc.c \
|
||||
jemalloc/test/integration/allocated.c \
|
||||
jemalloc/test/integration/extent.c \
|
||||
jemalloc/test/integration/extent.sh \
|
||||
jemalloc/test/integration/mallocx.c \
|
||||
jemalloc/test/integration/mallocx.sh \
|
||||
jemalloc/test/integration/overflow.c \
|
||||
jemalloc/test/integration/posix_memalign.c \
|
||||
jemalloc/test/integration/rallocx.c \
|
||||
jemalloc/test/integration/sdallocx.c \
|
||||
jemalloc/test/integration/thread_arena.c \
|
||||
jemalloc/test/integration/thread_tcache_enabled.c \
|
||||
jemalloc/test/integration/xallocx.c \
|
||||
jemalloc/test/integration/xallocx.sh \
|
||||
jemalloc/test/src/SFMT.c \
|
||||
jemalloc/test/src/btalloc.c \
|
||||
jemalloc/test/src/btalloc_0.c \
|
||||
jemalloc/test/src/btalloc_1.c \
|
||||
jemalloc/test/src/math.c \
|
||||
jemalloc/test/src/mq.c \
|
||||
jemalloc/test/src/mtx.c \
|
||||
jemalloc/test/src/test.c \
|
||||
jemalloc/test/src/thd.c \
|
||||
jemalloc/test/src/timer.c \
|
||||
jemalloc/test/stress/microbench.c \
|
||||
jemalloc/test/test.sh.in \
|
||||
jemalloc/test/unit/SFMT.c \
|
||||
jemalloc/test/unit/a0.c \
|
||||
jemalloc/test/unit/arena_reset.c \
|
||||
jemalloc/test/unit/arena_reset_prof.c \
|
||||
jemalloc/test/unit/arena_reset_prof.sh \
|
||||
jemalloc/test/unit/atomic.c \
|
||||
jemalloc/test/unit/background_thread.c \
|
||||
jemalloc/test/unit/base.c \
|
||||
jemalloc/test/unit/bit_util.c \
|
||||
jemalloc/test/unit/bitmap.c \
|
||||
jemalloc/test/unit/ckh.c \
|
||||
jemalloc/test/unit/decay.c \
|
||||
jemalloc/test/unit/decay.sh \
|
||||
jemalloc/test/unit/extent_quantize.c \
|
||||
jemalloc/test/unit/fork.c \
|
||||
jemalloc/test/unit/hash.c \
|
||||
jemalloc/test/unit/hooks.c \
|
||||
jemalloc/test/unit/junk.c \
|
||||
jemalloc/test/unit/junk.sh \
|
||||
jemalloc/test/unit/junk_alloc.c \
|
||||
jemalloc/test/unit/junk_alloc.sh \
|
||||
jemalloc/test/unit/junk_free.c \
|
||||
jemalloc/test/unit/junk_free.sh \
|
||||
jemalloc/test/unit/mallctl.c \
|
||||
jemalloc/test/unit/malloc_io.c \
|
||||
jemalloc/test/unit/math.c \
|
||||
jemalloc/test/unit/mq.c \
|
||||
jemalloc/test/unit/mtx.c \
|
||||
jemalloc/test/unit/nstime.c \
|
||||
jemalloc/test/unit/pack.c \
|
||||
jemalloc/test/unit/pack.sh \
|
||||
jemalloc/test/unit/pages.c \
|
||||
jemalloc/test/unit/ph.c \
|
||||
jemalloc/test/unit/prng.c \
|
||||
jemalloc/test/unit/prof_accum.c \
|
||||
jemalloc/test/unit/prof_accum.sh \
|
||||
jemalloc/test/unit/prof_active.c \
|
||||
jemalloc/test/unit/prof_active.sh \
|
||||
jemalloc/test/unit/prof_gdump.c \
|
||||
jemalloc/test/unit/prof_gdump.sh \
|
||||
jemalloc/test/unit/prof_idump.c \
|
||||
jemalloc/test/unit/prof_idump.sh \
|
||||
jemalloc/test/unit/prof_reset.c \
|
||||
jemalloc/test/unit/prof_reset.sh \
|
||||
jemalloc/test/unit/prof_tctx.c \
|
||||
jemalloc/test/unit/prof_tctx.sh \
|
||||
jemalloc/test/unit/prof_thread_name.c \
|
||||
jemalloc/test/unit/prof_thread_name.sh \
|
||||
jemalloc/test/unit/ql.c \
|
||||
jemalloc/test/unit/qr.c \
|
||||
jemalloc/test/unit/rb.c \
|
||||
jemalloc/test/unit/retained.c \
|
||||
jemalloc/test/unit/rtree.c \
|
||||
jemalloc/test/unit/size_classes.c \
|
||||
jemalloc/test/unit/slab.c \
|
||||
jemalloc/test/unit/smoothstep.c \
|
||||
jemalloc/test/unit/spin.c \
|
||||
jemalloc/test/unit/stats.c \
|
||||
jemalloc/test/unit/stats_print.c \
|
||||
jemalloc/test/unit/ticker.c \
|
||||
jemalloc/test/unit/tsd.c \
|
||||
jemalloc/test/unit/witness.c \
|
||||
jemalloc/test/unit/zero.c \
|
||||
jemalloc/test/unit/zero.sh \
|
||||
build_jemalloc.sh \
|
||||
# end
|
||||
|
||||
dist_doc_DATA = README COPYING VERSION
|
||||
dist_man_MANS = man/memkind-hbw-nodes.1 \
|
||||
man/hbwmalloc.3 \
|
||||
man/memkind.3 \
|
||||
man/memkind_arena.3 \
|
||||
man/memkind_default.3 \
|
||||
man/memkind_hbw.3 \
|
||||
man/memkind_hugetlb.3 \
|
||||
man/memkind_pmem.3 \
|
||||
man/hbwallocator.3 \
|
||||
man/pmemallocator.3 \
|
||||
man/autohbw.7 \
|
||||
# end
|
||||
|
||||
CLEANFILES = memkind-$(VERSION).spec
|
||||
DISTCLEANFILES = VERSION
|
||||
|
||||
bin_PROGRAMS = memkind-hbw-nodes
|
||||
|
||||
memkind_hbw_nodes_SOURCES = src/memkind-hbw-nodes.c
|
||||
memkind_hbw_nodes_LDADD = libmemkind.la
|
||||
|
||||
bin_SCRIPTS =
|
||||
check_PROGRAMS =
|
||||
noinst_PROGRAMS =
|
||||
noinst_LTLIBRARIES =
|
||||
noinst_HEADERS =
|
||||
TESTS =
|
||||
|
||||
req_flags = -fvisibility=hidden -Wall -Werror -msse4.2 -D_GNU_SOURCE -DMEMKIND_INTERNAL_API -DJE_PREFIX=$(JE_PREFIX)
|
||||
|
||||
AM_CFLAGS = $(req_flags)
|
||||
AM_CXXFLAGS = $(req_flags)
|
||||
|
||||
.PHONY: checkprogs
|
||||
|
||||
# create libtool .lo files from jemalloc objects
|
||||
$(jemalloc_objects): jemalloc/obj/src/%.lo: jemalloc/obj/src/%.pic.o jemalloc/obj/src/%.o
|
||||
@echo "# $@ - a libtool object file" > $@
|
||||
@echo "# Generated by "`libtool --version | head -n 1` >> $@
|
||||
@echo "# Actually generated by memkind build system spoofing libtool" >> $@
|
||||
@echo "pic_object='$*.pic.o'" >> $@
|
||||
@echo "non_pic_object='$*.o'" >> $@
|
||||
|
||||
# build check programs without running tests
|
||||
checkprogs: libmemkind.la $(check_PROGRAMS)
|
||||
|
||||
memkind-$(VERSION).spec:
|
||||
$(MAKE) version="$(VERSION)" -f memkind.spec.mk $@
|
||||
|
||||
rpm: dist
|
||||
$(MAKE) version="$(VERSION)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" \
|
||||
-f memkind.spec.mk $@
|
||||
|
||||
all: static_lib
|
||||
|
||||
# the script merge memkind and jemalloc libraries into one static library.
|
||||
define ar_prog
|
||||
create libmemkind.a\n\
|
||||
addlib .libs/libmemkind.a\n\
|
||||
addlib jemalloc/obj/lib/libjemalloc_pic.a\n\
|
||||
save\n\
|
||||
end
|
||||
endef
|
||||
|
||||
static_lib: jemalloc/obj/lib/libjemalloc_pic.a libmemkind.la
|
||||
bash -c "ar -M < <(echo -e '$(ar_prog)')"
|
||||
cp libmemkind.a .libs/
|
||||
rm libmemkind.a
|
||||
|
||||
|
||||
include autohbw/Makefile.mk
|
||||
include test/Makefile.mk
|
||||
include examples/Makefile.mk
|
||||
include src/Makefile.mk
|
||||
Vendored
+42
@@ -0,0 +1,42 @@
|
||||
OPEN DEVELOPMENT
|
||||
================
|
||||
|
||||
We are moving to a more open development model with memkind.
|
||||
|
||||
- The memkind github organization:
|
||||
https://github.com/memkind
|
||||
|
||||
- Rather than posting bulk patches at time of tag, we are posting more
|
||||
incremental patches with finer grain commit details.
|
||||
|
||||
- There is now a "dev" branch in the memkind repository and a
|
||||
"memkind-dev" branch in the memkind fork of the jemalloc repository.
|
||||
These will be used for open development work.
|
||||
|
||||
- There is a memkind web page here:
|
||||
http://memkind.github.io/memkind
|
||||
|
||||
- We have posted an architecture document here:
|
||||
http://memkind.github.io/memkind/memkind_arch_20150318.pdf
|
||||
|
||||
- We invite you to join the memkind mailing list:
|
||||
https://lists.01.org/mailman/listinfo/memkind
|
||||
|
||||
- Feel free to open a github issue, especially if there is a TODO item
|
||||
that you would like to prioritize.
|
||||
|
||||
- We have posted source and binary RPMs for several distributions here:
|
||||
http://download.opensuse.org/repositories/home:/cmcantalupo/
|
||||
|
||||
- memkind is also avaiable in Fedora package repository (devel, EPEL7):
|
||||
https://admin.fedoraproject.org/pkgdb/package/memkind/
|
||||
|
||||
- Pull requests are welcome.
|
||||
|
||||
- White space formatting generally conforms to
|
||||
$ astyle --style=linux --indent=spaces=4 -S --max-continuation-indent=80 \
|
||||
--max-code-length=80 --break-after-logical --indent-namespaces -z2 \
|
||||
--align-pointer=name
|
||||
|
||||
- For more information about astyle:
|
||||
http://astyle.sourceforge.net/
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
<!--- Provide a general summary of your changes in the Title above -->
|
||||
|
||||
### Description
|
||||
<!--- Describe your changes in detail -->
|
||||
<!--- If it fixes an open issue, please link to the issue here. -->
|
||||
|
||||
### Types of changes
|
||||
<!--- Put an `x` in the box(es) that apply -->
|
||||
|
||||
- [ ] Bugfix (non-breaking change which fixes issue linked in Description above)
|
||||
- [ ] New feature (non-breaking change which adds functionality)
|
||||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
||||
- [ ] Documentation (correction or otherwise)
|
||||
- [ ] Cosmetics (whitespace, appearance)
|
||||
- [ ] Other
|
||||
|
||||
### Checklist
|
||||
<!--- Put an `x` in the box(es) that apply -->
|
||||
|
||||
- [ ] Code compiles without errors
|
||||
- [ ] All tests pass locally with my changes (see TESTING section in CONTRIBUTING file)
|
||||
- [ ] Created tests which will fail without the change (if possible)
|
||||
- [ ] Extended the README/documentation (if necessary)
|
||||
- [ ] All newly added files have proprietary license (if necessary)
|
||||
- [ ] All newly added files are referenced in MANIFEST files (if necessary)
|
||||
|
||||
## Further comments
|
||||
<!--- If this is a relatively large or complex change, kick off the discussion by explaining why you -->
|
||||
<!--- choose the solution you did and what alternatives you considered, etc... -->
|
||||
Vendored
+251
@@ -0,0 +1,251 @@
|
||||
MEMKIND
|
||||
=======
|
||||
|
||||
[](https://travis-ci.org/memkind/memkind)
|
||||
[](https://github.com/memkind/memkind/releases/latest)
|
||||
[](http://codecov.io/gh/memkind/memkind?branch=master)
|
||||
|
||||
DISCLAIMER
|
||||
----------
|
||||
SEE COPYING FILE FOR LICENSE INFORMATION.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED AS A DEVELOPMENT SNAPSHOT TO AID
|
||||
COLLABORATION AND WAS NOT ISSUED AS A RELEASED PRODUCT BY INTEL.
|
||||
|
||||
|
||||
LAST UPDATE
|
||||
-----------
|
||||
Krzysztof Kulakowski <krzysztof.kulakowski@intel.com>
|
||||
Tuesday Mar 1 2016
|
||||
|
||||
SUMMARY
|
||||
-------
|
||||
The memkind library is a user extensible heap manager built on top of
|
||||
jemalloc which enables control of memory characteristics and a
|
||||
partitioning of the heap between kinds of memory. The kinds of memory
|
||||
are defined by operating system memory policies that have been applied
|
||||
to virtual address ranges. Memory characteristics supported by
|
||||
memkind without user extension include control of NUMA and page size
|
||||
features. The jemalloc non-standard interface has been extended to
|
||||
enable specialized arenas to make requests for virtual memory from the
|
||||
operating system through the memkind partition interface. Through the
|
||||
other memkind interfaces the user can control and extend memory
|
||||
partition features and allocate memory while selecting enabled
|
||||
features.
|
||||
|
||||
API
|
||||
---
|
||||
The memkind library delivers two interfaces:
|
||||
* hbwmalloc.h - recommended for high-bandwidth memory use cases (stable)
|
||||
* memkind.h - generic interface for more complex use cases (partially unstable)
|
||||
|
||||
For more detailed information about those interfaces see
|
||||
corresponding manpages (located in man/ subdir):
|
||||
|
||||
man memkind
|
||||
|
||||
or
|
||||
|
||||
man hbwmalloc
|
||||
|
||||
BUILD REQUIREMENTS
|
||||
------------------
|
||||
To build the memkind libraries on a RHEL Linux system first install
|
||||
the required packages with the following command:
|
||||
|
||||
sudo yum install numactl-devel gcc-c++ unzip
|
||||
|
||||
On a SLES Linux system install the dependencies with the following
|
||||
command:
|
||||
|
||||
sudo zypper install libnuma-devel gcc-c++ unzip
|
||||
|
||||
The memkind library uses the GNU autotools (Autoconf, Automake,
|
||||
Libtool and m4) for configuration and build. The configure scripts
|
||||
and gtest source code are distributed with the source tarball included
|
||||
in the source RPM, and this tarball is created with the memkind "make
|
||||
dist" target. In contrast to the distributed source tarball, the git
|
||||
repository does not include any generated files nor the gtest source
|
||||
code. For this reason some additional steps are required when
|
||||
building from a checkout of the git repo. Those steps include running
|
||||
the bash script called "autogen.sh" prior to configure. This script
|
||||
will populate a VERSION file based on "git describe", and use
|
||||
autoreconf to generate a configure script. The gtest library is
|
||||
required for building the test content. This is downloaded
|
||||
automatically prior to building the test content from the googlecode
|
||||
website based on a target describe in memkind/test/Makefile.mk.
|
||||
|
||||
BUILDING
|
||||
--------
|
||||
|
||||
a) Building jemalloc
|
||||
|
||||
The memkind library has a dependency on a related fork of jemalloc.
|
||||
|
||||
The jemalloc source was forked from jemalloc version 5.0. This source tree
|
||||
is located within the jemalloc subdirectory of the memkind source. The jemalloc
|
||||
source code has been kept close to the original form, and in particular
|
||||
the build system has been lightly modified.
|
||||
The developer must configure and build jemalloc prior to configuring
|
||||
and building memkind. You can do that using included shell script:
|
||||
|
||||
export JE_PREFIX=jemk_
|
||||
./build_jemalloc.sh
|
||||
|
||||
Alternatively you can follow this step-by-step instruction:
|
||||
|
||||
cd jemalloc
|
||||
autoconf
|
||||
mkdir obj
|
||||
cd obj
|
||||
../configure --enable-autogen --with-jemalloc-prefix=jemk_ --without-export \
|
||||
--disable-stats --disable-fill \
|
||||
--with-malloc-conf="narenas:256,lg_tcache_max:12"
|
||||
make
|
||||
cd ../..
|
||||
|
||||
Note: JE_PREFIX can be set to arbitrary value, including empty one.
|
||||
|
||||
b) Building memkind
|
||||
|
||||
Building and installing memkind can be as simple as typing the following while
|
||||
in the root directory of the source tree:
|
||||
|
||||
./build.sh
|
||||
make install
|
||||
|
||||
Alternatively you can follow this step-by-step instruction:
|
||||
|
||||
export JE_PREFIX=jemk_
|
||||
./autogen.sh
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
|
||||
this should configure, build, and install this package.
|
||||
|
||||
See the output of:
|
||||
|
||||
./configure --help
|
||||
|
||||
for more information about either the memkind or the jemalloc
|
||||
configuration options. Some useful information about building with autotools
|
||||
can also be found in the INSTALL file.
|
||||
|
||||
**Important Notes:**
|
||||
|
||||
If you are using build.sh script and later want to call 'make' command directly,
|
||||
then you need to call firstly:
|
||||
|
||||
export JE_PREFIX=jemk_
|
||||
|
||||
otherwise you will get an error like:
|
||||
|
||||
undefined reference to mallocx
|
||||
|
||||
RUN REQUIREMENTS
|
||||
----------------
|
||||
Requires kernel patch introduced in Linux v3.11 that impacts
|
||||
functionality of the NUMA system calls. This is patch is commit
|
||||
3964acd0dbec123aa0a621973a2a0580034b4788 in the linux-stable git
|
||||
repository from kernel.org. Red Hat has back-ported this patch to the
|
||||
v3.10 kernel in the RHEL 7.0 GA release, so RHEL 7.0 onward supports
|
||||
memkind even though this kernel version predates v3.11.
|
||||
|
||||
Functionality related to hugepages allocation require patches
|
||||
e0ec90ee7e6f6cbaa6d59ffb48d2a7af5e80e61d and
|
||||
099730d67417dfee273e9b10ac2560ca7fac7eb9 from kernel org. Without them
|
||||
physical memory may end up being located on incorrect NUMA node.
|
||||
|
||||
Applications using the memkind library require that libnuma and
|
||||
libpthread be available for dynamic linking at run time. Both of
|
||||
these libraries should be available by default, but they can be
|
||||
installed on RHEL Linux with the following command:
|
||||
|
||||
sudo yum install pthread numactl
|
||||
|
||||
and on a SLES Linux system with:
|
||||
|
||||
sudo zypper install pthread libnuma
|
||||
|
||||
To use the interfaces for obtaining 2MB pages please be sure
|
||||
to follow the instructions here:
|
||||
https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt
|
||||
and pay particular attention to the use of the procfs files:
|
||||
/proc/sys/vm/nr_hugepages
|
||||
/proc/sys/vm/nr_overcommit_hugepages
|
||||
for enabling the kernel's huge page pool.
|
||||
|
||||
To use the file-backed kind of memory (PMEM), please be sure that
|
||||
filesystem which is used for PMEM kind supports FALLOC_FL_PUNCH_HOLE flag:
|
||||
http://man7.org/linux/man-pages/man2/fallocate.2.html
|
||||
|
||||
SETTING LOGGING MECHANISM
|
||||
-------------------------
|
||||
In memkind library logging mechanism could be enabled by setting MEMKIND_DEBUG
|
||||
environment variable. Setting MEMKIND_DEBUG to "1" enables printing messages
|
||||
like errors and general information about environment to stderr.
|
||||
|
||||
SETTING HEAP MANAGER
|
||||
--------------------
|
||||
In memkind library heap management can be adjusted with MEMKIND_HEAP_MANAGER
|
||||
environment variable, which allows for switching to one of the available
|
||||
heap managers.
|
||||
Values:
|
||||
JEMALLOC – sets the jemalloc heap manager
|
||||
TBB – sets Intel Threading Building Blocks heap manager. This option requires installed
|
||||
Intel Threading Building Blocks library.
|
||||
If the MEMKIND_HEAP_MANAGER is not set then the jemalloc heap manager will be used by default.
|
||||
|
||||
TESTING
|
||||
-------
|
||||
All existing tests pass. For more information on how to execute tests
|
||||
see the CONTRIBUTING file.
|
||||
|
||||
When tests are run on a NUMA platform without high bandwidth memory
|
||||
the MEMKIND_HBW_NODES environment variable is used in conjunction with
|
||||
"numactl --membind" to force standard allocations to one NUMA node and
|
||||
high bandwidth allocations through a different NUMA node. See next
|
||||
section for more details.
|
||||
|
||||
|
||||
SIMULATE HIGH BANDWIDTH MEMORY
|
||||
------------------------------
|
||||
A method for testing for the benefit of high bandwidth memory on a
|
||||
dual socket Intel(R) Xeon(TM) system is to use the QPI bus to simulate
|
||||
slow memory. This is not an accurate model of the bandwidth and
|
||||
latency characteristics of the Intel's 2nd generation Intel(R) Xeon Phi(TM)
|
||||
Product Family on package memory, but is a reasonable way to determine
|
||||
which data structures rely critically on bandwidth.
|
||||
|
||||
If the application a.out has been modified to use high bandwidth
|
||||
memory with the memkind library then this can be done with numactl as
|
||||
follows with the bash shell:
|
||||
|
||||
export MEMKIND_HBW_NODES=0
|
||||
numactl --membind=1 --cpunodebind=0 a.out
|
||||
|
||||
or with csh:
|
||||
|
||||
setenv MEMKIND_HBW_NODES 0
|
||||
numactl --membind=1 --cpunodebind=0 a.out
|
||||
|
||||
The MEMKIND_HBW_NODES environment variable set to zero will bind high
|
||||
bandwidth allocations to NUMA node 0. The --membind=1 flag to numactl
|
||||
will bind standard allocations, static and stack variables to NUMA
|
||||
node 1. The --cpunodebind=0 option to numactl will bind the process
|
||||
threads to CPUs associated with NUMA node 0. With this configuration
|
||||
standard allocations will be fetched across the QPI bus, and high
|
||||
bandwidth allocations will be local to the process CPU.
|
||||
|
||||
NOTES
|
||||
-----
|
||||
* Using memkind with Transparent Huge Pages enabled may result in
|
||||
undesirably high memory footprint. To avoid that disable THP using following
|
||||
instruction: https://www.kernel.org/doc/Documentation/vm/transhuge.txt
|
||||
|
||||
STATUS
|
||||
------
|
||||
Different interfaces can represent different maturity level
|
||||
(as described in corresponding man pages).
|
||||
Feedback on design and implementation is greatly appreciated.
|
||||
+1
@@ -0,0 +1 @@
|
||||
README
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2018 Intel Corporation.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
# this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
ASTYLE_MIN_VER="3.1"
|
||||
ASTYLE_OPT="--style=linux --indent=spaces=4 -S -r --max-continuation-indent=80 "
|
||||
ASTYLE_OPT+="--max-code-length=80 --break-after-logical --indent-namespaces -z2 "
|
||||
ASTYLE_OPT+="--align-pointer=name"
|
||||
if ! ASTYLE=$(which astyle)
|
||||
then
|
||||
echo "Package astyle was not found. Unable to check source files format policy." >&2
|
||||
exit 1
|
||||
fi
|
||||
ASTYLE_VER=$(astyle --version 2>&1 | awk '{print $NF}')
|
||||
if (( $(echo "$ASTYLE_VER < $ASTYLE_MIN_VER" | bc -l) ));
|
||||
then
|
||||
echo "Minimal required version of astyle is $ASTYLE_MIN_VER. Detected version is $ASTYLE_VER" >&2
|
||||
echo "Unable to check source files format policy." >&2
|
||||
exit 1
|
||||
fi
|
||||
$ASTYLE $ASTYLE_OPT ./*.c,*.cpp,*.h,*.hpp --exclude=jemalloc > astyle.out
|
||||
if TEST=$(cat astyle.out | grep -c Formatted)
|
||||
then
|
||||
cat astyle.out
|
||||
git --no-pager diff
|
||||
echo "Please fix style issues as shown above"
|
||||
exit 1
|
||||
else
|
||||
echo "Source code is compliant with format policy. No style issues were found."
|
||||
exit 0
|
||||
fi
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2014-2017 Intel Corporation.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
# this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
# If the VERSION file does not exist, then create it based on git
|
||||
# describe or if not in a git repo just set VERSION to 0.0.0.
|
||||
if [ ! -f VERSION ]; then
|
||||
if [ -f .git/config ]; then
|
||||
sha=$(git describe --long --always | awk -F- '{print $(NF)}')
|
||||
release=$(git describe --long | awk -F- '{print $(NF-1)}')
|
||||
version=$(git describe --long | sed -e "s|\(.*\)-$release-$sha|\1|" -e "s|-|+|g" -e "s|^v||")
|
||||
if [ "$release" == "" ]; then
|
||||
version=${sha}
|
||||
else
|
||||
version=${version}+dev${release}-${sha}
|
||||
fi
|
||||
else
|
||||
echo "WARNING: VERSION file does not exist and working directory is not a git repository, setting verison to 0.0.0" 2>&1
|
||||
version=0.0.0
|
||||
fi
|
||||
echo $version > VERSION
|
||||
fi
|
||||
|
||||
autoreconf --install
|
||||
|
||||
Vendored
+37
@@ -0,0 +1,37 @@
|
||||
#
|
||||
# Copyright (C) 2014 - 2016 Intel Corporation.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
# this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
lib_LTLIBRARIES += autohbw/libautohbw.la \
|
||||
# end
|
||||
|
||||
EXTRA_DIST += autohbw/autohbw_get_src_lines.pl
|
||||
|
||||
autohbw_libautohbw_la_LIBADD = libmemkind.la
|
||||
|
||||
autohbw_libautohbw_la_SOURCES = autohbw/autohbw.c
|
||||
|
||||
clean-local: autohbw-clean
|
||||
|
||||
autohbw-clean:
|
||||
rm -f autohbw/*.gcno
|
||||
Vendored
+457
@@ -0,0 +1,457 @@
|
||||
/*
|
||||
* Copyright (C) 2015 - 2018 Intel Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// File : autohbw.c
|
||||
// Purpose: Library to automatically allocate HBW (MCDRAM)
|
||||
// Author : Ruchira Sasanka (ruchira DOT sasanka AT intel DOT com)
|
||||
// Date : Jan 30, 2015
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <memkind.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define AUTOHBW_EXPORT __attribute__((visibility("default")))
|
||||
#define AUTOHBW_INIT __attribute__((constructor))
|
||||
|
||||
//-2 = nothing is printed
|
||||
//-1 = critical messages are printed
|
||||
// 0 = no log messages for allocations are printed but INFO messages are printed
|
||||
// 1 = a log message is printed for each allocation (Default)
|
||||
// 2 = a log message is printed for each allocation with a backtrace
|
||||
enum {
|
||||
ALWAYS = -1,
|
||||
INFO,
|
||||
ALLOC,
|
||||
VERBOSE
|
||||
};
|
||||
|
||||
// Default is to print allocations
|
||||
static int LogLevel = ALLOC;
|
||||
|
||||
// Allocations of size greater than low limit promoted to HBW memory.
|
||||
// If there is a high limit specified, allocations larger than this limit
|
||||
// will not be allocated in HBW.
|
||||
static size_t HBWLowLimit = 1 * 1024 * 1024;
|
||||
static size_t HBWHighLimit = -1ull;
|
||||
|
||||
// Whether we have initialized HBW arena of memkind library -- by making
|
||||
// a dummy call to it. HBW arena (and hence any memkind_* call with kind
|
||||
// HBW) must NOT be used until this flag is set true.
|
||||
static bool MemkindInitDone = false;
|
||||
|
||||
// Following is the type of HBW memory that is allocated using memkind.
|
||||
// By changing this type, this library can be used to allocate other
|
||||
// types of memory types (e.g., MEMKIND_HUGETLB, MEMKIND_GBTLB,
|
||||
// MEMKIND_HBW_HUGETLB etc.)
|
||||
static memkind_t hbw_kind;
|
||||
|
||||
// API control for HBW allocations.
|
||||
static bool isAutoHBWEnabled = true;
|
||||
|
||||
#define LOG(level, ...) \
|
||||
do { \
|
||||
if (LogLevel >= level) { \
|
||||
fprintf(stderr, __VA_ARGS__); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
static bool isAllocInHBW(size_t size)
|
||||
{
|
||||
if (!MemkindInitDone)
|
||||
return false;
|
||||
|
||||
if (!isAutoHBWEnabled)
|
||||
return false;
|
||||
|
||||
if (size < HBWLowLimit)
|
||||
return false;
|
||||
|
||||
if (size > HBWHighLimit)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Returns the limit in bytes using a limit value and a multiplier
|
||||
// character like K, M, G
|
||||
static size_t getLimit(size_t limit, char lchar)
|
||||
{
|
||||
// Now read the trailing character (e.g., K, M, G)
|
||||
// Based on the character, determine the multiplier
|
||||
if ((limit > 0) && isalpha(lchar)) {
|
||||
long mult = 1;
|
||||
|
||||
switch (toupper(lchar)) {
|
||||
case 'G':
|
||||
mult *= 1024;
|
||||
case 'M':
|
||||
mult *= 1024;
|
||||
case 'K':
|
||||
mult *= 1024;
|
||||
}
|
||||
|
||||
// check for overflow, saturate at max
|
||||
if (limit >= -1ull / mult)
|
||||
return -1ull;
|
||||
|
||||
return limit * mult;
|
||||
}
|
||||
|
||||
return limit;
|
||||
}
|
||||
|
||||
// Once HBWLowLimit (and HBWHighLimit) are set, call this method to
|
||||
// inform the user about the size range of arrays that will be allocated
|
||||
// in HBW
|
||||
static void printLimits()
|
||||
{
|
||||
// Inform according to the limits set
|
||||
if ((HBWLowLimit > 0) && (HBWHighLimit < -1ull)) {
|
||||
// if both high and low limits are specified, we use a range
|
||||
LOG(INFO, "INFO: Allocations between %ldK - %ldK will be allocated in "
|
||||
"HBW. Set AUTO_HBW_SIZE=X:Y to change this limit.\n",
|
||||
HBWLowLimit / 1024, HBWHighLimit / 1024);
|
||||
} else if (HBWLowLimit > 0) {
|
||||
// if only a low limit is provided, use that
|
||||
LOG(INFO, "INFO: Allocations greater than %ldK will be allocated in HBW."
|
||||
" Set AUTO_HBW_SIZE=X:Y to change this limit.\n",
|
||||
HBWLowLimit / 1024);
|
||||
} else if (HBWHighLimit < -1ull) {
|
||||
// if only a high limit is provided, use that
|
||||
LOG(INFO, "INFO: Allocations smaller than %ldK will be allocated in HBW. "
|
||||
"Set AUTO_HBW_SIZE=X:Y to change this limit.\n",
|
||||
HBWHighLimit / 1024);
|
||||
} else {
|
||||
// none of limits is set to non-edge value, everything goes to HBW
|
||||
LOG(INFO, "INFO: All allocation will be done in HBW.");
|
||||
}
|
||||
}
|
||||
|
||||
struct kind_name_t {
|
||||
memkind_t *kind;
|
||||
const char *name;
|
||||
};
|
||||
|
||||
static struct kind_name_t named_kinds[] = {
|
||||
{ &MEMKIND_DEFAULT, "memkind_default" },
|
||||
{ &MEMKIND_HUGETLB, "memkind_hugetlb" },
|
||||
{ &MEMKIND_INTERLEAVE, "memkind_interleave" },
|
||||
{ &MEMKIND_HBW, "memkind_hbw" },
|
||||
{ &MEMKIND_HBW_PREFERRED, "memkind_hbw_preferred" },
|
||||
{ &MEMKIND_HBW_HUGETLB, "memkind_hbw_hugetlb" },
|
||||
{ &MEMKIND_HBW_PREFERRED_HUGETLB, "memkind_hbw_preferred_hugetlb" },
|
||||
{ &MEMKIND_HBW_GBTLB, "memkind_hbw_gbtlb" },
|
||||
{ &MEMKIND_HBW_PREFERRED_GBTLB, "memkind_hbw_preferred_gbtlb" },
|
||||
{ &MEMKIND_GBTLB, "memkind_gbtlb" },
|
||||
{ &MEMKIND_HBW_INTERLEAVE, "memkind_hbw_interleave" },
|
||||
};
|
||||
|
||||
static memkind_t get_kind_by_name(const char *name)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < sizeof(named_kinds) / sizeof(named_kinds[0]); ++i)
|
||||
if (strcasecmp(named_kinds[i].name, name) == 0)
|
||||
return *named_kinds[i].kind;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Read from the environment and sets global variables
|
||||
// Env variables are:
|
||||
// AUTO_HBW_SIZE = gives the size for auto HBW allocation
|
||||
// AUTO_HBW_LOG = gives logging level
|
||||
static void setEnvValues()
|
||||
{
|
||||
// STEP: Read the log level from the env variable. Do this early because
|
||||
// printing depends on this
|
||||
char *log_str = getenv("AUTO_HBW_LOG");
|
||||
if (log_str && strlen(log_str)) {
|
||||
int level = atoi(log_str);
|
||||
LogLevel = level;
|
||||
LOG(ALWAYS, "INFO: Setting log level to %d\n", LogLevel);
|
||||
}
|
||||
|
||||
if (LogLevel == INFO) {
|
||||
LOG(INFO, "INFO: HBW allocation stats will not be printed. "
|
||||
"Set AUTO_HBW_LOG to enable.\n");
|
||||
} else if (LogLevel == ALLOC) {
|
||||
LOG(INFO, "INFO: Only HBW allocations will be printed. "
|
||||
"Set AUTO_HBW_LOG to disable/enable.\n");
|
||||
} else if (LogLevel == VERBOSE) {
|
||||
LOG(INFO, "INFO: HBW allocation with backtrace info will be printed. "
|
||||
"Set AUTO_HBW_LOG to disable.\n");
|
||||
}
|
||||
|
||||
// Set the memory type allocated by this library. By default, it is
|
||||
// MEMKIND_HBW, but we can use this library to allocate other memory
|
||||
// types
|
||||
const char *memtype_str = getenv("AUTO_HBW_MEM_TYPE");
|
||||
if (memtype_str && strlen(memtype_str)) {
|
||||
// Find the memkind_t using the name the user has provided in the env variable
|
||||
memkind_t mty = get_kind_by_name(memtype_str);
|
||||
if (mty != 0) {
|
||||
hbw_kind = mty;
|
||||
LOG(INFO, "INFO: Setting HBW memory type to %s\n", memtype_str);
|
||||
} else {
|
||||
LOG(ALWAYS, "WARN: Memory type %s not recognized. Using default type\n",
|
||||
memtype_str);
|
||||
}
|
||||
}
|
||||
|
||||
// STEP: Set the size limits (thresholds) for HBW allocation
|
||||
//
|
||||
// Reads the environment variable
|
||||
const char *size_str = getenv("AUTO_HBW_SIZE");
|
||||
if (size_str) {
|
||||
size_t lowlim = HBWLowLimit / 1024;
|
||||
size_t highlim = HBWHighLimit / 1024;
|
||||
char lowC = 'K', highC = 'K';
|
||||
|
||||
if (size_str) {
|
||||
char *ptr = (char *)size_str;
|
||||
lowlim = strtoll(ptr, &ptr, 10);
|
||||
if (*ptr != 0 && *ptr != ':')
|
||||
lowC = *ptr++;
|
||||
else
|
||||
lowC = ' ';
|
||||
|
||||
if (*ptr++ == ':') {
|
||||
highlim = strtoll(ptr, &ptr, 10);
|
||||
if (*ptr)
|
||||
highC = *ptr;
|
||||
else
|
||||
highC = ' ';
|
||||
}
|
||||
|
||||
LOG(INFO, "INFO: lowlim=%zu(%c), highlim=%zu(%c)\n", lowlim, lowC, highlim,
|
||||
highC);
|
||||
}
|
||||
|
||||
HBWLowLimit = getLimit(lowlim, lowC);
|
||||
HBWHighLimit = getLimit(highlim, highC);
|
||||
|
||||
if (HBWLowLimit >= HBWHighLimit) {
|
||||
LOG(ALWAYS, "WARN: In AUTO_HBW_SIZE=X:Y, X cannot be greater or equal to Y. "
|
||||
"None of allocations will use HBW memory.\n");
|
||||
}
|
||||
} else {
|
||||
// if the user did not specify any limits, inform that we are using
|
||||
// default limits
|
||||
LOG(INFO, "INFO: Using default values for array size thresholds. "
|
||||
"Set AUTO_HBW_SIZE=X:Y to change.\n");
|
||||
}
|
||||
|
||||
// inform the user about limits
|
||||
printLimits();
|
||||
}
|
||||
|
||||
// This function is executed at library load time.
|
||||
// Initialize HBW arena by making a dummy allocation/free at library load
|
||||
// time. Until HBW initialization is complete, we must not call any
|
||||
// allocation routines with HBW as kind.
|
||||
static void AUTOHBW_INIT autohbw_load(void)
|
||||
{
|
||||
// First set the default memory type this library allocates. This can
|
||||
// be overridden by env variable
|
||||
// Note: 'memkind_hbw_preferred' will allow falling back to DDR but
|
||||
// 'memkind_hbw will not'
|
||||
// Note: If HBM is not installed on a system, memkind_hbw_preferred call
|
||||
// would fail. Therefore, we need to check for availability first.
|
||||
if (memkind_check_available(MEMKIND_HBW) != 0) {
|
||||
LOG(ALWAYS, "WARN: *** No HBM found in system. Will use default (DDR) "
|
||||
"OR user specified type ***\n");
|
||||
hbw_kind = MEMKIND_DEFAULT;
|
||||
} else {
|
||||
hbw_kind = MEMKIND_HBW_PREFERRED;
|
||||
}
|
||||
|
||||
// Read any env variables. This has to be done first because DbgLevel
|
||||
// is set using env variables and debug printing is used below
|
||||
setEnvValues(); // read any env variables
|
||||
|
||||
LOG(INFO, "INFO: autohbw.so loaded!\n");
|
||||
|
||||
// dummy HBW call to initialize HBW arena
|
||||
void *pp = memkind_malloc(hbw_kind, 16);
|
||||
if (pp == 0) {
|
||||
LOG(ALWAYS, "\t-HBW init call FAILED. "
|
||||
"Is required memory type present on your system?\n");
|
||||
abort();
|
||||
}
|
||||
|
||||
LOG(ALWAYS, "\t-HBW int call succeeded\n");
|
||||
memkind_free(hbw_kind, pp);
|
||||
|
||||
MemkindInitDone = true; // enable HBW allocation
|
||||
}
|
||||
|
||||
static void *MemkindMalloc(size_t size)
|
||||
{
|
||||
LOG(VERBOSE, "In my memkind malloc sz:%ld ... ", size);
|
||||
|
||||
bool useHbw = isAllocInHBW(size);
|
||||
memkind_t kind = useHbw ? hbw_kind : MEMKIND_DEFAULT;
|
||||
|
||||
if (useHbw)
|
||||
LOG(VERBOSE, "\tHBW");
|
||||
|
||||
void *ptr = memkind_malloc(kind, size);
|
||||
|
||||
LOG(VERBOSE, "\tptr:%p\n", ptr);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
static void *MemkindCalloc(size_t nmemb, size_t size)
|
||||
{
|
||||
LOG(VERBOSE, "In my memkind calloc sz:%ld ..", size * nmemb);
|
||||
|
||||
bool useHbw = isAllocInHBW(size);
|
||||
memkind_t kind = useHbw ? hbw_kind : MEMKIND_DEFAULT;
|
||||
|
||||
if (useHbw)
|
||||
LOG(VERBOSE, "\tHBW");
|
||||
|
||||
void *ptr = memkind_calloc(kind, nmemb, size);
|
||||
|
||||
LOG(VERBOSE, "\tptr:%p\n", ptr);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
static void *MemkindRealloc(void *ptr, size_t size)
|
||||
{
|
||||
LOG(VERBOSE, "In my memkind realloc sz:%ld, p1:%p ..", size, ptr);
|
||||
|
||||
bool useHbw = isAllocInHBW(size);
|
||||
memkind_t kind = useHbw ? hbw_kind : MEMKIND_DEFAULT;
|
||||
|
||||
if (useHbw)
|
||||
LOG(VERBOSE, "\tHBW");
|
||||
|
||||
void *nptr = memkind_realloc(kind, ptr, size);
|
||||
|
||||
LOG(VERBOSE, "\tptr=%p\n", nptr);
|
||||
return nptr;
|
||||
}
|
||||
|
||||
static int MemkindAlign(void **memptr, size_t alignment, size_t size)
|
||||
{
|
||||
LOG(VERBOSE, "In my memkind align sz:%ld .. ", size);
|
||||
|
||||
bool useHbw = isAllocInHBW(size);
|
||||
memkind_t kind = useHbw ? hbw_kind : MEMKIND_DEFAULT;
|
||||
|
||||
if (useHbw)
|
||||
LOG(VERBOSE, "\tHBW");
|
||||
|
||||
int ret = memkind_posix_memalign(kind, memptr, alignment, size);
|
||||
|
||||
LOG(VERBOSE, "\tptr:%p\n", *memptr);
|
||||
return ret;
|
||||
}
|
||||
|
||||
// memkind_free does not need the exact kind, if kind is 0. Then
|
||||
// the library can figure out the proper kind itself.
|
||||
static void MemkindFree(void *ptr)
|
||||
{
|
||||
// avoid to many useless logs
|
||||
if (ptr)
|
||||
LOG(VERBOSE, "In my memkind free, ptr:%p\n", ptr);
|
||||
memkind_free(0, ptr);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// ------------------ Public API of autohbw ----------------------
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
AUTOHBW_EXPORT void enableAutoHBW()
|
||||
{
|
||||
isAutoHBWEnabled = true;
|
||||
LOG(INFO, "INFO: HBW allocations enabled by application (for this rank)\n");
|
||||
}
|
||||
|
||||
AUTOHBW_EXPORT void disableAutoHBW()
|
||||
{
|
||||
isAutoHBWEnabled = false;
|
||||
LOG(INFO, "INFO: HBW allocations disabled by application (for this rank)\n");
|
||||
}
|
||||
|
||||
AUTOHBW_EXPORT void *malloc(size_t size)
|
||||
{
|
||||
return MemkindMalloc(size);
|
||||
}
|
||||
|
||||
AUTOHBW_EXPORT void *calloc(size_t nmemb, size_t size)
|
||||
{
|
||||
return MemkindCalloc(nmemb, size);
|
||||
}
|
||||
|
||||
AUTOHBW_EXPORT void *realloc(void *ptr, size_t size)
|
||||
{
|
||||
return MemkindRealloc(ptr, size);
|
||||
}
|
||||
|
||||
AUTOHBW_EXPORT int posix_memalign(void **memptr, size_t alignment, size_t size)
|
||||
{
|
||||
return MemkindAlign(memptr, alignment, size);
|
||||
}
|
||||
|
||||
// Warn about deprecated function usage.
|
||||
AUTOHBW_EXPORT void *valloc(size_t size)
|
||||
{
|
||||
LOG(ALWAYS, "use of deprecated valloc. Use posix_memalign instead\n");
|
||||
void *memptr = 0;
|
||||
size_t boundary = sysconf(_SC_PAGESIZE);
|
||||
int status = MemkindAlign(&memptr, boundary, size);
|
||||
if (status == 0 && memptr != 0)
|
||||
return memptr;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Warn about deprecated function usage.
|
||||
AUTOHBW_EXPORT void *memalign(size_t boundary, size_t size)
|
||||
{
|
||||
LOG(ALWAYS, "use of deprecated memalign. Use posix_memalign instead\n");
|
||||
void *memptr = 0;
|
||||
int status = MemkindAlign(&memptr, boundary, size);
|
||||
if (status == 0 && memptr != 0)
|
||||
return memptr;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
AUTOHBW_EXPORT void free(void *ptr)
|
||||
{
|
||||
return MemkindFree(ptr);
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
README for auothbw library
|
||||
Ruchira Sasanka (ruchira DOT sasanka AT intel DOT com)
|
||||
2015 April 8
|
||||
|
||||
PURPOSE
|
||||
-------
|
||||
The autohbw library is used to automatically allocate high-bandwidth (HBW)
|
||||
memory without any modifications to source code of your application.
|
||||
This library intercepts the standard heap allocations (e.g., malloc, calloc)
|
||||
in your program so that it can serve those allocations out of HBW memory.
|
||||
|
||||
There are two libraries installed at the same location as memkind library:
|
||||
1) libautohbw.so -- dynamic library
|
||||
2) libautohbw.a -- static library (provided for static linking)
|
||||
|
||||
USAGE
|
||||
-----
|
||||
To use the dynamic library, insert LD_PRELOAD=libautohbw.so and libmekind.so
|
||||
before your commandline. For instance,
|
||||
|
||||
LD_PRELOAD=libautohbw.so /bin/ls
|
||||
|
||||
executes Unix ls utility with autohbw library. You can execute the
|
||||
above command on the prompt or put it in a shell script. An example of
|
||||
the latter approach is given in ./autohbw_test.sh. Make sure that
|
||||
LD_LIBRARY_PATH enviornment variable contains the path to libautohbw.so
|
||||
and libmekind.so before you exeute the above command.
|
||||
|
||||
To use the statically linked library, insert -lautohbw -lmemkind
|
||||
on your link line. You will have to provide the library path with -L to
|
||||
point to the above libraries. If you are linking your program statically
|
||||
(e.g., with -static or -fast flags in ifort/icc), you must use the static
|
||||
version of autohbw library (libautohbw.a).
|
||||
|
||||
It is possible to temporarily disable/enable automatic HBM allocations by
|
||||
calling disableAutoHBW() and enableAutoHBW() in your source code. To call
|
||||
these routines, please include autohbw_api.h header file and link with
|
||||
-lautohbw.
|
||||
|
||||
|
||||
Usage with MPI programs
|
||||
-----------------------
|
||||
To use with MPI programs, you need to create a shell script to do the
|
||||
LD_PRELOAD. E.g.,
|
||||
mpirun -n 2 ./autohbw_test.sh
|
||||
|
||||
ENVIORNMENT VARIABLES
|
||||
---------------------
|
||||
The following enviornment variables control the behavior of the autohbw
|
||||
library:
|
||||
|
||||
AUTO_HBW_SIZE=x[:y]
|
||||
Indicates that any allocation larger than x and smaller than y should be
|
||||
allocated in HBW memory. x and y can be followed by a K, M, or G to
|
||||
indicate the size in Kilo/Memga/Giga bytes (e.g., 4K, 3M, 2G).
|
||||
Examples:
|
||||
AUTO_HBW_SIZE=4K # all allocation larger than 4K allocated in HBW
|
||||
AUTO_HBW_SIZE=1M:5M # allocations betwen 1M and 5M allocated in HBW
|
||||
|
||||
|
||||
AUTO_HBW_LOG=level
|
||||
Sets the value of logging (printing) level. If level is:
|
||||
-1 = no messages are printed
|
||||
0 = no log messages for allocations are printed but INFO messages
|
||||
are printed
|
||||
1 = a log message is printed for each allocation (Default)
|
||||
2 = a log message is printed for each allocation with a backtrace
|
||||
Redirect this output and use autohbw_get_src_lines.pl to find
|
||||
source lines for each allocation. Your application must be compiled
|
||||
with -g to see source lines.
|
||||
Notes:
|
||||
1. Logging adds extra overhead. Therefore, performance critical runs,
|
||||
logging level should be 0
|
||||
2. The amount of free memory printed with log messages is only
|
||||
approximate -- e.g. pages that are not touched yet are excluded
|
||||
Examples:
|
||||
AUTO_HBW_LOG=1
|
||||
|
||||
|
||||
AUTO_HBW_MEM_TYPE=memory_type
|
||||
Sets the type of memory type that should be automatically allocated. By
|
||||
default, this type is MEMKIND_HBW_PREFERRED, if MCDRAM is found in your
|
||||
system; otherwise, the default is MEMKIND_DEFAULT. The names of memory
|
||||
types are definedin memkind(3) man page. If you are requesting any huge
|
||||
TLB pages, pleasemake sure that the requested type is currently enabled
|
||||
in your OS.
|
||||
Examples:
|
||||
AUTO_HBW_MEM_TYPE=MEMKIND_HBW_PREFERRED (default, if MCDRAM present)
|
||||
AUTO_HBW_MEM_TYPE=MEMKIND_DEFAULT (default, if MCDRAM absent)
|
||||
AUTO_HBW_MEM_TYPE=MEMKIND_HBW_HUGETLB
|
||||
AUTO_HBW_MEM_TYPE=MEMKIND_HUGETLB
|
||||
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright (C) 2015 - 2016 Intel Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// File : autohbw_api.h
|
||||
// Purpose: Header file to include, to use API calls to AutoHBW
|
||||
// Author : Ruchira Sasanka (ruchira.sasanka AT intel.com)
|
||||
// Date : Jan 30, 2015
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef AUTOHBW_API_H
|
||||
#define AUTOHBW_API_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// Temporarily enable HBM allocations
|
||||
void enableAutoHBW();
|
||||
|
||||
// Temporarily disable HBM allocations
|
||||
void disableAutoHBW();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+106
@@ -0,0 +1,106 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# Copyright (C) 2015 - 2016 Intel Corporation.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
# this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
my $usage = "Usage: get_autohbw_srclines.pl output_log_of_AutoHBW executable";
|
||||
|
||||
# Check for 2 arguments
|
||||
#
|
||||
if (@ARGV != 2) {
|
||||
print $usage, "\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
# Read the command line arguments
|
||||
#
|
||||
my $LogF = shift @ARGV;
|
||||
my $BinaryF = shift @ARGV;
|
||||
|
||||
&main();
|
||||
|
||||
sub main {
|
||||
|
||||
|
||||
print("Info: Reading AutoHBW log from: $LogF\n");
|
||||
print("Info: Binary file: $BinaryF\n");
|
||||
|
||||
# open the log file produced by AutoHBM and look at lines starting
|
||||
# with Log
|
||||
open LOGF, "grep Log $LogF |" or die "Can't open log file $LogF";
|
||||
|
||||
my $line;
|
||||
|
||||
# Read each log line
|
||||
#
|
||||
while ($line = <LOGF>) {
|
||||
|
||||
# if the line contain 3 backtrace addresses, try to find the source
|
||||
# lines for them
|
||||
#
|
||||
if ($line =~ /^(Log:.*)Backtrace:.*0x([0-9a-f]+).*0x([0-9a-f]+).*0x([0-9a-f]+)/ ) {
|
||||
|
||||
# Read the pointers
|
||||
#
|
||||
my @ptrs;
|
||||
|
||||
my $pre = $1;
|
||||
|
||||
$ptrs[0] = $2;
|
||||
$ptrs[1] = $3;
|
||||
$ptrs[2] = $4;
|
||||
|
||||
# prints the first portion of the line
|
||||
#
|
||||
print $pre, "\n";
|
||||
|
||||
# for each of the pointers, lookup its source line using
|
||||
# addr2line and print the src line(s) if found
|
||||
#
|
||||
my $i=0;
|
||||
for ($i=0; $i < @ptrs; $i++) {
|
||||
|
||||
my $addr = $ptrs[$i];
|
||||
|
||||
open SRCL, "addr2line -e $BinaryF 0x$addr |"
|
||||
or die "addr2line fail";
|
||||
|
||||
|
||||
my $srcl = <SRCL>;
|
||||
|
||||
if ($srcl =~ /^\?/) {
|
||||
|
||||
} else {
|
||||
|
||||
print "\t- Src: $srcl";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (C) 2015 - 2016 Intel Corporation.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
# this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# The following is needed if your system does not really have HBW nodes.
|
||||
# Please see 'man memkind' for a description of this variable
|
||||
#
|
||||
# export MEMKIND_HBW_NODES=0
|
||||
|
||||
# Set any autohbw env variables
|
||||
#
|
||||
export AUTO_HBW_SIZE=4K
|
||||
|
||||
# Make sure you have set LD_LIBRARY_PATH to lib directory with libautohbw.so
|
||||
# and libmemkind.so
|
||||
#
|
||||
LD_PRELOAD=libautohbw.so:libmemkind.so /bin/ls
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2016 Intel Corporation.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
# this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
set -e
|
||||
|
||||
if [ -z "$JE_PREFIX" ]; then
|
||||
export JE_PREFIX=jemk_
|
||||
fi
|
||||
|
||||
cd $(dirname $0)
|
||||
EXTRA_CONF=$@
|
||||
|
||||
if [ ! -f ./jemalloc/obj/lib/libjemalloc_pic.a ]; then
|
||||
./build_jemalloc.sh $EXTRA_CONF
|
||||
fi
|
||||
|
||||
if [ ! -f ./configure ]; then
|
||||
./autogen.sh
|
||||
fi
|
||||
|
||||
if [ ! -f ./Makefile ]; then
|
||||
./configure $EXTRA_CONF
|
||||
fi
|
||||
|
||||
#use V=1 for full cmdlines of build
|
||||
make all -j $MAKEOPTS
|
||||
make checkprogs -j $MAKEOPTS
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2016 - 2018 Intel Corporation.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
# this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
EXTRA_CONF=$@
|
||||
|
||||
cd jemalloc
|
||||
test -e configure || autoconf
|
||||
test -e obj || mkdir obj
|
||||
cd obj
|
||||
../configure --enable-autogen --with-jemalloc-prefix=$JE_PREFIX --without-export \
|
||||
--disable-stats --disable-fill \
|
||||
$EXTRA_CONF --with-malloc-conf="narenas:256,lg_tcache_max:12"
|
||||
|
||||
make -j`nproc`
|
||||
Vendored
+53
@@ -0,0 +1,53 @@
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Upper bound for number of arenas per kind */
|
||||
#undef ARENA_LIMIT_PER_KIND
|
||||
|
||||
/* define if the compiler supports basic C++11 syntax */
|
||||
#undef HAVE_CXX11
|
||||
|
||||
/* Define to 1 if you have the `numa' library (-lnuma). */
|
||||
#undef HAVE_LIBNUMA
|
||||
|
||||
/* Have PTHREAD_PRIO_INHERIT. */
|
||||
#undef HAVE_PTHREAD_PRIO_INHERIT
|
||||
|
||||
/* Enables code for debugging */
|
||||
#undef MEMKIND_DEBUG
|
||||
|
||||
/* Enables decorators */
|
||||
#undef MEMKIND_DECORATION_ENABLED
|
||||
|
||||
/* Enables TLS usage for mapping arenas to threads */
|
||||
#undef MEMKIND_TLS
|
||||
|
||||
/* TLS model attribute */
|
||||
#undef MEMKIND_TLS_MODEL
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#undef PACKAGE_URL
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define to necessary symbol if this constant uses a non-standard name on
|
||||
your system. */
|
||||
#undef PTHREAD_CREATE_JOINABLE
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
Vendored
+197
@@ -0,0 +1,197 @@
|
||||
#
|
||||
# Copyright (C) 2014 - 2018 Intel Corporation.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
# this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ([2.64])
|
||||
AC_INIT([memkind],m4_esyscmd([tr -d '\n' < VERSION]))
|
||||
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_CONFIG_SRCDIR([memkind.spec.mk])
|
||||
|
||||
AM_INIT_AUTOMAKE([-Wall -Werror foreign 1.11 silent-rules subdir-objects parallel-tests tar-pax])
|
||||
AM_SILENT_RULES([yes])
|
||||
|
||||
# Checks for programs and libraries.
|
||||
AM_PROG_AR
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CC
|
||||
AC_OPENMP
|
||||
AC_CHECK_LIB(numa, numa_available, [], [AC_MSG_ERROR([libnuma is required dependency])])
|
||||
AX_PTHREAD([LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" CC="$PTHREAD_CC"],
|
||||
[AC_MSG_ERROR([pthreads are required dependency])])
|
||||
|
||||
AM_PROG_CC_C_O
|
||||
|
||||
#============================tls===============================================
|
||||
# Check for tls_model attribute support
|
||||
SAVED_CFLAGS="${CFLAGS}"
|
||||
CFLAGS="$CFLAGS -Werror"
|
||||
AC_MSG_CHECKING([for tls_model attribute support])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
||||
[[
|
||||
static __thread int __attribute__((tls_model("local-dynamic"))) x;
|
||||
]],
|
||||
[[
|
||||
x = 1234;
|
||||
]])],
|
||||
[AC_MSG_RESULT([yes])
|
||||
tls_model="1"],
|
||||
[AC_MSG_RESULT([no])
|
||||
tls_model="0"])
|
||||
|
||||
CFLAGS="${SAVED_CFLAGS}"
|
||||
if test "x${tls_model}" = "x1" ; then
|
||||
AC_DEFINE([MEMKIND_TLS_MODEL],
|
||||
[__attribute__((tls_model("initial-exec")))], [TLS model attribute])
|
||||
else
|
||||
AC_DEFINE([MEMKIND_TLS_MODEL], [ ], [TLS model attribute])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE([tls],
|
||||
[AS_HELP_STRING([--enable-tls], [Enable thread-local storage (__thread keyword)])],
|
||||
[if test "x$enable_tls" = "xyes" ; then
|
||||
enable_tls="1"
|
||||
else
|
||||
enable_tls="0"
|
||||
fi
|
||||
],
|
||||
[enable_tls="0"]
|
||||
)
|
||||
if test "x${enable_tls}" = "x1" ; then
|
||||
AC_MSG_CHECKING([for TLS support])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
||||
[[
|
||||
__thread int x;
|
||||
]], [[
|
||||
x = 1234;
|
||||
]])],
|
||||
AC_MSG_RESULT([yes]),
|
||||
AC_MSG_RESULT([no])
|
||||
enable_tls="0")
|
||||
fi
|
||||
if test "x${enable_tls}" = "x1" ; then
|
||||
AC_DEFINE([MEMKIND_TLS], [ ], [Enables TLS usage for mapping arenas to threads])
|
||||
fi
|
||||
AC_SUBST([enable_tls])
|
||||
|
||||
#============================decorators========================================
|
||||
AC_ARG_ENABLE([decorators],
|
||||
[AS_HELP_STRING([--enable-decorators], [Enable decorators])],
|
||||
[if test "x$enable_decorators" = "xyes" ; then
|
||||
enable_decorators="1"
|
||||
else
|
||||
enable_decorators="0"
|
||||
fi
|
||||
],
|
||||
[enable_decorators="0"]
|
||||
)
|
||||
if test "x${enable_decorators}" = "x1" ; then
|
||||
AC_DEFINE([MEMKIND_DECORATION_ENABLED], [ ], [Enables decorators])
|
||||
fi
|
||||
AC_SUBST([enable_decorators])
|
||||
|
||||
#============================debug=============================================
|
||||
AC_ARG_ENABLE([debug],
|
||||
[AS_HELP_STRING([--enable-debug], [Build debugging code and compile with -O0 -g])],
|
||||
[if test "x$enable_debug" = "xno" ; then
|
||||
enable_debug="0"
|
||||
else
|
||||
enable_debug="1"
|
||||
fi
|
||||
],
|
||||
[enable_debug="0"]
|
||||
)
|
||||
if test "x$enable_debug" = "x1" ; then
|
||||
AC_DEFINE([MEMKIND_DEBUG], [ ], [Enables code for debugging])
|
||||
CFLAGS="$CFLAGS -O0 -g"
|
||||
CXXFLAGS="$CXXFLAGS -O0 -g"
|
||||
fi
|
||||
AC_SUBST([enable_debug])
|
||||
|
||||
#============================gcov==============================================
|
||||
AC_ARG_ENABLE([gcov],
|
||||
[AS_HELP_STRING([--enable-gcov], [Build code with gcov instructions])],
|
||||
[if test "x$enable_gcov" = "xno" ; then
|
||||
enable_gcov="0"
|
||||
else
|
||||
enable_gcov="1"
|
||||
fi
|
||||
],
|
||||
[enable_gcov="0"]
|
||||
)
|
||||
if test "x$enable_gcov" = "x1" ; then
|
||||
CFLAGS="$CFLAGS -O0 -fprofile-arcs -ftest-coverage"
|
||||
CXXFLAGS="$CXXFLAGS -O0 -fprofile-arcs -ftest-coverage"
|
||||
fi
|
||||
AC_SUBST([enable_gcov])
|
||||
|
||||
#============================secure_flags======================================
|
||||
AC_ARG_ENABLE([secure],
|
||||
[AS_HELP_STRING([--enable-secure], [Build library with security enchantments])],
|
||||
[if test "x$enable_secure" = "xno" ; then
|
||||
enable_secure="0"
|
||||
else
|
||||
enable_secure="1"
|
||||
fi
|
||||
],
|
||||
[enable_secure="1"]
|
||||
)
|
||||
if test "x$enable_secure" = "x1" ; then
|
||||
CFLAGS="$CFLAGS -fstack-protector"
|
||||
LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
|
||||
|
||||
if test "$CFLAGS" != "${CFLAGS%-O0*}" ; then # if CFLAGS contains -O0
|
||||
echo "WARNING: Could not apply FORTIFY_SOURCE=2 due to lack of optimization (-O0)"
|
||||
else
|
||||
CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2" #FORTITFY_SOURCE does not work with -O0 (ex. if enable_debug=1 or enable_gcov=1)
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST([enable_secure])
|
||||
|
||||
#============================arena_limit=======================================
|
||||
arena_limit=256;
|
||||
AC_ARG_VAR(ARENA_LIMIT,
|
||||
[Upper bound for number of arenas per kind, if set to 0 then no limit]
|
||||
)
|
||||
if test "$ARENA_LIMIT" != "" ; then
|
||||
arena_limit=$ARENA_LIMIT;
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED([ARENA_LIMIT_PER_KIND], $arena_limit, [Upper bound for number of arenas per kind])
|
||||
|
||||
#============================cxx11=============================================
|
||||
|
||||
AX_CXX_COMPILE_STDCXX_11([noext], [optional])
|
||||
AM_CONDITIONAL([HAVE_CXX11], [test "x$HAVE_CXX11" = x1])
|
||||
|
||||
LT_PREREQ([2.2])
|
||||
LT_INIT
|
||||
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
+302
@@ -0,0 +1,302 @@
|
||||
.gitignore
|
||||
AUTHORS
|
||||
COPYING
|
||||
CONTRIBUTING
|
||||
INSTALL
|
||||
NEWS
|
||||
PULL_REQUEST_TEMPLATE.md
|
||||
README
|
||||
VERSION
|
||||
m4/ax_cxx_compile_stdcxx.m4
|
||||
m4/ax_cxx_compile_stdcxx_11.m4
|
||||
m4/ax_pthread.m4
|
||||
ChangeLog
|
||||
.travis.yml
|
||||
autohbw/autohbw_README
|
||||
examples/README
|
||||
test/memkind-afts.ts
|
||||
test/memkind-afts-ext.ts
|
||||
test/memkind-slts.ts
|
||||
test/memkind-perf.ts
|
||||
test/memkind-perf-ext.ts
|
||||
test/memkind-pytests.ts
|
||||
test/gtest_fused/gtest/gtest-all.cc
|
||||
test/gtest_fused/gtest/gtest.h
|
||||
jemalloc/.appveyor.yml
|
||||
jemalloc/.autom4te.cfg
|
||||
jemalloc/.gitattributes
|
||||
jemalloc/.gitignore
|
||||
jemalloc/.travis.yml
|
||||
jemalloc/COPYING
|
||||
jemalloc/ChangeLog
|
||||
jemalloc/INSTALL.md
|
||||
jemalloc/Makefile.in
|
||||
jemalloc/README
|
||||
jemalloc/autogen.sh
|
||||
jemalloc/bin/jemalloc-config.in
|
||||
jemalloc/bin/jemalloc.sh.in
|
||||
jemalloc/bin/jeprof.in
|
||||
jemalloc/build-aux/config.guess
|
||||
jemalloc/build-aux/config.sub
|
||||
jemalloc/build-aux/install-sh
|
||||
jemalloc/config.stamp.in
|
||||
jemalloc/configure.ac
|
||||
jemalloc/doc/html.xsl.in
|
||||
jemalloc/doc/jemalloc.xml.in
|
||||
jemalloc/doc/manpages.xsl.in
|
||||
jemalloc/doc/stylesheet.xsl
|
||||
jemalloc/include/jemalloc/internal/arena_externs.h
|
||||
jemalloc/include/jemalloc/internal/arena_inlines_a.h
|
||||
jemalloc/include/jemalloc/internal/arena_inlines_b.h
|
||||
jemalloc/include/jemalloc/internal/arena_structs_a.h
|
||||
jemalloc/include/jemalloc/internal/arena_structs_b.h
|
||||
jemalloc/include/jemalloc/internal/arena_types.h
|
||||
jemalloc/include/jemalloc/internal/assert.h
|
||||
jemalloc/include/jemalloc/internal/atomic.h
|
||||
jemalloc/include/jemalloc/internal/atomic_c11.h
|
||||
jemalloc/include/jemalloc/internal/atomic_gcc_atomic.h
|
||||
jemalloc/include/jemalloc/internal/atomic_gcc_sync.h
|
||||
jemalloc/include/jemalloc/internal/atomic_msvc.h
|
||||
jemalloc/include/jemalloc/internal/background_thread_externs.h
|
||||
jemalloc/include/jemalloc/internal/background_thread_inlines.h
|
||||
jemalloc/include/jemalloc/internal/background_thread_structs.h
|
||||
jemalloc/include/jemalloc/internal/base_externs.h
|
||||
jemalloc/include/jemalloc/internal/base_inlines.h
|
||||
jemalloc/include/jemalloc/internal/base_structs.h
|
||||
jemalloc/include/jemalloc/internal/base_types.h
|
||||
jemalloc/include/jemalloc/internal/bit_util.h
|
||||
jemalloc/include/jemalloc/internal/bitmap.h
|
||||
jemalloc/include/jemalloc/internal/ckh.h
|
||||
jemalloc/include/jemalloc/internal/ctl.h
|
||||
jemalloc/include/jemalloc/internal/extent_dss.h
|
||||
jemalloc/include/jemalloc/internal/extent_externs.h
|
||||
jemalloc/include/jemalloc/internal/extent_inlines.h
|
||||
jemalloc/include/jemalloc/internal/extent_mmap.h
|
||||
jemalloc/include/jemalloc/internal/extent_structs.h
|
||||
jemalloc/include/jemalloc/internal/extent_types.h
|
||||
jemalloc/include/jemalloc/internal/hash.h
|
||||
jemalloc/include/jemalloc/internal/hooks.h
|
||||
jemalloc/include/jemalloc/internal/jemalloc_internal_decls.h
|
||||
jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h.in
|
||||
jemalloc/include/jemalloc/internal/jemalloc_internal_externs.h
|
||||
jemalloc/include/jemalloc/internal/jemalloc_internal_includes.h
|
||||
jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_a.h
|
||||
jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_b.h
|
||||
jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h
|
||||
jemalloc/include/jemalloc/internal/jemalloc_internal_macros.h
|
||||
jemalloc/include/jemalloc/internal/jemalloc_internal_types.h
|
||||
jemalloc/include/jemalloc/internal/jemalloc_preamble.h.in
|
||||
jemalloc/include/jemalloc/internal/large_externs.h
|
||||
jemalloc/include/jemalloc/internal/malloc_io.h
|
||||
jemalloc/include/jemalloc/internal/mutex.h
|
||||
jemalloc/include/jemalloc/internal/mutex_pool.h
|
||||
jemalloc/include/jemalloc/internal/mutex_prof.h
|
||||
jemalloc/include/jemalloc/internal/nstime.h
|
||||
jemalloc/include/jemalloc/internal/pages.h
|
||||
jemalloc/include/jemalloc/internal/ph.h
|
||||
jemalloc/include/jemalloc/internal/private_namespace.sh
|
||||
jemalloc/include/jemalloc/internal/private_symbols.sh
|
||||
jemalloc/include/jemalloc/internal/prng.h
|
||||
jemalloc/include/jemalloc/internal/prof_externs.h
|
||||
jemalloc/include/jemalloc/internal/prof_inlines_a.h
|
||||
jemalloc/include/jemalloc/internal/prof_inlines_b.h
|
||||
jemalloc/include/jemalloc/internal/prof_structs.h
|
||||
jemalloc/include/jemalloc/internal/prof_types.h
|
||||
jemalloc/include/jemalloc/internal/public_namespace.sh
|
||||
jemalloc/include/jemalloc/internal/public_unnamespace.sh
|
||||
jemalloc/include/jemalloc/internal/ql.h
|
||||
jemalloc/include/jemalloc/internal/qr.h
|
||||
jemalloc/include/jemalloc/internal/rb.h
|
||||
jemalloc/include/jemalloc/internal/rtree.h
|
||||
jemalloc/include/jemalloc/internal/rtree_tsd.h
|
||||
jemalloc/include/jemalloc/internal/size_classes.sh
|
||||
jemalloc/include/jemalloc/internal/smoothstep.h
|
||||
jemalloc/include/jemalloc/internal/smoothstep.sh
|
||||
jemalloc/include/jemalloc/internal/spin.h
|
||||
jemalloc/include/jemalloc/internal/stats.h
|
||||
jemalloc/include/jemalloc/internal/stats_tsd.h
|
||||
jemalloc/include/jemalloc/internal/sz.h
|
||||
jemalloc/include/jemalloc/internal/tcache_externs.h
|
||||
jemalloc/include/jemalloc/internal/tcache_inlines.h
|
||||
jemalloc/include/jemalloc/internal/tcache_structs.h
|
||||
jemalloc/include/jemalloc/internal/tcache_types.h
|
||||
jemalloc/include/jemalloc/internal/ticker.h
|
||||
jemalloc/include/jemalloc/internal/tsd.h
|
||||
jemalloc/include/jemalloc/internal/tsd_generic.h
|
||||
jemalloc/include/jemalloc/internal/tsd_malloc_thread_cleanup.h
|
||||
jemalloc/include/jemalloc/internal/tsd_tls.h
|
||||
jemalloc/include/jemalloc/internal/tsd_types.h
|
||||
jemalloc/include/jemalloc/internal/tsd_win.h
|
||||
jemalloc/include/jemalloc/internal/util.h
|
||||
jemalloc/include/jemalloc/internal/witness.h
|
||||
jemalloc/include/jemalloc/jemalloc.sh
|
||||
jemalloc/include/jemalloc/jemalloc_defs.h.in
|
||||
jemalloc/include/jemalloc/jemalloc_macros.h.in
|
||||
jemalloc/include/jemalloc/jemalloc_mangle.sh
|
||||
jemalloc/include/jemalloc/jemalloc_protos.h.in
|
||||
jemalloc/include/jemalloc/jemalloc_rename.sh
|
||||
jemalloc/include/jemalloc/jemalloc_typedefs.h.in
|
||||
jemalloc/include/msvc_compat/C99/stdbool.h
|
||||
jemalloc/include/msvc_compat/C99/stdint.h
|
||||
jemalloc/include/msvc_compat/strings.h
|
||||
jemalloc/include/msvc_compat/windows_extra.h
|
||||
jemalloc/jemalloc.pc.in
|
||||
jemalloc/m4/ax_cxx_compile_stdcxx.m4
|
||||
jemalloc/msvc/ReadMe.txt
|
||||
jemalloc/msvc/jemalloc_vc2015.sln
|
||||
jemalloc/msvc/projects/vc2015/jemalloc/jemalloc.vcxproj
|
||||
jemalloc/msvc/projects/vc2015/jemalloc/jemalloc.vcxproj.filters
|
||||
jemalloc/msvc/projects/vc2015/test_threads/test_threads.cpp
|
||||
jemalloc/msvc/projects/vc2015/test_threads/test_threads.h
|
||||
jemalloc/msvc/projects/vc2015/test_threads/test_threads.vcxproj
|
||||
jemalloc/msvc/projects/vc2015/test_threads/test_threads.vcxproj.filters
|
||||
jemalloc/msvc/projects/vc2015/test_threads/test_threads_main.cpp
|
||||
jemalloc/run_tests.sh
|
||||
jemalloc/scripts/gen_run_tests.py
|
||||
jemalloc/scripts/gen_travis.py
|
||||
jemalloc/src/arena.c
|
||||
jemalloc/src/background_thread.c
|
||||
jemalloc/src/base.c
|
||||
jemalloc/src/bitmap.c
|
||||
jemalloc/src/ckh.c
|
||||
jemalloc/src/ctl.c
|
||||
jemalloc/src/extent.c
|
||||
jemalloc/src/extent_dss.c
|
||||
jemalloc/src/extent_mmap.c
|
||||
jemalloc/src/hash.c
|
||||
jemalloc/src/hooks.c
|
||||
jemalloc/src/jemalloc.c
|
||||
jemalloc/src/jemalloc_cpp.cpp
|
||||
jemalloc/src/large.c
|
||||
jemalloc/src/malloc_io.c
|
||||
jemalloc/src/mutex.c
|
||||
jemalloc/src/mutex_pool.c
|
||||
jemalloc/src/nstime.c
|
||||
jemalloc/src/pages.c
|
||||
jemalloc/src/prng.c
|
||||
jemalloc/src/prof.c
|
||||
jemalloc/src/rtree.c
|
||||
jemalloc/src/spin.c
|
||||
jemalloc/src/stats.c
|
||||
jemalloc/src/sz.c
|
||||
jemalloc/src/tcache.c
|
||||
jemalloc/src/ticker.c
|
||||
jemalloc/src/tsd.c
|
||||
jemalloc/src/witness.c
|
||||
jemalloc/src/zone.c
|
||||
jemalloc/test/include/test/SFMT-alti.h
|
||||
jemalloc/test/include/test/SFMT-params.h
|
||||
jemalloc/test/include/test/SFMT-params11213.h
|
||||
jemalloc/test/include/test/SFMT-params1279.h
|
||||
jemalloc/test/include/test/SFMT-params132049.h
|
||||
jemalloc/test/include/test/SFMT-params19937.h
|
||||
jemalloc/test/include/test/SFMT-params216091.h
|
||||
jemalloc/test/include/test/SFMT-params2281.h
|
||||
jemalloc/test/include/test/SFMT-params4253.h
|
||||
jemalloc/test/include/test/SFMT-params44497.h
|
||||
jemalloc/test/include/test/SFMT-params607.h
|
||||
jemalloc/test/include/test/SFMT-params86243.h
|
||||
jemalloc/test/include/test/SFMT-sse2.h
|
||||
jemalloc/test/include/test/SFMT.h
|
||||
jemalloc/test/include/test/btalloc.h
|
||||
jemalloc/test/include/test/extent_hooks.h
|
||||
jemalloc/test/include/test/jemalloc_test.h.in
|
||||
jemalloc/test/include/test/jemalloc_test_defs.h.in
|
||||
jemalloc/test/include/test/math.h
|
||||
jemalloc/test/include/test/mq.h
|
||||
jemalloc/test/include/test/mtx.h
|
||||
jemalloc/test/include/test/test.h
|
||||
jemalloc/test/include/test/thd.h
|
||||
jemalloc/test/include/test/timer.h
|
||||
jemalloc/test/integration/MALLOCX_ARENA.c
|
||||
jemalloc/test/integration/aligned_alloc.c
|
||||
jemalloc/test/integration/allocated.c
|
||||
jemalloc/test/integration/extent.c
|
||||
jemalloc/test/integration/extent.sh
|
||||
jemalloc/test/integration/mallocx.c
|
||||
jemalloc/test/integration/mallocx.sh
|
||||
jemalloc/test/integration/overflow.c
|
||||
jemalloc/test/integration/posix_memalign.c
|
||||
jemalloc/test/integration/rallocx.c
|
||||
jemalloc/test/integration/sdallocx.c
|
||||
jemalloc/test/integration/thread_arena.c
|
||||
jemalloc/test/integration/thread_tcache_enabled.c
|
||||
jemalloc/test/integration/xallocx.c
|
||||
jemalloc/test/integration/xallocx.sh
|
||||
jemalloc/test/src/SFMT.c
|
||||
jemalloc/test/src/btalloc.c
|
||||
jemalloc/test/src/btalloc_0.c
|
||||
jemalloc/test/src/btalloc_1.c
|
||||
jemalloc/test/src/math.c
|
||||
jemalloc/test/src/mq.c
|
||||
jemalloc/test/src/mtx.c
|
||||
jemalloc/test/src/test.c
|
||||
jemalloc/test/src/thd.c
|
||||
jemalloc/test/src/timer.c
|
||||
jemalloc/test/stress/microbench.c
|
||||
jemalloc/test/test.sh.in
|
||||
jemalloc/test/unit/SFMT.c
|
||||
jemalloc/test/unit/a0.c
|
||||
jemalloc/test/unit/arena_reset.c
|
||||
jemalloc/test/unit/arena_reset_prof.c
|
||||
jemalloc/test/unit/arena_reset_prof.sh
|
||||
jemalloc/test/unit/atomic.c
|
||||
jemalloc/test/unit/background_thread.c
|
||||
jemalloc/test/unit/base.c
|
||||
jemalloc/test/unit/bit_util.c
|
||||
jemalloc/test/unit/bitmap.c
|
||||
jemalloc/test/unit/ckh.c
|
||||
jemalloc/test/unit/decay.c
|
||||
jemalloc/test/unit/decay.sh
|
||||
jemalloc/test/unit/extent_quantize.c
|
||||
jemalloc/test/unit/fork.c
|
||||
jemalloc/test/unit/hash.c
|
||||
jemalloc/test/unit/hooks.c
|
||||
jemalloc/test/unit/junk.c
|
||||
jemalloc/test/unit/junk.sh
|
||||
jemalloc/test/unit/junk_alloc.c
|
||||
jemalloc/test/unit/junk_alloc.sh
|
||||
jemalloc/test/unit/junk_free.c
|
||||
jemalloc/test/unit/junk_free.sh
|
||||
jemalloc/test/unit/mallctl.c
|
||||
jemalloc/test/unit/malloc_io.c
|
||||
jemalloc/test/unit/math.c
|
||||
jemalloc/test/unit/mq.c
|
||||
jemalloc/test/unit/mtx.c
|
||||
jemalloc/test/unit/nstime.c
|
||||
jemalloc/test/unit/pack.c
|
||||
jemalloc/test/unit/pack.sh
|
||||
jemalloc/test/unit/pages.c
|
||||
jemalloc/test/unit/ph.c
|
||||
jemalloc/test/unit/prng.c
|
||||
jemalloc/test/unit/prof_accum.c
|
||||
jemalloc/test/unit/prof_accum.sh
|
||||
jemalloc/test/unit/prof_active.c
|
||||
jemalloc/test/unit/prof_active.sh
|
||||
jemalloc/test/unit/prof_gdump.c
|
||||
jemalloc/test/unit/prof_gdump.sh
|
||||
jemalloc/test/unit/prof_idump.c
|
||||
jemalloc/test/unit/prof_idump.sh
|
||||
jemalloc/test/unit/prof_reset.c
|
||||
jemalloc/test/unit/prof_reset.sh
|
||||
jemalloc/test/unit/prof_tctx.c
|
||||
jemalloc/test/unit/prof_tctx.sh
|
||||
jemalloc/test/unit/prof_thread_name.c
|
||||
jemalloc/test/unit/prof_thread_name.sh
|
||||
jemalloc/test/unit/ql.c
|
||||
jemalloc/test/unit/qr.c
|
||||
jemalloc/test/unit/rb.c
|
||||
jemalloc/test/unit/retained.c
|
||||
jemalloc/test/unit/rtree.c
|
||||
jemalloc/test/unit/size_classes.c
|
||||
jemalloc/test/unit/slab.c
|
||||
jemalloc/test/unit/smoothstep.c
|
||||
jemalloc/test/unit/spin.c
|
||||
jemalloc/test/unit/stats.c
|
||||
jemalloc/test/unit/stats_print.c
|
||||
jemalloc/test/unit/ticker.c
|
||||
jemalloc/test/unit/tsd.c
|
||||
jemalloc/test/unit/witness.c
|
||||
jemalloc/test/unit/zero.c
|
||||
jemalloc/test/unit/zero.sh
|
||||
include/memkind/internal/tbb_mem_pool_policy.h
|
||||
+159
@@ -0,0 +1,159 @@
|
||||
astyle.sh
|
||||
autogen.sh
|
||||
build.sh
|
||||
build_jemalloc.sh
|
||||
install_astyle.sh
|
||||
Makefile.am
|
||||
configure.ac
|
||||
autohbw/Makefile.mk
|
||||
autohbw/autohbw.c
|
||||
autohbw/autohbw_get_src_lines.pl
|
||||
autohbw/autohbw_test.sh
|
||||
examples/Makefile.mk
|
||||
examples/autohbw_candidates.c
|
||||
examples/filter_example.c
|
||||
examples/hello_hbw_example.c
|
||||
examples/memkind_allocated_example.cpp
|
||||
examples/memkind_allocated.hpp
|
||||
examples/hello_memkind_example.c
|
||||
examples/memkind_decorator_debug.c
|
||||
man/memkind-hbw-nodes.1
|
||||
man/autohbw.7
|
||||
man/hbwmalloc.3
|
||||
man/memkind.3
|
||||
man/memkind_arena.3
|
||||
man/memkind_default.3
|
||||
man/memkind_hbw.3
|
||||
man/memkind_hugetlb.3
|
||||
man/hbwallocator.3
|
||||
man/pmemallocator.3
|
||||
memkind.spec.mk
|
||||
src/heap_manager.c
|
||||
src/hbwmalloc.c
|
||||
src/memkind.c
|
||||
src/memkind_arena.c
|
||||
src/memkind_default.c
|
||||
src/memkind_gbtlb.c
|
||||
src/memkind_hbw.c
|
||||
src/memkind_regular.c
|
||||
src/memkind_hugetlb.c
|
||||
src/memkind_interleave.c
|
||||
src/memkind_log.c
|
||||
src/memkind-hbw-nodes.c
|
||||
src/tbb_wrapper.c
|
||||
src/Makefile.mk
|
||||
include/hbwmalloc.h
|
||||
include/memkind.h
|
||||
include/memkind_deprecated.h
|
||||
include/hbw_allocator.h
|
||||
include/pmem_allocator.h
|
||||
include/memkind/internal/heap_manager.h
|
||||
include/memkind/internal/memkind_arena.h
|
||||
include/memkind/internal/memkind_default.h
|
||||
include/memkind/internal/memkind_gbtlb.h
|
||||
include/memkind/internal/memkind_hbw.h
|
||||
include/memkind/internal/memkind_regular.h
|
||||
include/memkind/internal/memkind_hugetlb.h
|
||||
include/memkind/internal/memkind_interleave.h
|
||||
include/memkind/internal/memkind_pmem.h
|
||||
include/memkind/internal/memkind_private.h
|
||||
include/memkind/internal/memkind_log.h
|
||||
include/memkind/internal/tbb_wrapper.h
|
||||
test/Makefile.mk
|
||||
test/Allocator.hpp
|
||||
test/TestPolicy.hpp
|
||||
test/bat_tests.cpp
|
||||
test/check.cpp
|
||||
test/check.h
|
||||
test/common.h
|
||||
test/static_kinds_list.h
|
||||
test/environ_err_hbw_malloc_test.cpp
|
||||
test/gb_page_tests_bind_policy.cpp
|
||||
test/main.cpp
|
||||
test/multithreaded_tests.cpp
|
||||
test/negative_tests.cpp
|
||||
test/test.sh
|
||||
test/trial_generator.cpp
|
||||
test/trial_generator.h
|
||||
test/error_message_tests.cpp
|
||||
test/get_arena_test.cpp
|
||||
test/locality_test.cpp
|
||||
test/memkind_pmem_tests.cpp
|
||||
test/memkind_pmem_long_time_tests.cpp
|
||||
test/memory_footprint_test.cpp
|
||||
test/memory_manager.h
|
||||
test/random_sizes_allocator.h
|
||||
test/proc_stat.h
|
||||
test/static_kinds_tests.cpp
|
||||
test/huge_page_test.cpp
|
||||
test/hbw_verify_function_test.cpp
|
||||
test/performance/framework.hpp
|
||||
test/performance/framework.cpp
|
||||
test/performance/operations.hpp
|
||||
test/performance/perf_tests.hpp
|
||||
test/performance/perf_tests.cpp
|
||||
test/hbw_allocator_tests.cpp
|
||||
test/decorator_test.cpp
|
||||
test/decorator_test.h
|
||||
test/alloc_performance_tests.cpp
|
||||
test/allocator_perf_tool/AllocationSizes.hpp
|
||||
test/allocator_perf_tool/Allocation_info.hpp
|
||||
test/allocator_perf_tool/Allocation_info.cpp
|
||||
test/allocator_perf_tool/Allocator.hpp
|
||||
test/allocator_perf_tool/AllocatorFactory.hpp
|
||||
test/allocator_perf_tool/CSVLogger.hpp
|
||||
test/allocator_perf_tool/CommandLine.hpp
|
||||
test/allocator_perf_tool/Configuration.hpp
|
||||
test/allocator_perf_tool/ConsoleLog.hpp
|
||||
test/allocator_perf_tool/FunctionCalls.hpp
|
||||
test/allocator_perf_tool/FunctionCallsPerformanceTask.cpp
|
||||
test/allocator_perf_tool/FunctionCallsPerformanceTask.h
|
||||
test/allocator_perf_tool/GTestAdapter.hpp
|
||||
test/allocator_perf_tool/Iterator.hpp
|
||||
test/allocator_perf_tool/JemallocAllocatorWithTimer.hpp
|
||||
test/allocator_perf_tool/Makefile
|
||||
test/allocator_perf_tool/MemkindAllocatorWithTimer.hpp
|
||||
test/allocator_perf_tool/Numastat.hpp
|
||||
test/allocator_perf_tool/Runnable.hpp
|
||||
test/allocator_perf_tool/PmemMockup.cpp
|
||||
test/allocator_perf_tool/PmemMockup.hpp
|
||||
test/allocator_perf_tool/ScenarioWorkload.cpp
|
||||
test/allocator_perf_tool/ScenarioWorkload.h
|
||||
test/allocator_perf_tool/StandardAllocatorWithTimer.hpp
|
||||
test/allocator_perf_tool/Stats.hpp
|
||||
test/allocator_perf_tool/StressIncreaseToMax.cpp
|
||||
test/allocator_perf_tool/StressIncreaseToMax.h
|
||||
test/allocator_perf_tool/Task.hpp
|
||||
test/allocator_perf_tool/TaskFactory.hpp
|
||||
test/allocator_perf_tool/Tests.hpp
|
||||
test/allocator_perf_tool/Thread.hpp
|
||||
test/allocator_perf_tool/TimerSysTime.hpp
|
||||
test/allocator_perf_tool/VectorIterator.hpp
|
||||
test/allocator_perf_tool/Workload.hpp
|
||||
test/allocator_perf_tool/WrappersMacros.hpp
|
||||
test/allocator_perf_tool/HugePageUnmap.hpp
|
||||
test/allocator_perf_tool/HugePageOrganizer.hpp
|
||||
test/allocator_perf_tool/HBWmallocAllocatorWithTimer.hpp
|
||||
test/allocator_perf_tool/main.cpp
|
||||
test/allocate_to_max_stress_test.cpp
|
||||
test/memkind_versioning_tests.cpp
|
||||
test/heap_manager_init_perf_test.cpp
|
||||
test/autohbw_test_helper.c
|
||||
test/trace_mechanism_test_helper.c
|
||||
test/hbw_detection_test.py
|
||||
test/autohbw_test.py
|
||||
test/trace_mechanism_test.py
|
||||
test/python_framework/cmd_helper.py
|
||||
test/python_framework/huge_page_organizer.py
|
||||
test/python_framework/__init__.py
|
||||
test/draw_plots.py
|
||||
test/run_alloc_benchmark.sh
|
||||
test/alloc_benchmark.c
|
||||
test/load_tbbmalloc_symbols.c
|
||||
test/tbbmalloc.h
|
||||
test/freeing_memory_segfault_test.cpp
|
||||
test/dlopen_test.cpp
|
||||
test/pmem_allocator_tests.cpp
|
||||
man/memkind_pmem.3
|
||||
src/memkind_pmem.c
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
examples/pmem_kinds.c
|
||||
examples/pmem_malloc.c
|
||||
examples/pmem_malloc_unlimited.c
|
||||
examples/pmem_usable_size.c
|
||||
examples/pmem_alignment.c
|
||||
examples/pmem_and_default_kind
|
||||
examples/pmem_multithreads.c
|
||||
examples/pmem_multithreads_onekind.c
|
||||
examples/pmem_free_with_unknown_kind.c
|
||||
examples/pmem_cpp_allocator.cpp
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (C) 2014 Intel Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Intel Corporation
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* * Neither the name of Intel Corporation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY LOG OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (C) 2000 - 2014, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions, and the following disclaimer,
|
||||
* without modification.
|
||||
* 2. Redistributions in binary form must reproduce at minimum a disclaimer
|
||||
* substantially similar to the "NO WARRANTY" disclaimer below
|
||||
* ("Disclaimer") and any redistribution must be conditioned upon
|
||||
* including a substantially similar Disclaimer requirement for further
|
||||
* binary redistribution.
|
||||
* 3. Neither the names of the above-listed copyright holders nor the names
|
||||
* of any contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of the
|
||||
* GNU General Public License ("GPL") version 2 as published by the Free
|
||||
* Software Foundation.
|
||||
*
|
||||
* NO WARRANTY
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
memkind (0.0.0) UNRELEASED; urgency=low
|
||||
|
||||
* See ChangeLog for more details
|
||||
|
||||
-- Krzysztof Kulakowski <krzysztof.kulakowski@intel.com> Mon, 12 Dec 2016 15:53:31 +0000
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
9
|
||||
Vendored
+25
@@ -0,0 +1,25 @@
|
||||
Source: memkind
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Maintainer: Krzysztof Kulakowski <krzysztof.kulakowski@intel.com>
|
||||
Build-Depends: debhelper (>= 8.0.0)
|
||||
Standards-Version: 3.9.4
|
||||
Homepage: https://github.com/memkind/memkind
|
||||
|
||||
Package: memkind
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description:
|
||||
The memkind library is an user extensible heap manager built on top of
|
||||
jemalloc which enables control of memory characteristics and a
|
||||
partitioning of the heap between kinds of memory. The kinds of memory
|
||||
are defined by operating system memory policies that have been applied
|
||||
to virtual address ranges. Memory characteristics supported by
|
||||
memkind without user extension include control of NUMA and page size
|
||||
features. The jemalloc non-standard interface has been extended to
|
||||
enable specialized arenas to make requests for virtual memory from the
|
||||
operating system through the memkind partition interface. Through the
|
||||
other memkind interfaces the user can control and extend memory
|
||||
partition features and allocate memory while selecting enabled
|
||||
features. This software is being made available for early evaluation.
|
||||
Feedback on design or implementation is greatly appreciated.
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
# ignore tests during build
|
||||
override_dh_auto_test:
|
||||
|
||||
override_dh_auto_configure:
|
||||
./build_jemalloc.sh
|
||||
./autogen.sh
|
||||
dh_auto_configure -- --prefix=/usr --libdir=/usr/lib \
|
||||
--includedir=/usr/include --sbindir=/usr/sbin --enable-cxx11 \
|
||||
--mandir=/usr/share/man --docdir=/usr/share/doc/memkind
|
||||
|
||||
override_dh_auto_build:
|
||||
dh_auto_build -- checkprogs
|
||||
|
||||
%:
|
||||
dh $@
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
#
|
||||
# Copyright (C) 2014 - 2018 Intel Corporation.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
# this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
noinst_PROGRAMS += examples/hello_memkind \
|
||||
examples/hello_memkind_debug \
|
||||
examples/hello_hbw \
|
||||
examples/filter_memkind \
|
||||
examples/pmem_kinds \
|
||||
examples/pmem_malloc \
|
||||
examples/pmem_malloc_unlimited \
|
||||
examples/pmem_usable_size \
|
||||
examples/pmem_alignment \
|
||||
examples/pmem_and_default_kind \
|
||||
examples/pmem_multithreads \
|
||||
examples/pmem_multithreads_onekind \
|
||||
examples/pmem_free_with_unknown_kind \
|
||||
examples/autohbw_candidates \
|
||||
# end
|
||||
if HAVE_CXX11
|
||||
noinst_PROGRAMS += examples/memkind_allocated
|
||||
noinst_PROGRAMS += examples/pmem_cpp_allocator
|
||||
endif
|
||||
|
||||
examples_hello_memkind_LDADD = libmemkind.la
|
||||
examples_hello_memkind_debug_LDADD = libmemkind.la
|
||||
examples_hello_hbw_LDADD = libmemkind.la
|
||||
examples_filter_memkind_LDADD = libmemkind.la
|
||||
examples_pmem_kinds_LDADD = libmemkind.la
|
||||
examples_pmem_malloc_LDADD = libmemkind.la
|
||||
examples_pmem_malloc_unlimited_LDADD = libmemkind.la
|
||||
examples_pmem_usable_size_LDADD = libmemkind.la
|
||||
examples_pmem_alignment_LDADD = libmemkind.la
|
||||
examples_pmem_and_default_kind_LDADD = libmemkind.la
|
||||
examples_pmem_multithreads_LDADD = libmemkind.la
|
||||
examples_pmem_multithreads_onekind_LDADD = libmemkind.la
|
||||
examples_pmem_free_with_unknown_kind_LDADD = libmemkind.la
|
||||
examples_autohbw_candidates_LDADD = libmemkind.la
|
||||
|
||||
if HAVE_CXX11
|
||||
examples_memkind_allocated_LDADD = libmemkind.la
|
||||
examples_pmem_cpp_allocator_LDADD = libmemkind.la
|
||||
endif
|
||||
|
||||
examples_hello_memkind_SOURCES = examples/hello_memkind_example.c
|
||||
examples_hello_memkind_debug_SOURCES = examples/hello_memkind_example.c examples/memkind_decorator_debug.c
|
||||
examples_hello_hbw_SOURCES = examples/hello_hbw_example.c
|
||||
examples_filter_memkind_SOURCES = examples/filter_example.c
|
||||
examples_pmem_kinds_SOURCES = examples/pmem_kinds.c
|
||||
examples_pmem_malloc_SOURCES = examples/pmem_malloc.c
|
||||
examples_pmem_malloc_unlimited_SOURCES = examples/pmem_malloc_unlimited.c
|
||||
examples_pmem_usable_size_SOURCES = examples/pmem_usable_size.c
|
||||
examples_pmem_alignment_SOURCES = examples/pmem_alignment.c
|
||||
examples_pmem_and_default_kind_SOURCES = examples/pmem_and_default_kind.c
|
||||
examples_pmem_multithreads_SOURCES = examples/pmem_multithreads.c
|
||||
examples_pmem_multithreads_onekind_SOURCES = examples/pmem_multithreads_onekind.c
|
||||
examples_pmem_free_with_unknown_kind_SOURCES = examples/pmem_free_with_unknown_kind.c
|
||||
examples_autohbw_candidates_SOURCES = examples/autohbw_candidates.c
|
||||
if HAVE_CXX11
|
||||
examples_memkind_allocated_SOURCES = examples/memkind_allocated_example.cpp examples/memkind_allocated.hpp
|
||||
examples_pmem_cpp_allocator_SOURCES = examples/pmem_cpp_allocator.cpp
|
||||
endif
|
||||
|
||||
clean-local:
|
||||
rm -f examples/*.gcno examples/*.gcda
|
||||
Vendored
+80
@@ -0,0 +1,80 @@
|
||||
# Memkind examples
|
||||
|
||||
The example directory contains example codes that use the memkind
|
||||
interface.
|
||||
|
||||
## PMEM
|
||||
|
||||
The pmem_*.c(pp) demonstrates how to create and use a file-backed memory kind.
|
||||
The default pmem path is "/tmp/".
|
||||
Custom directory is pass as first argument to all of PMEM example programs,
|
||||
e.g. to execute pmem_malloc example in /mnt/pmem location, call:
|
||||
|
||||
./pmem_malloc /mnt/pmem/
|
||||
|
||||
### pmem_kinds.c
|
||||
|
||||
This example shows how to create and destroy pmem kind with defined or unlimited size.
|
||||
|
||||
### pmem_malloc.c
|
||||
|
||||
This example shows how to allocate memory and possibility to exceed pmem kind size.
|
||||
|
||||
### pmem_malloc_unlimited.c
|
||||
|
||||
This example shows how to allocate memory with unlimited kind size.
|
||||
|
||||
### pmem_usable_size.c
|
||||
|
||||
This example shows difference between the expected and the actual allocation size.
|
||||
|
||||
### pmem_alignment.c
|
||||
|
||||
This example shows how to use memkind alignment and how it affects allocations.
|
||||
|
||||
### pmem_multithreads.c
|
||||
|
||||
This example shows how to use multithreading with independent pmem kinds.
|
||||
|
||||
### pmem_multithreads_onekind.c
|
||||
|
||||
This example shows how to use multithreading with one main pmem kind.
|
||||
|
||||
### pmem_and_default_kind.c
|
||||
|
||||
This example shows how to allocate in standard memory and file-backed memory (pmem kind).
|
||||
|
||||
### pmem_free_with_unknown_kind.c
|
||||
|
||||
This example shows how to allocate in standard memory and file-backed memory (pmem kind)
|
||||
and free memory without a need to remember which kind it belongs to.
|
||||
|
||||
### pmem_cpp_allocator.cpp
|
||||
|
||||
This example shows usage of C++ allocator mechanism designed for file-backed memory
|
||||
kind with different data structures like: vector, list and map.
|
||||
|
||||
## Other memkind examples
|
||||
|
||||
The simplest example is the hello_example.c which is a hello world
|
||||
variant. The filter_example.c shows how you would use high bandwidth
|
||||
memory to store a reduction of a larger data set stored in DDR. There is
|
||||
also an example of how to create user defined kinds. This example
|
||||
creates kinds which isolate allocations to a single NUMA node each
|
||||
backed by a single arena.
|
||||
|
||||
The memkind_allocated example is simple usage of memkind in C++11 which
|
||||
shows how memkind can be used to allocate objects, and consists of two files:
|
||||
memkind_allocated.hpp - which is definition of template class that should be
|
||||
inherited and parametrized by derived type (curiously recurring template
|
||||
pattern), to let deriving class allocate their objects using specified kind.
|
||||
memkind_allocated_example.cpp - which is usage example of this approach.
|
||||
Logic of memkind_allocated is based on overriding operator new() in template,
|
||||
and allocating memory on kind specified in new() parameter, or by overridable
|
||||
static method getClassKind(). This implementation also supports alignment
|
||||
specifier's (alignas() - new feature in C++11).
|
||||
The downside of this approach is that it will work properly only if
|
||||
memkind_allocated template is inherited once in inheritance chain (which
|
||||
probably makes that not very useful for most scenarios). Other thing is that it
|
||||
overriding class new() operator which can cause various problems if used
|
||||
unwisely.
|
||||
+122
@@ -0,0 +1,122 @@
|
||||
/*
|
||||
* Copyright (C) 2015 - 2018 Intel Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// File : autohbw_candidates.c
|
||||
// Purpose: Shows which functions are interposed by AutoHBW library.
|
||||
// : These functions can be used for testing purposes
|
||||
// Author : Ruchira Sasanka (ruchira.sasanka AT intel.com)
|
||||
// Date : Sept 10, 2015
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#include <memkind.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// This function contains an example case for each heap allocation function
|
||||
// intercepted by the AutoHBW library
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//volatile is needed to prevent optimizing out below hooks
|
||||
volatile int memkind_called_g;
|
||||
|
||||
void memkind_malloc_post(struct memkind *kind, size_t size, void **result)
|
||||
{
|
||||
memkind_called_g = 1;
|
||||
}
|
||||
void memkind_calloc_post(struct memkind *kind, size_t nmemb, size_t size,
|
||||
void **result)
|
||||
{
|
||||
memkind_called_g = 1;
|
||||
}
|
||||
void memkind_posix_memalign_post(struct memkind *kind, void **memptr,
|
||||
size_t alignment, size_t size, int *err)
|
||||
{
|
||||
memkind_called_g = 1;
|
||||
}
|
||||
void memkind_realloc_post(struct memkind *kind, void *ptr, size_t size,
|
||||
void **result)
|
||||
{
|
||||
memkind_called_g = 1;
|
||||
}
|
||||
void memkind_free_pre(struct memkind **kind, void **ptr)
|
||||
{
|
||||
memkind_called_g = 1;
|
||||
}
|
||||
|
||||
void finish_testcase(int fail_condition, const char *fail_message, int *err)
|
||||
{
|
||||
|
||||
if(memkind_called_g != 1 || fail_condition) {
|
||||
printf("%s\n", fail_message);
|
||||
*err= -1;
|
||||
}
|
||||
memkind_called_g = 0;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int err = 0;
|
||||
const size_t size = 1024 * 1024; // 1M of data
|
||||
|
||||
void *buf = NULL;
|
||||
memkind_called_g = 0;
|
||||
|
||||
// Test 1: Test malloc and free
|
||||
buf = malloc(size);
|
||||
finish_testcase(buf==NULL, "Malloc failed!", &err);
|
||||
|
||||
free(buf);
|
||||
finish_testcase(0, "Free after malloc failed!", &err);
|
||||
|
||||
// Test 2: Test calloc and free
|
||||
buf = calloc(size, 1);
|
||||
finish_testcase(buf==NULL, "Calloc failed!", &err);
|
||||
|
||||
free(buf);
|
||||
finish_testcase(0, "Free after calloc failed!", &err);
|
||||
|
||||
// Test 3: Test realloc and free
|
||||
buf = malloc(size);
|
||||
finish_testcase(buf==NULL, "Malloc before realloc failed!", &err);
|
||||
|
||||
buf = realloc(buf, size * 2);
|
||||
finish_testcase(buf==NULL, "Realloc failed!", &err);
|
||||
|
||||
free(buf);
|
||||
finish_testcase(0, "Free after realloc failed!", &err);
|
||||
|
||||
// Test 4: Test posix_memalign and free
|
||||
int ret = posix_memalign(&buf, 64, size);
|
||||
finish_testcase(ret, "Posix_memalign failed!", &err);
|
||||
|
||||
free(buf);
|
||||
finish_testcase(0, "Free after posix_memalign failed!", &err);
|
||||
|
||||
return err;
|
||||
}
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Copyright (C) 2014 - 2016 Intel Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <memkind.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
const size_t stream_len = 1024 * 1024;
|
||||
const size_t filter_len = 1024;
|
||||
const size_t num_filter = stream_len / filter_len;
|
||||
size_t i, j;
|
||||
double *stream = NULL;
|
||||
double *filter = NULL;
|
||||
double *result = NULL;
|
||||
|
||||
srandom(0);
|
||||
|
||||
stream = (double *)memkind_malloc(MEMKIND_DEFAULT, stream_len * sizeof(double));
|
||||
if (stream == NULL) {
|
||||
perror("<memkind>");
|
||||
fprintf(stderr, "Unable to allocate stream\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
filter = (double *)memkind_malloc(MEMKIND_HBW, filter_len * sizeof(double));
|
||||
if (filter == NULL) {
|
||||
perror("<memkind>");
|
||||
fprintf(stderr, "Unable to allocate filter\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
result = (double *)memkind_calloc(MEMKIND_HBW, filter_len, sizeof(double));
|
||||
if (result == NULL) {
|
||||
perror("<memkind>");
|
||||
fprintf(stderr, "Unable to allocate result\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
for (i = 0; i < stream_len; i++) {
|
||||
stream[i] = (double)(random())/(double)(RAND_MAX);
|
||||
}
|
||||
|
||||
for (i = 0; i < filter_len; i++) {
|
||||
filter[i] = (double)(i)/(double)(filter_len);
|
||||
}
|
||||
|
||||
for (i = 0; i < num_filter; i++) {
|
||||
for (j = 0; j < filter_len; j++) {
|
||||
result[j] += stream[i * filter_len + j] * filter[j];
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < filter_len; i++) {
|
||||
fprintf(stdout, "%.6e\n", result[i]);
|
||||
}
|
||||
|
||||
memkind_free(MEMKIND_HBW, result);
|
||||
memkind_free(MEMKIND_HBW, filter);
|
||||
memkind_free(MEMKIND_DEFAULT, stream);
|
||||
|
||||
return 0;
|
||||
}
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Copyright (C) 2014 - 2018 Intel Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <hbwmalloc.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
const size_t size = 512;
|
||||
char *default_str = NULL;
|
||||
char *hbw_str = NULL;
|
||||
char *hbw_hugetlb_str = NULL;
|
||||
int err = 0;
|
||||
|
||||
default_str = (char *)malloc(size);
|
||||
if (default_str == NULL) {
|
||||
perror("malloc()");
|
||||
fprintf(stderr, "Unable to allocate default string\n");
|
||||
err = errno ? -errno : 1;
|
||||
goto exit;
|
||||
}
|
||||
hbw_str = (char *)hbw_malloc(size);
|
||||
if (hbw_str == NULL) {
|
||||
perror("hbw_malloc()");
|
||||
fprintf(stderr, "Unable to allocate hbw string\n");
|
||||
err = errno ? -errno : 1;
|
||||
goto exit;
|
||||
}
|
||||
err = hbw_posix_memalign_psize((void **)&hbw_hugetlb_str, 2097152, size,
|
||||
HBW_PAGESIZE_2MB);
|
||||
if (err) {
|
||||
perror("hbw_posix_memalign()");
|
||||
fprintf(stderr, "Unable to allocate hbw hugetlb string\n");
|
||||
err = errno ? -errno : 1;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
sprintf(default_str, "Hello world from standard memory\n");
|
||||
sprintf(hbw_str, "Hello world from high bandwidth memory\n");
|
||||
sprintf(hbw_hugetlb_str, "Hello world from high bandwidth 2 MB paged memory\n");
|
||||
|
||||
fprintf(stdout, "%s", default_str);
|
||||
fprintf(stdout, "%s", hbw_str);
|
||||
fprintf(stdout, "%s", hbw_hugetlb_str);
|
||||
|
||||
exit:
|
||||
if (hbw_hugetlb_str) {
|
||||
hbw_free(hbw_hugetlb_str);
|
||||
}
|
||||
if (hbw_str) {
|
||||
hbw_free(hbw_str);
|
||||
}
|
||||
if (default_str) {
|
||||
free(default_str);
|
||||
}
|
||||
return err;
|
||||
}
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
* Copyright (C) 2014 - 2018 Intel Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <memkind.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
const size_t size = 512;
|
||||
char *default_str = NULL;
|
||||
char *hugetlb_str = NULL;
|
||||
char *hbw_str = NULL;
|
||||
char *hbw_hugetlb_str = NULL;
|
||||
char *hbw_preferred_str = NULL;
|
||||
char *hbw_preferred_hugetlb_str = NULL;
|
||||
char *hbw_interleave_str = NULL;
|
||||
|
||||
default_str = (char *)memkind_malloc(MEMKIND_DEFAULT, size);
|
||||
if (default_str == NULL) {
|
||||
perror("memkind_malloc()");
|
||||
fprintf(stderr, "Unable to allocate default string\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
hugetlb_str = (char *)memkind_malloc(MEMKIND_HUGETLB, size);
|
||||
if (hugetlb_str == NULL) {
|
||||
perror("memkind_malloc()");
|
||||
fprintf(stderr, "Unable to allocate hugetlb string\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
hbw_str = (char *)memkind_malloc(MEMKIND_HBW, size);
|
||||
if (hbw_str == NULL) {
|
||||
perror("memkind_malloc()");
|
||||
fprintf(stderr, "Unable to allocate hbw string\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
hbw_hugetlb_str = (char *)memkind_malloc(MEMKIND_HBW_HUGETLB, size);
|
||||
if (hbw_hugetlb_str == NULL) {
|
||||
perror("memkind_malloc()");
|
||||
fprintf(stderr, "Unable to allocate hbw_hugetlb string\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
hbw_preferred_str = (char *)memkind_malloc(MEMKIND_HBW_PREFERRED, size);
|
||||
if (hbw_preferred_str == NULL) {
|
||||
perror("memkind_malloc()");
|
||||
fprintf(stderr, "Unable to allocate hbw_preferred string\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
hbw_preferred_hugetlb_str = (char *)memkind_malloc(
|
||||
MEMKIND_HBW_PREFERRED_HUGETLB, size);
|
||||
if (hbw_preferred_hugetlb_str == NULL) {
|
||||
perror("memkind_malloc()");
|
||||
fprintf(stderr, "Unable to allocate hbw_preferred_hugetlb string\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
hbw_interleave_str = (char *)memkind_malloc(MEMKIND_HBW_INTERLEAVE, size);
|
||||
if (hbw_interleave_str == NULL) {
|
||||
perror("memkind_malloc()");
|
||||
fprintf(stderr,"Unable to allocate hbw_interleave string\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
sprintf(default_str, "Hello world from standard memory\n");
|
||||
sprintf(hugetlb_str, "Hello world from standard memory with 2 MB pages\n");
|
||||
sprintf(hbw_str, "Hello world from high bandwidth memory\n");
|
||||
sprintf(hbw_hugetlb_str, "Hello world from high bandwidth 2 MB paged memory\n");
|
||||
sprintf(hbw_preferred_str,
|
||||
"Hello world from high bandwidth memory if sufficient resources exist\n");
|
||||
sprintf(hbw_preferred_hugetlb_str,
|
||||
"Hello world from high bandwidth 2 MB paged memory if sufficient resources exist\n");
|
||||
|
||||
sprintf(hbw_interleave_str,
|
||||
"Hello world from high bandwidth interleaved memory\n");
|
||||
|
||||
fprintf(stdout, "%s", default_str);
|
||||
fprintf(stdout, "%s", hugetlb_str);
|
||||
fprintf(stdout, "%s", hbw_str);
|
||||
fprintf(stdout, "%s", hbw_hugetlb_str);
|
||||
fprintf(stdout, "%s", hbw_preferred_str);
|
||||
fprintf(stdout, "%s", hbw_preferred_hugetlb_str);
|
||||
fprintf(stdout, "%s", hbw_interleave_str);
|
||||
|
||||
memkind_free(MEMKIND_HBW_INTERLEAVE, hbw_interleave_str);
|
||||
memkind_free(MEMKIND_HBW_PREFERRED_HUGETLB, hbw_preferred_hugetlb_str);
|
||||
memkind_free(MEMKIND_HBW_PREFERRED, hbw_preferred_str);
|
||||
memkind_free(MEMKIND_HBW_HUGETLB, hbw_hugetlb_str);
|
||||
memkind_free(MEMKIND_HBW, hbw_str);
|
||||
memkind_free(MEMKIND_HUGETLB, hugetlb_str);
|
||||
memkind_free(MEMKIND_DEFAULT, default_str);
|
||||
|
||||
return 0;
|
||||
}
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
* Copyright (C) 2014 - 2018 Intel Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <memkind.h>
|
||||
|
||||
#include <cstdlib>
|
||||
#include <new>
|
||||
|
||||
template <class deriving_class>
|
||||
class memkind_allocated
|
||||
{
|
||||
public:
|
||||
static memkind_t getClassKind()
|
||||
{
|
||||
return MEMKIND_DEFAULT;
|
||||
}
|
||||
|
||||
void *operator new(std::size_t size)
|
||||
{
|
||||
return deriving_class::operator new(size, deriving_class::getClassKind());
|
||||
}
|
||||
|
||||
void *operator new[](std::size_t size)
|
||||
{
|
||||
return deriving_class::operator new(size, deriving_class::getClassKind());
|
||||
}
|
||||
|
||||
void *operator new(std::size_t size, memkind_t memory_kind)
|
||||
{
|
||||
void *result_ptr = NULL;
|
||||
int allocation_result = 0;
|
||||
|
||||
//This check if deriving_class has specified alignment, which is suitable
|
||||
//to be used with posix_memalign()
|
||||
if(alignof(deriving_class) < sizeof(void *)) {
|
||||
result_ptr = memkind_malloc(memory_kind, size);
|
||||
allocation_result = result_ptr ? 1 : 0;
|
||||
} else {
|
||||
allocation_result = memkind_posix_memalign(memory_kind, &result_ptr,
|
||||
alignof(deriving_class), size);
|
||||
}
|
||||
|
||||
if(allocation_result) {
|
||||
throw std::bad_alloc();
|
||||
}
|
||||
|
||||
return result_ptr;
|
||||
}
|
||||
|
||||
void *operator new[](std::size_t size, memkind_t memory_kind)
|
||||
{
|
||||
return deriving_class::operator new(size, memory_kind);
|
||||
}
|
||||
|
||||
void operator delete(void *ptr, memkind_t memory_kind)
|
||||
{
|
||||
memkind_free(memory_kind, ptr);
|
||||
}
|
||||
|
||||
void operator delete(void *ptr)
|
||||
{
|
||||
memkind_free(0, ptr);
|
||||
}
|
||||
|
||||
void operator delete[](void *ptr)
|
||||
{
|
||||
deriving_class::operator delete(ptr);
|
||||
}
|
||||
|
||||
void operator delete[](void *ptr, memkind_t memory_kind)
|
||||
{
|
||||
deriving_class::operator delete(ptr, memory_kind);
|
||||
}
|
||||
|
||||
protected:
|
||||
memkind_allocated()
|
||||
{
|
||||
}
|
||||
|
||||
~memkind_allocated()
|
||||
{
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
* Copyright (C) 2014 - 2018 Intel Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <memkind.h>
|
||||
#include "memkind_allocated.hpp"
|
||||
|
||||
// This code is example usage of C++11 features with custom allocator,
|
||||
// support for C++11 is required.
|
||||
#include <iostream>
|
||||
|
||||
#if __cplusplus > 199711L
|
||||
|
||||
#include <cstdlib>
|
||||
#include <new>
|
||||
#include <string>
|
||||
|
||||
//example class definition, which derive from memkind_allocated template to
|
||||
//have objects allocated with memkind, and have alignment specified by alignas()
|
||||
class alignas(128) memkind_allocated_example : public
|
||||
memkind_allocated<memkind_allocated_example>
|
||||
{
|
||||
std::string message;
|
||||
|
||||
public:
|
||||
//Override method for returning class default kind to make objects be by default allocated on High-Bandwith Memory
|
||||
static memkind_t getClassKind()
|
||||
{
|
||||
return MEMKIND_HBW;
|
||||
}
|
||||
|
||||
memkind_allocated_example(std::string my_message)
|
||||
{
|
||||
this->message = my_message;
|
||||
}
|
||||
|
||||
memkind_allocated_example()
|
||||
{
|
||||
}
|
||||
|
||||
void print_message()
|
||||
{
|
||||
std::cout << message << std::endl;
|
||||
std::cout << "Memory adress of this object is: " << (void *)this << std::endl
|
||||
<< std::endl;
|
||||
}
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
memkind_t specified_kind = MEMKIND_HBW_HUGETLB;
|
||||
|
||||
memkind_allocated_example *default_kind_example = new memkind_allocated_example(
|
||||
std::string("This object has been allocated using class default kind, which is: MEMKIND_DEFAULT") );
|
||||
default_kind_example->print_message();
|
||||
delete default_kind_example;
|
||||
|
||||
memkind_allocated_example *specified_kind_example = new(
|
||||
specified_kind) memkind_allocated_example(
|
||||
std::string("This object has been allocated using specified kind, which is: MEMKIND_HBW_HUGETLB") );
|
||||
specified_kind_example->print_message();
|
||||
delete specified_kind_example;
|
||||
|
||||
//examples for using same aproach for allocating arrays of objects, note that objects created that way can be initialized only with default (unparameterized) constructor
|
||||
memkind_allocated_example *default_kind_array_example = new
|
||||
memkind_allocated_example[5]();
|
||||
delete[] default_kind_array_example;
|
||||
|
||||
memkind_allocated_example *specified_kind_array_example = new(
|
||||
specified_kind) memkind_allocated_example[5]();
|
||||
delete[] specified_kind_array_example;
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else //If C++11 is not avaiable - do nothing.
|
||||
int main()
|
||||
{
|
||||
std::cout << "WARNING: because your compiler does not support C++11 standard,"
|
||||
<< std::endl;
|
||||
std::cout << "this example is only as a dummy placeholder." << std::endl;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright (C) 2014 - 2018 Intel Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <memkind.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/* This is an example that enables debug printing on every alloction call */
|
||||
|
||||
static void memkind_debug(const char *func, memkind_t kind, size_t size,
|
||||
void *ptr)
|
||||
{
|
||||
fprintf(stderr, "[ DEBUG ] func=%s kind=%p size=%zu ptr=0x%lx\n", func, kind,
|
||||
size, (size_t)ptr);
|
||||
}
|
||||
|
||||
void memkind_malloc_post(memkind_t kind, size_t size, void **result)
|
||||
{
|
||||
memkind_debug("memkind_malloc", kind, size, *result);
|
||||
}
|
||||
|
||||
void memkind_calloc_post(memkind_t kind, size_t nmemb, size_t size,
|
||||
void **result)
|
||||
{
|
||||
memkind_debug("memkind_calloc", kind, nmemb * size, *result);
|
||||
}
|
||||
|
||||
void memkind_posix_memalign_post(memkind_t kind, void **memptr,
|
||||
size_t alignment, size_t size, int *err)
|
||||
{
|
||||
memkind_debug("memkind_posix_memalign", kind, size, *memptr);
|
||||
}
|
||||
|
||||
void memkind_realloc_post(memkind_t kind, void *ptr, size_t size, void **result)
|
||||
{
|
||||
memkind_debug("memkind_realloc", kind, size, *result);
|
||||
}
|
||||
|
||||
void memkind_free_pre(memkind_t kind, void **ptr)
|
||||
{
|
||||
memkind_debug("memkind_free", kind, 0, *ptr);
|
||||
}
|
||||
+136
@@ -0,0 +1,136 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Intel Corporation
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* * Neither the name of Intel Corporation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY LOG OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <memkind.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#define PMEM_MAX_SIZE (1024 * 1024 * 32)
|
||||
|
||||
static char *PMEM_DIR = "/tmp/";
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
struct memkind *pmem_kind = NULL;
|
||||
int err = 0;
|
||||
struct stat st;
|
||||
|
||||
if (argc > 2) {
|
||||
fprintf(stderr, "Usage: %s [pmem_kind_dir_path]", argv[0]);
|
||||
return 1;
|
||||
} else if (argc == 2) {
|
||||
if (stat(argv[1], &st) != 0 || !S_ISDIR(st.st_mode)) {
|
||||
fprintf(stderr, "%s : Invalid path to pmem kind directory", argv[1]);
|
||||
return 1;
|
||||
} else {
|
||||
PMEM_DIR = argv[1];
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(stdout,
|
||||
"This example shows how to use memkind alignment and how it affects allocations.\nPMEM kind directory: %s\n",
|
||||
PMEM_DIR);
|
||||
|
||||
/* Create PMEM partition with PMEM_MAX_SIZE size */
|
||||
err = memkind_create_pmem(PMEM_DIR, PMEM_MAX_SIZE, &pmem_kind);
|
||||
if (err) {
|
||||
perror("memkind_create_pmem()");
|
||||
fprintf(stderr, "Unable to create pmem partition err=%d errno=%d\n", err,
|
||||
errno);
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
char *pmem_str10 = NULL;
|
||||
char *pmem_str11 = NULL;
|
||||
|
||||
/* Lets make two 32 bytes allocations */
|
||||
pmem_str10 = (char *)memkind_malloc(pmem_kind, 32);
|
||||
if (pmem_str10 == NULL) {
|
||||
perror("memkind_malloc()");
|
||||
fprintf(stderr, "Unable to allocate pmem string (pmem_str10)\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
pmem_str11 = (char *)memkind_malloc(pmem_kind, 32);
|
||||
if (pmem_str11 == NULL) {
|
||||
perror("memkind_malloc()");
|
||||
fprintf(stderr, "Unable to allocate pmem string (pmem_str11)\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
/* They will be very close to each other in memory */
|
||||
if (pmem_str11 - pmem_str10 != 32) {
|
||||
fprintf(stderr, "Something went wrong\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
memkind_free(pmem_kind, pmem_str10);
|
||||
memkind_free(pmem_kind, pmem_str11);
|
||||
|
||||
/* Lets make two 32 bytes allocations with alignment 64 this time */
|
||||
err = memkind_posix_memalign(pmem_kind, (void **)&pmem_str10, 64, 32);
|
||||
if (err) {
|
||||
perror("memkind_posix_memalign()");
|
||||
fprintf(stderr, "Unable to allocate pmem string (pmem_str10) with alignment\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
err = memkind_posix_memalign(pmem_kind, (void **)&pmem_str11, 64, 32);
|
||||
if (err) {
|
||||
perror("memkind_posix_memalign()");
|
||||
fprintf(stderr, "Unable to allocate pmem string (pmem_str11) with alignment\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
/* This time addresses are not close to each other, they are aligned to 64 */
|
||||
if (pmem_str11 - pmem_str10 != 64) {
|
||||
fprintf(stderr, "Something went wrong with alignment allocation\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
memkind_free(pmem_kind, pmem_str10);
|
||||
memkind_free(pmem_kind, pmem_str11);
|
||||
|
||||
err = memkind_destroy_kind(pmem_kind);
|
||||
if (err) {
|
||||
perror("memkind_destroy_kind()");
|
||||
fprintf(stderr, "Unable to destroy pmem partition\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
fprintf(stdout,
|
||||
"The memory has been successfully allocated using memkind alignment.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
+149
@@ -0,0 +1,149 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Intel Corporation
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* * Neither the name of Intel Corporation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY LOG OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <memkind.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#define MB (1024 * 1024)
|
||||
#define HEAP_LIMIT_SIMULATE (1024 * MB)
|
||||
|
||||
static char *PMEM_DIR = "/tmp/";
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
const size_t size = 512;
|
||||
struct memkind *pmem_kind = NULL;
|
||||
int err = 0;
|
||||
errno = 0;
|
||||
struct stat st;
|
||||
|
||||
if (argc > 2) {
|
||||
fprintf(stderr, "Usage: %s [pmem_kind_dir_path]", argv[0]);
|
||||
return 1;
|
||||
} else if (argc == 2) {
|
||||
if (stat(argv[1], &st) != 0 || !S_ISDIR(st.st_mode)) {
|
||||
fprintf(stderr, "%s : Invalid path to pmem kind directory", argv[1]);
|
||||
return 1;
|
||||
} else {
|
||||
PMEM_DIR = argv[1];
|
||||
}
|
||||
}
|
||||
|
||||
//operation below limit the current size of heap
|
||||
//to show different place of allocation
|
||||
const struct rlimit heap_limit = { HEAP_LIMIT_SIMULATE, HEAP_LIMIT_SIMULATE };
|
||||
err = setrlimit(RLIMIT_DATA, &heap_limit);
|
||||
if (err) {
|
||||
perror("setrlimit()");
|
||||
fprintf(stderr, "Unable to set heap limit\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
char *ptr_default = NULL;
|
||||
char *ptr_default_not_possible = NULL;
|
||||
char *ptr_pmem = NULL;
|
||||
|
||||
fprintf(stdout,
|
||||
"This example shows how to allocate memory using standard memory (MEMKIND_DEFAULT) "
|
||||
"and file-backed kind of memory (PMEM).\nPMEM kind directory: %s\n",
|
||||
PMEM_DIR);
|
||||
|
||||
err = memkind_create_pmem(PMEM_DIR, 0, &pmem_kind);
|
||||
if (err) {
|
||||
perror("memkind_create_pmem()");
|
||||
fprintf(stderr, "Unable to create pmem partition err=%d errno=%d\n", err,
|
||||
errno);
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
ptr_default = (char *)memkind_malloc(MEMKIND_DEFAULT, size);
|
||||
if (!ptr_default) {
|
||||
perror("memkind_malloc()");
|
||||
fprintf(stderr, "Unable allocate 512 bytes in standard memory");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
errno = 0;
|
||||
ptr_default_not_possible = (char *)memkind_malloc(MEMKIND_DEFAULT,
|
||||
HEAP_LIMIT_SIMULATE);
|
||||
if (ptr_default_not_possible) {
|
||||
perror("memkind_malloc()");
|
||||
fprintf(stderr,
|
||||
"Failure, this allocation should not be possible "
|
||||
"(expected result was NULL), because of setlimit function\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
if (errno != ENOMEM) {
|
||||
perror("memkind_malloc()");
|
||||
fprintf(stderr,
|
||||
"Failure, this allocation should set errno to ENOMEM value, because of setlimit function\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
errno = 0;
|
||||
ptr_pmem = (char *)memkind_malloc(pmem_kind, HEAP_LIMIT_SIMULATE);
|
||||
if (!ptr_pmem) {
|
||||
perror("memkind_malloc()");
|
||||
fprintf(stderr, "Unable allocate HEAP_LIMIT_SIMULATE in file-backed memory");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
if (errno != 0) {
|
||||
perror("memkind_malloc()");
|
||||
fprintf(stderr, "Failure, this allocation should not set errno value\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
sprintf(ptr_default, "Hello world from standard memory - ptr_default\n");
|
||||
sprintf(ptr_pmem, "Hello world from file-backed memory - ptr_pmem\n");
|
||||
|
||||
fprintf(stdout, "%s", ptr_default);
|
||||
fprintf(stdout, "%s", ptr_pmem);
|
||||
|
||||
memkind_free(MEMKIND_DEFAULT, ptr_default);
|
||||
memkind_free(pmem_kind, ptr_pmem);
|
||||
|
||||
err = memkind_destroy_kind(pmem_kind);
|
||||
if (err) {
|
||||
perror("memkind_destroy_kind()");
|
||||
fprintf(stderr, "Unable to destroy pmem partition\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
fprintf(stdout, "Memory was successfully allocated and released.\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
+166
@@ -0,0 +1,166 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Intel Corporation
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* * Neither the name of Intel Corporation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY LOG OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
||||
#include "pmem_allocator.h"
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <scoped_allocator>
|
||||
#include <cassert>
|
||||
|
||||
#define STL_VECTOR_TEST
|
||||
#define STL_LIST_TEST
|
||||
#if _GLIBCXX_USE_CXX11_ABI
|
||||
#define STL_VEC_STRING_TEST
|
||||
#define STL_MAP_INT_STRING_TEST
|
||||
#endif
|
||||
|
||||
void cpp_allocator_test(const char *pmem_directory)
|
||||
{
|
||||
std::cout << "TEST SCOPE: HELLO" << std::endl;
|
||||
|
||||
size_t pmem_max_size = 1024*1024*1024;
|
||||
|
||||
#ifdef STL_VECTOR_TEST
|
||||
{
|
||||
std::cout << "VECTOR OPEN" << std::endl;
|
||||
pmem::allocator<int> alc{ pmem_directory, pmem_max_size };
|
||||
std::vector<int, pmem::allocator<int>> vector{ alc };
|
||||
|
||||
for (int i = 0; i < 20; ++i) {
|
||||
vector.push_back(0xDEAD + i);
|
||||
assert(vector.back() == 0xDEAD + i);
|
||||
}
|
||||
|
||||
std::cout << "VECTOR CLOSE" << std::endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef STL_LIST_TEST
|
||||
{
|
||||
std::cout << "LIST OPEN" << std::endl;
|
||||
pmem::allocator<int> alc{ pmem_directory, pmem_max_size };
|
||||
std::list<int, pmem::allocator<int>> list{ alc };
|
||||
|
||||
const int nx2 = 4;
|
||||
for (int i = 0; i < nx2; ++i) {
|
||||
list.emplace_back(0xBEAC011 + i);
|
||||
assert(list.back() == 0xBEAC011 + i);
|
||||
}
|
||||
|
||||
for (int i = 0; i < nx2; ++i) {
|
||||
list.pop_back();
|
||||
}
|
||||
|
||||
std::cout << "LIST CLOSE" << std::endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef STL_VEC_STRING_TEST
|
||||
{
|
||||
std::cout << "STRINGED VECTOR OPEN" << std::endl;
|
||||
typedef pmem::allocator<char> str_alloc_t;
|
||||
typedef std::basic_string<char, std::char_traits<char>, str_alloc_t>
|
||||
pmem_string;
|
||||
typedef pmem::allocator<pmem_string> vec_alloc_t;
|
||||
|
||||
vec_alloc_t vec_alloc{ pmem_directory, pmem_max_size };
|
||||
str_alloc_t str_alloc{ pmem_directory, pmem_max_size };
|
||||
|
||||
std::vector<pmem_string, std::scoped_allocator_adaptor<vec_alloc_t> >
|
||||
vec{ std::scoped_allocator_adaptor<vec_alloc_t>(vec_alloc) };
|
||||
|
||||
pmem_string arg{ "Very very loooong striiiing", str_alloc };
|
||||
|
||||
vec.push_back(arg);
|
||||
assert(vec.back() == arg);
|
||||
|
||||
std::cout << "STRINGED VECTOR CLOSE" << std::endl;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef STL_MAP_INT_STRING_TEST
|
||||
{
|
||||
std::cout << "INT_STRING MAP OPEN" << std::endl;
|
||||
typedef std::basic_string<char, std::char_traits<char>, pmem::allocator<char>>
|
||||
pmem_string;
|
||||
typedef int key_t;
|
||||
typedef pmem_string value_t;
|
||||
typedef pmem::allocator<char> allocator_t;
|
||||
typedef std::map<key_t, value_t, std::less<key_t>, std::scoped_allocator_adaptor<allocator_t>>
|
||||
map_t;
|
||||
|
||||
allocator_t allocator( pmem_directory, pmem_max_size );
|
||||
|
||||
value_t source_str1("Lorem ipsum dolor ", allocator);
|
||||
value_t source_str2("sit amet consectetuer adipiscing elit", allocator );
|
||||
|
||||
map_t target_map{ std::scoped_allocator_adaptor<allocator_t>(allocator) };
|
||||
|
||||
target_map[key_t(165)] = source_str1;
|
||||
assert(target_map[key_t(165)] == source_str1);
|
||||
target_map[key_t(165)] = source_str2;
|
||||
assert(target_map[key_t(165)] == source_str2);
|
||||
|
||||
std::cout << "INT_STRING MAP CLOSE" << std::endl;
|
||||
}
|
||||
#endif
|
||||
std::cout << "TEST SCOPE: GOODBYE" << std::endl;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
const char *pmem_directory = "/tmp/";
|
||||
|
||||
if (argc > 2) {
|
||||
std::cerr << "Usage: pmem_cpp_allocator [directory path]\n"
|
||||
<< "\t[directory path] - directory where temporary file is created (default = \"/tmp/\")"
|
||||
<< std::endl;
|
||||
return 0;
|
||||
} else if (argc == 2) {
|
||||
struct stat st;
|
||||
if (stat(argv[1], &st) != 0 || !S_ISDIR(st.st_mode)) {
|
||||
fprintf(stderr,"%s : Invalid path to pmem kind directory", argv[1]);
|
||||
return 1;
|
||||
}
|
||||
pmem_directory = argv[1];
|
||||
}
|
||||
|
||||
cpp_allocator_test(pmem_directory);
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Intel Corporation
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* * Neither the name of Intel Corporation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY LOG OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <memkind.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
static char *PMEM_DIR = "/tmp/";
|
||||
static const size_t PMEM_PART_SIZE = MEMKIND_PMEM_MIN_SIZE + 4 * 1024;
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
const size_t size = 512;
|
||||
struct memkind *pmem_kind = NULL;
|
||||
struct stat st;
|
||||
const int arraySize = 100;
|
||||
char *ptr[100] = { NULL };
|
||||
int i = 0;
|
||||
int err = 0;
|
||||
|
||||
if (argc > 2) {
|
||||
fprintf(stderr, "Usage: %s [pmem_kind_dir_path]", argv[0]);
|
||||
return 1;
|
||||
} else if (argc == 2) {
|
||||
if (stat(argv[1], &st) != 0 || !S_ISDIR(st.st_mode)) {
|
||||
fprintf(stderr, "%s : Invalid path to pmem kind directory", argv[1]);
|
||||
return 1;
|
||||
} else {
|
||||
PMEM_DIR = argv[1];
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(stdout,
|
||||
"This example shows how to use memkind_free with unknown kind as a parameter.\n");
|
||||
|
||||
err = memkind_create_pmem(PMEM_DIR, PMEM_PART_SIZE, &pmem_kind);
|
||||
if (err) {
|
||||
perror("memkind_create_pmem()");
|
||||
fprintf(stderr, "Unable to create pmem partition err=%d errno=%d\n", err,
|
||||
errno);
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
for (i = 0; i < arraySize; ++i) {
|
||||
if (i < 50) {
|
||||
ptr[i] = memkind_malloc(MEMKIND_DEFAULT, size);
|
||||
if (ptr[i] == NULL) {
|
||||
perror("memkind_malloc()");
|
||||
fprintf(stderr, "Unable to allocate memkind default\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
} else {
|
||||
ptr[i] = memkind_malloc(pmem_kind, size);
|
||||
if (ptr[i] == NULL) {
|
||||
perror("memkind_malloc()");
|
||||
fprintf(stderr, "Unable to allocate pmem\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
fprintf(stdout,
|
||||
"Memory was successfully allocated in default kind and pmem kind.\n");
|
||||
|
||||
sprintf(ptr[10], "Hello world from standard memory - ptr[10].\n");
|
||||
sprintf(ptr[40], "Hello world from standard memory - ptr[40].\n");
|
||||
sprintf(ptr[80], "Hello world from persistent memory - ptr[80].\n");
|
||||
|
||||
fprintf(stdout, "%s", ptr[10]);
|
||||
fprintf(stdout, "%s", ptr[40]);
|
||||
fprintf(stdout, "%s", ptr[80]);
|
||||
|
||||
fprintf(stdout, "Free memory without specifying kind.\n");
|
||||
for (i = 0; i < arraySize; ++i) {
|
||||
memkind_free(NULL, ptr[i]);
|
||||
}
|
||||
|
||||
err = memkind_destroy_kind(pmem_kind);
|
||||
if (err) {
|
||||
perror("memkind_destroy_kind()");
|
||||
fprintf(stderr, "Unable to destroy pmem partition\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
fprintf(stdout, "Memory was successfully released.\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Intel Corporation
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* * Neither the name of Intel Corporation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY LOG OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <memkind.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#define PMEM_MAX_SIZE (1024 * 1024 * 32)
|
||||
|
||||
static char *PMEM_DIR = "/tmp/";
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
struct memkind *pmem_kinds[10] = {NULL};
|
||||
struct memkind *pmem_kind = NULL;
|
||||
struct memkind *pmem_kind_unlimited = NULL;
|
||||
|
||||
int err = 0, i = 0;
|
||||
struct stat st;
|
||||
|
||||
if (argc > 2) {
|
||||
fprintf(stderr, "Usage: %s [pmem_kind_dir_path]", argv[0]);
|
||||
return 1;
|
||||
} else if (argc == 2) {
|
||||
if (stat(argv[1], &st) != 0 || !S_ISDIR(st.st_mode)) {
|
||||
fprintf(stderr, "%s : Invalid path to pmem kind directory", argv[1]);
|
||||
return 1;
|
||||
} else {
|
||||
PMEM_DIR = argv[1];
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(stdout,
|
||||
"This example shows how to create and destroy pmem kind with defined or unlimited size."
|
||||
"\nPMEM kind directory: %s\n",
|
||||
PMEM_DIR);
|
||||
|
||||
/* Create PMEM partition with specific size */
|
||||
err = memkind_create_pmem(PMEM_DIR, PMEM_MAX_SIZE, &pmem_kind);
|
||||
if (err) {
|
||||
perror("memkind_create_pmem()");
|
||||
fprintf(stderr, "Unable to create pmem partition err=%d errno=%d\n", err,
|
||||
errno);
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
/* Create PMEM partition with unlimited size */
|
||||
err = memkind_create_pmem(PMEM_DIR, 0, &pmem_kind_unlimited);
|
||||
if (err) {
|
||||
perror("memkind_create_pmem()");
|
||||
fprintf(stderr, "Unable to create pmem partition err=%d errno=%d\n", err,
|
||||
errno);
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
/* and delete them */
|
||||
err = memkind_destroy_kind(pmem_kind);
|
||||
if (err) {
|
||||
perror("memkind_destroy_kind()");
|
||||
fprintf(stderr, "Unable to destroy pmem partition\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
err = memkind_destroy_kind(pmem_kind_unlimited);
|
||||
if (err) {
|
||||
perror("memkind_destroy_kind()");
|
||||
fprintf(stderr, "Unable to destroy pmem partition\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
/* Create many PMEM kinds */
|
||||
for (i = 0; i < 10; i++) {
|
||||
err = memkind_create_pmem(PMEM_DIR, PMEM_MAX_SIZE, &pmem_kinds[i]);
|
||||
if (err) {
|
||||
perror("memkind_create_pmem()");
|
||||
fprintf(stderr, "Unable to create pmem partition err=%d errno=%d\n", err,
|
||||
errno);
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* and delete them */
|
||||
for (i = 0; i < 10; i++) {
|
||||
err = memkind_destroy_kind(pmem_kinds[i]);
|
||||
if (err) {
|
||||
perror("memkind_pmem_destroy()");
|
||||
fprintf(stderr, "Unable to destroy pmem partition\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(stdout, "PMEM kinds have been successfully created and destroyed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
/*
|
||||
* Copyright (c) 2015 - 2018 Intel Corporation
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* * Neither the name of Intel Corporation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY LOG OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <memkind.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#define PMEM_MAX_SIZE (1024 * 1024 * 32)
|
||||
|
||||
static char *PMEM_DIR = "/tmp/";
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
struct memkind *pmem_kind = NULL;
|
||||
int err = 0;
|
||||
struct stat st;
|
||||
|
||||
if (argc > 2) {
|
||||
fprintf(stderr, "Usage: %s [pmem_kind_dir_path]", argv[0]);
|
||||
return 1;
|
||||
} else if (argc == 2) {
|
||||
if (stat(argv[1], &st) != 0 || !S_ISDIR(st.st_mode)) {
|
||||
fprintf(stderr, "%s : Invalid path to pmem kind directory", argv[1]);
|
||||
return 1;
|
||||
} else {
|
||||
PMEM_DIR = argv[1];
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(stdout,
|
||||
"This example shows how to allocate memory and possibility to exceed pmem kind size."
|
||||
"\nPMEM kind directory: %s\n",
|
||||
PMEM_DIR);
|
||||
|
||||
/* Create PMEM partition with specific size */
|
||||
err = memkind_create_pmem(PMEM_DIR, PMEM_MAX_SIZE, &pmem_kind);
|
||||
if (err) {
|
||||
perror("memkind_create_pmem()");
|
||||
fprintf(stderr, "Unable to create pmem partition err=%d errno=%d\n", err,
|
||||
errno);
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
char *pmem_str1 = NULL;
|
||||
char *pmem_str2 = NULL;
|
||||
char *pmem_str3 = NULL;
|
||||
char *pmem_str4 = NULL;
|
||||
|
||||
// allocate 512 Bytes of 32 MB available
|
||||
pmem_str1 = (char *)memkind_malloc(pmem_kind, 512);
|
||||
if (pmem_str1 == NULL) {
|
||||
perror("memkind_malloc()");
|
||||
fprintf(stderr, "Unable to allocate pmem string (pmem_str1)\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
// allocate 8 MB of 31.9 MB available
|
||||
pmem_str2 = (char *)memkind_malloc(pmem_kind, 8 * 1024 * 1024);
|
||||
if (pmem_str2 == NULL) {
|
||||
perror("memkind_malloc()");
|
||||
fprintf(stderr, "Unable to allocate pmem string (pmem_str11)\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
// allocate 16 MB of 23.9 MB available
|
||||
pmem_str3 = (char *)memkind_malloc(pmem_kind, 16 * 1024 * 1024);
|
||||
if (pmem_str3 == NULL) {
|
||||
perror("memkind_malloc()");
|
||||
fprintf(stderr, "Unable to allocate pmem string (pmem_str12)\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
// allocate 16 MB of 7.9 MB available -- Out Of Memory expected
|
||||
pmem_str4 = (char *)memkind_malloc(pmem_kind, 16 * 1024 * 1024);
|
||||
if (pmem_str4 != NULL) {
|
||||
perror("memkind_malloc()");
|
||||
fprintf(stderr,
|
||||
"Failure, this allocation should not be possible (expected result was NULL)\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
sprintf(pmem_str1, "Hello world from pmem - pmem_str1\n");
|
||||
sprintf(pmem_str2, "Hello world from pmem - pmem_str2\n");
|
||||
sprintf(pmem_str3, "Hello world from persistent memory - pmem_str3\n");
|
||||
|
||||
fprintf(stdout, "%s", pmem_str1);
|
||||
fprintf(stdout, "%s", pmem_str2);
|
||||
fprintf(stdout, "%s", pmem_str3);
|
||||
|
||||
memkind_free(pmem_kind, pmem_str1);
|
||||
memkind_free(pmem_kind, pmem_str2);
|
||||
memkind_free(pmem_kind, pmem_str3);
|
||||
|
||||
err = memkind_destroy_kind(pmem_kind);
|
||||
if (err) {
|
||||
perror("memkind_destroy_kind()");
|
||||
fprintf(stderr, "Unable to destroy pmem partition\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
fprintf(stdout, "Memory was successfully allocated and released.\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Intel Corporation
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* * Neither the name of Intel Corporation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY LOG OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <memkind.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
static char *PMEM_DIR = "/tmp/";
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
struct memkind *pmem_kind_unlimited = NULL;
|
||||
int err = 0;
|
||||
struct stat st;
|
||||
|
||||
if (argc > 2) {
|
||||
fprintf(stderr, "Usage: %s [pmem_kind_dir_path]", argv[0]);
|
||||
return 1;
|
||||
} else if (argc == 2) {
|
||||
if (stat(argv[1], &st) != 0 || !S_ISDIR(st.st_mode)) {
|
||||
fprintf(stderr, "%s : Invalid path to pmem kind directory ", argv[1]);
|
||||
return 1;
|
||||
} else {
|
||||
PMEM_DIR = argv[1];
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(stdout,
|
||||
"This example shows how to allocate memory with unlimited kind size."
|
||||
"nPMEM kind directory: %s\n",
|
||||
PMEM_DIR);
|
||||
|
||||
/* Create PMEM partition with unlimited size */
|
||||
err = memkind_create_pmem(PMEM_DIR, 0, &pmem_kind_unlimited);
|
||||
if (err) {
|
||||
perror("memkind_create_pmem()");
|
||||
fprintf(stderr, "Unable to create pmem partition err=%d errno=%d\n", err,
|
||||
errno);
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
char *pmem_str10 = NULL;
|
||||
char *pmem_str11 = NULL;
|
||||
|
||||
/* Huge allocation */
|
||||
pmem_str10 = (char *)memkind_malloc(pmem_kind_unlimited, 32 * 1024 * 1024);
|
||||
if (pmem_str10 == NULL) {
|
||||
perror("memkind_malloc()");
|
||||
fprintf(stderr, "Unable to allocate pmem string (pmem_str10)\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
/* Another huge allocation, kind size is only limited by OS resources */
|
||||
pmem_str11 = (char *)memkind_malloc(pmem_kind_unlimited, 32 * 1024 * 1024);
|
||||
if (pmem_str11 == NULL) {
|
||||
perror("memkind_malloc()");
|
||||
fprintf(stderr, "Unable to allocate pmem string (pmem_str11)\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
memkind_free(pmem_kind_unlimited, pmem_str10);
|
||||
memkind_free(pmem_kind_unlimited, pmem_str11);
|
||||
|
||||
err = memkind_destroy_kind(pmem_kind_unlimited);
|
||||
if (err) {
|
||||
perror("memkind_destroy_kind()");
|
||||
fprintf(stderr, "Unable to destroy pmem partition\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
fprintf(stdout, "Memory was successfully allocated and released.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
+138
@@ -0,0 +1,138 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Intel Corporation
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* * Neither the name of Intel Corporation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY LOG OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <memkind.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <pthread.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define PMEM_MAX_SIZE (1024 * 1024 * 32)
|
||||
#define NUM_THREADS 10
|
||||
|
||||
static char *PMEM_DIR = "/tmp/";
|
||||
|
||||
void *thread_ind(void *arg);
|
||||
|
||||
static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
static pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int err = 0;
|
||||
struct stat st;
|
||||
|
||||
if (argc > 2) {
|
||||
fprintf(stderr, "Usage: %s [pmem_kind_dir_path]", argv[0]);
|
||||
return 1;
|
||||
} else if (argc == 2) {
|
||||
if (stat(argv[1], &st) != 0 || !S_ISDIR(st.st_mode)) {
|
||||
fprintf(stderr, "%s : Invalid path to pmem kind directory", argv[1]);
|
||||
return 1;
|
||||
} else {
|
||||
PMEM_DIR = argv[1];
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(stdout,
|
||||
"This example shows how to use multithreading with independent pmem kinds."
|
||||
"\nPMEM kind directory: %s\n",
|
||||
PMEM_DIR);
|
||||
|
||||
pthread_t pmem_threads[NUM_THREADS];
|
||||
int t;
|
||||
|
||||
/* Lets create many independent threads */
|
||||
for (t = 0; t < NUM_THREADS; t++) {
|
||||
err = pthread_create(&pmem_threads[t], NULL, thread_ind, NULL);
|
||||
if (err) {
|
||||
fprintf(stderr, "Unable to create a thread\n");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
pthread_cond_broadcast(&cond);
|
||||
|
||||
for (t = 0; t < NUM_THREADS; t++) {
|
||||
err = pthread_join(pmem_threads[t], NULL);
|
||||
if (err) {
|
||||
fprintf(stderr, "Thread join failed\n");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(stdout, "Threads successfully allocated memory in the PMEM kinds.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void *thread_ind(void *arg)
|
||||
{
|
||||
struct memkind *pmem_kind;
|
||||
|
||||
pthread_mutex_lock(&mutex);
|
||||
pthread_cond_wait(&cond, &mutex);
|
||||
pthread_mutex_unlock(&mutex);
|
||||
|
||||
/* Create a pmem kind in thread */
|
||||
int err = memkind_create_pmem(PMEM_DIR, PMEM_MAX_SIZE, &pmem_kind);
|
||||
if (err) {
|
||||
perror("thread memkind_create_pmem()");
|
||||
fprintf(stderr, "Unable to create pmem partition err=%d errno=%d\n", err,
|
||||
errno);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Alloc something */
|
||||
void *test = memkind_malloc(pmem_kind, 32);
|
||||
if (test == NULL) {
|
||||
perror("thread memkind_malloc()");
|
||||
fprintf(stderr, "Unable to allocate pmem (test)\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Free resources */
|
||||
memkind_free(pmem_kind, test);
|
||||
|
||||
/* And destroy pmem kind */
|
||||
err = memkind_destroy_kind(pmem_kind);
|
||||
if (err) {
|
||||
perror("thread memkind_pmem_destroy()");
|
||||
fprintf(stderr, "Unable to destroy pmem partition\n");
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Intel Corporation
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* * Neither the name of Intel Corporation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY LOG OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <memkind.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <pthread.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define NUM_THREADS 10
|
||||
|
||||
static char *PMEM_DIR = "/tmp/";
|
||||
|
||||
struct arg_struct {
|
||||
int id;
|
||||
struct memkind *kind;
|
||||
int **ptr;
|
||||
};
|
||||
|
||||
void *thread_onekind(void *arg);
|
||||
|
||||
static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
static pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
struct memkind *pmem_kind_unlimited = NULL;
|
||||
int err = 0;
|
||||
struct stat st;
|
||||
|
||||
if (argc > 2) {
|
||||
fprintf(stderr, "Usage: %s [pmem_kind_dir_path]", argv[0]);
|
||||
return 1;
|
||||
} else if (argc == 2) {
|
||||
if (stat(argv[1], &st) != 0 || !S_ISDIR(st.st_mode)) {
|
||||
fprintf(stderr, "%s : Invalid path to pmem kind directory", argv[1]);
|
||||
return 1;
|
||||
} else {
|
||||
PMEM_DIR = argv[1];
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(stdout,
|
||||
"This example shows how to use multithreading with one main pmem kind."
|
||||
"\nPMEM kind directory: %s\n",
|
||||
PMEM_DIR);
|
||||
|
||||
/* Create PMEM partition with unlimited size */
|
||||
err = memkind_create_pmem(PMEM_DIR, 0, &pmem_kind_unlimited);
|
||||
if (err) {
|
||||
perror("memkind_create_pmem()");
|
||||
fprintf(stderr, "Unable to create pmem partition err=%d errno=%d\n", err,
|
||||
errno);
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
/* Create a few threads which will access to our main pmem_kind */
|
||||
pthread_t pmem_threads[NUM_THREADS];
|
||||
int *pmem_tint[NUM_THREADS][100];
|
||||
int t = 0, i = 0;
|
||||
|
||||
struct arg_struct *args[NUM_THREADS];
|
||||
|
||||
for (t = 0; t<NUM_THREADS; t++) {
|
||||
args[t] = malloc(sizeof(struct arg_struct));
|
||||
args[t]->id = t;
|
||||
args[t]->ptr = &pmem_tint[t][0];
|
||||
args[t]->kind = pmem_kind_unlimited;
|
||||
|
||||
err = pthread_create(&pmem_threads[t], NULL, thread_onekind, (void *)args[t]);
|
||||
if (err) {
|
||||
fprintf(stderr, "Unable to create a thread\n");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
pthread_cond_broadcast(&cond);
|
||||
|
||||
for (t = 0; t < NUM_THREADS; t++) {
|
||||
err = pthread_join(pmem_threads[t], NULL);
|
||||
if (err) {
|
||||
fprintf(stderr, "Thread join failed\n");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Check if we can read the values outside of threads and free resources */
|
||||
for (t = 0; t < NUM_THREADS; t++) {
|
||||
for (i = 0; i < 100; i++) {
|
||||
if(*pmem_tint[t][i] != t) {
|
||||
perror("read thread memkind_malloc()");
|
||||
fprintf(stderr, "pmem_tint value has not been saved correctly in the thread\n");
|
||||
return 1;
|
||||
}
|
||||
memkind_free(args[t]->kind, *(args[t]->ptr+i));
|
||||
}
|
||||
free(args[t]);
|
||||
}
|
||||
|
||||
fprintf(stdout, "Threads successfully allocated memory in the PMEM kind.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void *thread_onekind(void *arg)
|
||||
{
|
||||
struct arg_struct *args = (struct arg_struct *)arg;
|
||||
int i;
|
||||
|
||||
pthread_mutex_lock(&mutex);
|
||||
pthread_cond_wait(&cond, &mutex);
|
||||
pthread_mutex_unlock(&mutex);
|
||||
|
||||
/* Lets alloc int and put there thread ID */
|
||||
for (i = 0; i < 100; i++) {
|
||||
*(args->ptr+i) = (int *)memkind_malloc(args->kind, sizeof(int));
|
||||
if (*(args->ptr+i) == NULL) {
|
||||
perror("thread memkind_malloc()");
|
||||
fprintf(stderr, "Unable to allocate pmem int\n");
|
||||
return NULL;
|
||||
}
|
||||
**(args->ptr+i) = args->id;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
+172
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Intel Corporation
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* * Neither the name of Intel Corporation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY LOG OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <memkind.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
static char *PMEM_DIR = "/tmp/";
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
struct memkind *pmem_kind_unlimited = NULL;
|
||||
int err = 0;
|
||||
struct stat st;
|
||||
|
||||
if (argc > 2) {
|
||||
fprintf(stderr, "Usage: %s [pmem_kind_dir_path]", argv[0]);
|
||||
return 1;
|
||||
} else if (argc == 2) {
|
||||
if (stat(argv[1], &st) != 0 || !S_ISDIR(st.st_mode)) {
|
||||
fprintf(stderr, "%s : Invalid path to pmem kind directory", argv[1]);
|
||||
return 1;
|
||||
} else {
|
||||
PMEM_DIR = argv[1];
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(stdout,
|
||||
"This example shows difference between the expected and the actual allocation size."
|
||||
"\nPMEM kind directory: %s\n",
|
||||
PMEM_DIR);
|
||||
|
||||
/* Create PMEM partition with unlimited size */
|
||||
err = memkind_create_pmem(PMEM_DIR, 0, &pmem_kind_unlimited);
|
||||
if (err) {
|
||||
perror("memkind_create_pmem()");
|
||||
fprintf(stderr, "Unable to create pmem partition err=%d errno=%d\n", err,
|
||||
errno);
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
char *pmem_str10 = NULL;
|
||||
char *pmem_str11 = NULL;
|
||||
char *pmem_str12 = NULL;
|
||||
|
||||
/* 32 bytes allocation */
|
||||
pmem_str10 = (char *)memkind_malloc(pmem_kind_unlimited, 32);
|
||||
if (pmem_str10 == NULL) {
|
||||
perror("memkind_malloc()");
|
||||
fprintf(stderr, "Unable to allocate pmem string (pmem_str10)\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
/* Check real usable size for this allocation */
|
||||
if (memkind_malloc_usable_size(pmem_kind_unlimited, pmem_str10) != 32) {
|
||||
perror("memkind_default_malloc_usable_size()");
|
||||
fprintf(stderr, "Wrong usable size\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 31 bytes allocation */
|
||||
pmem_str11 = (char *)memkind_malloc(pmem_kind_unlimited, 31);
|
||||
if (pmem_str11 == NULL) {
|
||||
perror("memkind_malloc()");
|
||||
fprintf(stderr, "Unable to allocate pmem string (pmem_str11)\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
/* Check real usable size for this allocation, its 32 again */
|
||||
if (memkind_malloc_usable_size(pmem_kind_unlimited, pmem_str11) != 32) {
|
||||
perror("memkind_default_malloc_usable_size()");
|
||||
fprintf(stderr, "Wrong usable size\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 33 bytes allocation */
|
||||
pmem_str12 = (char *)memkind_malloc(pmem_kind_unlimited, 33);
|
||||
if (pmem_str11 == NULL) {
|
||||
perror("memkind_malloc()");
|
||||
fprintf(stderr, "Unable to allocate pmem string (pmem_str12)\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
/* Check real usable size for this allocation, its 48 now */
|
||||
if (memkind_malloc_usable_size(pmem_kind_unlimited, pmem_str12) != 48) {
|
||||
perror("memkind_default_malloc_usable_size()");
|
||||
fprintf(stderr, "Wrong usable size\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
memkind_free(pmem_kind_unlimited, pmem_str10);
|
||||
memkind_free(pmem_kind_unlimited, pmem_str11);
|
||||
memkind_free(pmem_kind_unlimited, pmem_str12);
|
||||
|
||||
/* 5MB allocation */
|
||||
pmem_str10 = (char *)memkind_malloc(pmem_kind_unlimited, 5 * 1024 * 1024);
|
||||
if (pmem_str10 == NULL) {
|
||||
perror("memkind_malloc()");
|
||||
fprintf(stderr, "Unable to allocate pmem string (pmem_str10)\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
/* Check real usable size for this allocation */
|
||||
if (memkind_malloc_usable_size(pmem_kind_unlimited,
|
||||
pmem_str10) != 5 * 1024 * 1024) {
|
||||
perror("memkind_default_malloc_usable_size()");
|
||||
fprintf(stderr, "Wrong usable size\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 5MB + 1B allocation */
|
||||
pmem_str11 = (char *)memkind_malloc(pmem_kind_unlimited, 5 * 1024 * 1024 + 1);
|
||||
if (pmem_str11 == NULL) {
|
||||
perror("memkind_malloc()");
|
||||
fprintf(stderr, "Unable to allocate pmem string (pmem_str11)\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
/* Check real usable size for this allocation, its 6MB now */
|
||||
if (memkind_malloc_usable_size(pmem_kind_unlimited,
|
||||
pmem_str11) != 6 * 1024 * 1024) {
|
||||
perror("memkind_default_malloc_usable_size()");
|
||||
fprintf(stderr, "Wrong usable size\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
memkind_free(pmem_kind_unlimited, pmem_str10);
|
||||
memkind_free(pmem_kind_unlimited, pmem_str11);
|
||||
|
||||
err = memkind_destroy_kind(pmem_kind_unlimited);
|
||||
if (err) {
|
||||
perror("memkind_destroy_kind()");
|
||||
fprintf(stderr, "Unable to destroy pmem partition\n");
|
||||
return errno ? -errno : 1;
|
||||
}
|
||||
|
||||
fprintf(stdout,
|
||||
"The real size of the allocation has been successfully read.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
+134
@@ -0,0 +1,134 @@
|
||||
/*
|
||||
* Copyright (C) 2014 - 2018 Intel Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <hbwmalloc.h>
|
||||
|
||||
#include <stddef.h>
|
||||
#include <new>
|
||||
/*
|
||||
* Header file for the C++ allocator compatible with the C++ standard library allocator concepts.
|
||||
* More details in hbwallocator(3) man page.
|
||||
* Note: memory heap management is based on hbwmalloc, refer to the hbwmalloc man page for more information.
|
||||
*
|
||||
* Functionality defined in this header is considered as EXPERIMENTAL API.
|
||||
* API standards are described in memkind(3) man page.
|
||||
*/
|
||||
namespace hbw
|
||||
{
|
||||
|
||||
template <class T>
|
||||
class allocator
|
||||
{
|
||||
public:
|
||||
/*
|
||||
* Public member types required and defined by the standard library allocator concepts.
|
||||
*/
|
||||
typedef size_t size_type;
|
||||
typedef ptrdiff_t difference_type;
|
||||
typedef T *pointer;
|
||||
typedef const T *const_pointer;
|
||||
typedef T &reference;
|
||||
typedef const T &const_reference;
|
||||
typedef T value_type;
|
||||
|
||||
template <class U>
|
||||
struct rebind {
|
||||
typedef hbw::allocator<U> other;
|
||||
};
|
||||
|
||||
/*
|
||||
* Public member functions required and defined by the standard library allocator concepts.
|
||||
*/
|
||||
allocator() throw() { }
|
||||
|
||||
template <class U>
|
||||
allocator(const allocator<U> &) throw() { }
|
||||
|
||||
~allocator() throw() { }
|
||||
|
||||
pointer address(reference x) const
|
||||
{
|
||||
return &x;
|
||||
}
|
||||
|
||||
const_pointer address(const_reference x) const
|
||||
{
|
||||
return &x;
|
||||
}
|
||||
|
||||
/*
|
||||
* Allocates n*sizeof(T) bytes of high bandwidth memory using hbw_malloc().
|
||||
* Throws std::bad_alloc when cannot allocate memory.
|
||||
*/
|
||||
pointer allocate(size_type n, const void * = 0)
|
||||
{
|
||||
if (n > this->max_size()) {
|
||||
throw std::bad_alloc();
|
||||
}
|
||||
pointer result = static_cast<pointer>(hbw_malloc(n * sizeof(T)));
|
||||
if (!result) {
|
||||
throw std::bad_alloc();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* Deallocates memory associated with pointer returned by allocate() using hbw_free().
|
||||
*/
|
||||
void deallocate(pointer p, size_type n)
|
||||
{
|
||||
hbw_free(static_cast<void *>(p));
|
||||
}
|
||||
|
||||
size_type max_size() const throw()
|
||||
{
|
||||
return size_t(-1) / sizeof(T);
|
||||
}
|
||||
|
||||
void construct(pointer p, const_reference val)
|
||||
{
|
||||
::new(p) value_type(val);
|
||||
}
|
||||
|
||||
void destroy(pointer p)
|
||||
{
|
||||
p->~T();
|
||||
}
|
||||
};
|
||||
|
||||
template <class T, class U>
|
||||
bool operator==(const allocator<T> &, const allocator<U> &)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class T, class U>
|
||||
bool operator!=(const allocator<T> &, const allocator<U> &)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
Vendored
+238
@@ -0,0 +1,238 @@
|
||||
/*
|
||||
* Copyright (C) 2014 - 2018 Intel Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
/*
|
||||
* Header file for the high bandwidth memory interface.
|
||||
*
|
||||
* This file defines the external API's and enumerations for the
|
||||
* hbwmalloc library. These interfaces define a heap manager that
|
||||
* targets the high bandwidth memory numa nodes.
|
||||
*
|
||||
* hbwmalloc.h functionality is considered as stable API (STANDARD API).
|
||||
*
|
||||
* Please read hbwmalloc(3) man page for or more details.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Fallback policy.
|
||||
*
|
||||
* Policy that determines behavior when there is not enough free high
|
||||
* bandwidth memory to satisfy a user request. This enum is used with
|
||||
* hbw_get_policy() and hbw_set_policy().
|
||||
*/
|
||||
typedef enum {
|
||||
/*
|
||||
* If insufficient high bandwidth memory pages on nearest NUMA node are
|
||||
* available then OOM killer will be triggered.
|
||||
*/
|
||||
HBW_POLICY_BIND = 1,
|
||||
/*
|
||||
* If insufficient high bandwidth memory pages are available fall
|
||||
* back on standard memory pages.
|
||||
*/
|
||||
HBW_POLICY_PREFERRED = 2,
|
||||
/*
|
||||
* Interleave pages across high bandwidth nodes. If insufficient memory
|
||||
* pages are available then OOM killer will be triggered.
|
||||
*/
|
||||
HBW_POLICY_INTERLEAVE = 3,
|
||||
/*
|
||||
* If insufficient high bandwidth memory pages are available then
|
||||
* OOM killer will be triggered.
|
||||
*/
|
||||
HBW_POLICY_BIND_ALL = 4,
|
||||
} hbw_policy_t;
|
||||
|
||||
/*
|
||||
* Page size selection.
|
||||
*
|
||||
* The hbw_posix_memalign_psize() API gives the user the option to
|
||||
* select the page size from this enumerated list.
|
||||
*/
|
||||
typedef enum {
|
||||
|
||||
/*
|
||||
* The four kilobyte page size option. Note that with transparent huge
|
||||
* pages enabled these allocations may be promoted by the operating system
|
||||
* to two megabyte pages.
|
||||
*/
|
||||
HBW_PAGESIZE_4KB = 1,
|
||||
|
||||
/*
|
||||
* The two megabyte page size option.
|
||||
*/
|
||||
HBW_PAGESIZE_2MB = 2,
|
||||
/*
|
||||
* This option is deprecated.
|
||||
* Allocate high bandwidth memory using 1GB chunks backed by huge pages.
|
||||
*/
|
||||
HBW_PAGESIZE_1GB_STRICT = 3,
|
||||
|
||||
/*
|
||||
* This option is deprecated.
|
||||
* Allocate high bandwidth memory using 1GB chunks backed by huge pages.
|
||||
*/
|
||||
HBW_PAGESIZE_1GB = 4,
|
||||
|
||||
/*
|
||||
* Helper representing value of the last enum element incremented by 1.
|
||||
* Shall not be treated as a valid value for functions taking hbw_pagesize_t
|
||||
* as parameter.
|
||||
*/
|
||||
HBW_PAGESIZE_MAX_VALUE
|
||||
} hbw_pagesize_t;
|
||||
|
||||
/*
|
||||
* Flags for hbw_verify_ptr function
|
||||
*/
|
||||
enum {
|
||||
|
||||
/*
|
||||
* This option touches first byte of all pages in address range starting from "addr" to "addr" + "size"
|
||||
* by read and write (so the content will be overwitten by the same data as it was read).
|
||||
*/
|
||||
HBW_TOUCH_PAGES = (1 << 0)
|
||||
};
|
||||
|
||||
/*
|
||||
* Returns the current fallback policy when insufficient high bandwidth memory
|
||||
* is available.
|
||||
*/
|
||||
hbw_policy_t hbw_get_policy(void);
|
||||
|
||||
/*
|
||||
* Sets the current fallback policy. The policy can be modified only once in
|
||||
* the lifetime of an application and before calling hbw_*alloc() or
|
||||
* hbw_posix_memalign*() function.
|
||||
* Note: If the policy is not set, than HBW_POLICY_PREFERRED will be used by
|
||||
* default.
|
||||
*
|
||||
* Returns:
|
||||
* 0: on success
|
||||
* EPERM: if hbw_set_policy () was called more than once
|
||||
* EINVAL: if mode argument was neither HBW_POLICY_PREFERRED, HBW_POLICY_BIND, HBW_POLICY_BIND_ALL nor HBW_POLICY_INTERLEAVE
|
||||
*/
|
||||
int hbw_set_policy(hbw_policy_t mode);
|
||||
|
||||
/*
|
||||
* Verifies high bandwidth memory availability.
|
||||
* Returns:
|
||||
* 0: if high bandwidth memory is available
|
||||
* ENODEV: if high-bandwidth memory is unavailable.
|
||||
*/
|
||||
int hbw_check_available(void);
|
||||
|
||||
/*
|
||||
* Verifies if allocated memory fully fall into high bandwidth memory.
|
||||
* Returns:
|
||||
* 0: if memory in address range from "addr" to "addr" + "size" is allocated in high bandwidth memory
|
||||
* -1: if any region of memory was not allocated in high bandwidth memory
|
||||
* EINVAL: if addr is NULL, size equals 0 or flags contained unsupported bit set
|
||||
* EFAULT: could not verify memory
|
||||
*/
|
||||
int hbw_verify_memory_region(void *addr, size_t size, int flags);
|
||||
|
||||
/*
|
||||
* Allocates size bytes of uninitialized high bandwidth memory.
|
||||
* The allocated space is suitably aligned (after possible pointer
|
||||
* coercion) for storage of any type of object. If size is zero then
|
||||
* hbw_malloc() returns NULL.
|
||||
*/
|
||||
void *hbw_malloc(size_t size);
|
||||
|
||||
/*
|
||||
* Allocates space for num objects in high bandwidth memory, each size bytes
|
||||
* in length.
|
||||
* The result is identical to calling hbw_malloc() with an argument of
|
||||
* num*size, with the exception that the allocated memory is explicitly
|
||||
* initialized to zero bytes.
|
||||
* If num or size is 0, then hbw_calloc() returns NULL.
|
||||
*/
|
||||
void *hbw_calloc(size_t num, size_t size);
|
||||
|
||||
/*
|
||||
* Allocates size bytes of high bandwidth memory such that the allocation's
|
||||
* base address is an even multiple of alignment, and returns the allocation
|
||||
* in the value pointed to by memptr. The requested alignment must be a power
|
||||
* of 2 at least as large as sizeof(void *).
|
||||
* Returns:
|
||||
* 0: on success
|
||||
* ENOMEM: if there was insufficient memory to satisfy the request
|
||||
* EINVAL: if the alignment parameter was not a power of two, or was less than sizeof(void *)
|
||||
*/
|
||||
int hbw_posix_memalign(void **memptr, size_t alignment, size_t size);
|
||||
|
||||
/*
|
||||
* Allocates size bytes of high bandwidth memory such that the allocation's
|
||||
* base address is an even multiple of alignment, and returns the allocation
|
||||
* in the value pointed to by memptr. The requested alignment must be a power
|
||||
* of 2 at least as large as sizeof(void *). The memory will be allocated
|
||||
* using pages determined by the pagesize variable.
|
||||
* Returns:
|
||||
* 0: on success
|
||||
* ENOMEM: if there was insufficient memory to satisfy the request
|
||||
* EINVAL: if the alignment parameter was not a power of two, or was less than sizeof(void *)
|
||||
*/
|
||||
int hbw_posix_memalign_psize(void **memptr, size_t alignment, size_t size,
|
||||
hbw_pagesize_t pagesize);
|
||||
|
||||
/*
|
||||
* Changes the size of the previously allocated memory referenced by ptr to
|
||||
* size bytes of the specified kind. The contents of the memory are unchanged
|
||||
* up to the lesser of the new and old size.
|
||||
* If the new size is larger, the contents of the newly allocated portion
|
||||
* of the memory are undefined.
|
||||
* Upon success, the memory referenced by ptr is freed and a pointer to the
|
||||
* newly allocated high bandwidth memory is returned.
|
||||
* Note: memkind_realloc() may move the memory allocation, resulting in a
|
||||
* different return value than ptr.
|
||||
* If ptr is NULL, the hbw_realloc() function behaves identically to
|
||||
* hbw_malloc() for the specified size. The address ptr, if not NULL,
|
||||
* was returned by a previous call to hbw_malloc(), hbw_calloc(),
|
||||
* hbw_realloc(), or hbw_posix_memalign(). Otherwise, or if hbw_free(ptr)
|
||||
* was called before, undefined behavior occurs.
|
||||
* Note: hbw_realloc() cannot be used with a pointer returned by
|
||||
* hbw_posix_memalign_psize().
|
||||
*/
|
||||
void *hbw_realloc(void *ptr, size_t size);
|
||||
|
||||
/*
|
||||
* Causes the allocated memory referenced by ptr to be made
|
||||
* available for future allocations. If ptr is NULL, no action occurs.
|
||||
* The address ptr, if not NULL, must have been returned by a previous call
|
||||
* to hbw_malloc(), hbw_calloc(), hbw_realloc(), hbw_posix_memalign(), or
|
||||
* hbw_posix_memalign_psize(). Otherwise, if hbw_free(ptr) was called before,
|
||||
* undefined behavior occurs.
|
||||
*/
|
||||
void hbw_free(void *ptr);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Vendored
+325
@@ -0,0 +1,325 @@
|
||||
/*
|
||||
* Copyright (C) 2014 - 2018 Intel Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
/**
|
||||
* Header file for the memkind heap manager.
|
||||
* More details in memkind(3) man page.
|
||||
*
|
||||
* API standards are described in memkind(3) man page.
|
||||
*/
|
||||
|
||||
/// \warning EXPERIMENTAL API
|
||||
#define _MEMKIND_BIT(N) (1ull << N)
|
||||
|
||||
/// \brief Memkind memory types
|
||||
/// \warning EXPERIMENTAL API
|
||||
typedef enum memkind_memtype_t {
|
||||
|
||||
/**
|
||||
* Select standard memory, the same as process use.
|
||||
*/
|
||||
MEMKIND_MEMTYPE_DEFAULT = _MEMKIND_BIT(0),
|
||||
|
||||
/**
|
||||
* Select high bandwidth memory (HBM).
|
||||
* There must be at least two memories with different bandwidth to
|
||||
* determine the HBM.
|
||||
*/
|
||||
MEMKIND_MEMTYPE_HIGH_BANDWIDTH = _MEMKIND_BIT(1)
|
||||
|
||||
} memkind_memtype_t;
|
||||
|
||||
#undef _MEMKIND_BIT
|
||||
|
||||
/// \brief Memkind policy
|
||||
/// \warning EXPERIMENTAL API
|
||||
typedef enum memkind_policy_t {
|
||||
|
||||
/**
|
||||
* Allocate local memory.
|
||||
* If there is not enough memory to satisfy the request errno is set to
|
||||
* ENOMEM and the allocated pointer is set to NULL.
|
||||
*/
|
||||
MEMKIND_POLICY_BIND_LOCAL = 0,
|
||||
|
||||
/**
|
||||
* Memory locality is ignored.
|
||||
* If there is not enough memory to satisfy the request errno is set to
|
||||
* ENOMEM and the allocated pointer is set to NULL.
|
||||
*/
|
||||
MEMKIND_POLICY_BIND_ALL,
|
||||
|
||||
/**
|
||||
* Allocate preferred memory that is local.
|
||||
* If there is not enough preferred memory to satisfy the request or
|
||||
* preferred memory is not available, the allocation will fall back on any
|
||||
* other memory.
|
||||
*/
|
||||
MEMKIND_POLICY_PREFERRED_LOCAL,
|
||||
|
||||
/**
|
||||
* Interleave allocation across local memory.
|
||||
* For n memory types the allocation will be interleaved across all of
|
||||
* them.
|
||||
*/
|
||||
MEMKIND_POLICY_INTERLEAVE_LOCAL,
|
||||
|
||||
/**
|
||||
* Interleave allocation. Locality is ignored.
|
||||
* For n memory types the allocation will be interleaved across all of
|
||||
* them.
|
||||
*/
|
||||
MEMKIND_POLICY_INTERLEAVE_ALL,
|
||||
|
||||
/**
|
||||
* Max policy value.
|
||||
*/
|
||||
MEMKIND_POLICY_MAX_VALUE
|
||||
|
||||
} memkind_policy_t;
|
||||
|
||||
/// \brief Memkind bits definition
|
||||
/// \warning EXPERIMENTAL API
|
||||
/// \note The bits specify flags and masks. Bits <0,1,2,...,7> are reserved for page size, where page sizes are encoded
|
||||
/// by base-2 logarithm. If the page size bits are set to zero value, than default page size will be used.
|
||||
typedef enum memkind_bits_t {
|
||||
MEMKIND_MASK_PAGE_SIZE_2MB = 21ull, /**< Allocations backed by 2 MB page size (2^21 = 2MB) */
|
||||
} memkind_bits_t;
|
||||
|
||||
/// \brief Memkind type definition
|
||||
/// \warning EXPERIMENTAL API
|
||||
typedef struct memkind *memkind_t;
|
||||
|
||||
|
||||
/// \brief Memkind constant values
|
||||
/// \warning EXPERIMENTAL API
|
||||
enum memkind_const {
|
||||
MEMKIND_MAX_KIND = 512, /**< Maximum number of kinds */
|
||||
MEMKIND_ERROR_MESSAGE_SIZE = 128, /**< Error message size */
|
||||
MEMKIND_PMEM_MIN_SIZE = (1024 * 1024 * 16) /**< The minimum size which allows to limit the file-backed memory partition */
|
||||
};
|
||||
|
||||
/// \brief Memkind operation statuses
|
||||
/// \warning EXPERIMENTAL API
|
||||
enum {
|
||||
MEMKIND_SUCCESS = 0, /**< Operation success */
|
||||
MEMKIND_ERROR_UNAVAILABLE = -1, /**< Error: Memory kind is not available */
|
||||
MEMKIND_ERROR_MBIND = -2, /**< Error: Call to mbind() failed */
|
||||
MEMKIND_ERROR_MMAP = -3, /**< Error: Call to mmap() failed */
|
||||
MEMKIND_ERROR_MALLOC = -6, /**< Error: Call to malloc() failed */
|
||||
MEMKIND_ERROR_ENVIRON = -12, /**< Error: Unable to parse environment variable */
|
||||
MEMKIND_ERROR_INVALID = -13, /**< Error: Invalid argument */
|
||||
MEMKIND_ERROR_TOOMANY = -15, /**< Error: Attempt to initialize more than MEMKIND_MAX_KIND number of kinds */
|
||||
MEMKIND_ERROR_BADOPS = -17, /**< Error: Invalid memkind_ops structure */
|
||||
MEMKIND_ERROR_HUGETLB = -18, /**< Error: Unable to allocate huge pages */
|
||||
MEMKIND_ERROR_MEMTYPE_NOT_AVAILABLE = -20, /**< Error: Requested memory type is not available */
|
||||
MEMKIND_ERROR_OPERATION_FAILED = -21, /**< Error: Operation failed */
|
||||
MEMKIND_ERROR_ARENAS_CREATE = -22, /**< Error: Call to jemalloc's arenas.create failed */
|
||||
MEMKIND_ERROR_RUNTIME = -255 /**< Error: Unspecified run-time error */
|
||||
};
|
||||
|
||||
///
|
||||
/// \brief Create kind that allocates memory with specific memory type, memory binding policy and flags.
|
||||
/// \warning EXPERIMENTAL API
|
||||
/// \note Currently implemented memory type and policy configurations:
|
||||
///. {MEMKIND_MEMTYPE_DEFAULT, MEMKIND_POLICY_PREFERRED_LOCAL},
|
||||
///. {MEMKIND_MEMTYPE_HIGH_BANDWIDTH, MEMKIND_POLICY_BIND_LOCAL},
|
||||
/// {MEMKIND_MEMTYPE_HIGH_BANDWIDTH, MEMKIND_POLICY_PREFERRED_LOCAL},
|
||||
/// {MEMKIND_MEMTYPE_HIGH_BANDWIDTH, MEMKIND_POLICY_INTERLEAVE_ALL},
|
||||
/// {MEMKIND_MEMTYPE_DEFAULT | MEMKIND_MEMTYPE_HIGH_BANDWIDTH, MEMKIND_POLICY_INTERLEAVE_ALL}.
|
||||
/// \param memtype_flags determine the memory types to allocate from by combination of memkind_memtype_t values.
|
||||
/// This field cannot have zero value.
|
||||
/// \param policy specify policy for page binding to memory types selected by memtype_flags.
|
||||
/// This field must be set to memkind_policy_t value. If policy is set to MEMKIND_POLICY_PREFERRED_LOCAL then only one memory
|
||||
/// type must be selected. Note: the value cannot be set to MEMKIND_POLICY_MAX_VALUE.
|
||||
/// \param flags the field must be set to a combination of memkind_bits_t values.
|
||||
/// \param kind pointer to kind which will be created
|
||||
/// \return Memkind operation status, MEMKIND_SUCCESS on success, MEMKIND_ERROR_MEMTYPE_NOT_AVAILABLE or MEMKIND_ERROR_INVALID on failure
|
||||
///
|
||||
int memkind_create_kind(memkind_memtype_t memtype_flags,
|
||||
memkind_policy_t policy,
|
||||
memkind_bits_t flags,
|
||||
memkind_t *kind);
|
||||
|
||||
///
|
||||
/// \brief Destroy previously created kind object, which must have been returned
|
||||
/// by a call to memkind_create_kind() or memkind_create_pmem().
|
||||
/// The function has undefined behavior when the handle is invalid or
|
||||
/// memkind_destroy_kind(kind) was already called before
|
||||
/// \warning EXPERIMENTAL API
|
||||
/// \note if the kind was returned by memkind_create_kind() all allocated memory must be freed
|
||||
/// before kind is destroyed, otherwise this will cause memory leak.
|
||||
/// \param kind specified memory kind
|
||||
/// \return Memkind operation status, MEMKIND_SUCCESS on success, MEMKIND_ERROR_OPERATION_FAILED on failure
|
||||
///
|
||||
int memkind_destroy_kind(memkind_t kind);
|
||||
|
||||
|
||||
#include "memkind_deprecated.h"
|
||||
|
||||
/// \warning EXPERIMENTAL API
|
||||
extern memkind_t MEMKIND_REGULAR;
|
||||
|
||||
/// \warning EXPERIMENTAL API
|
||||
extern memkind_t MEMKIND_DEFAULT;
|
||||
|
||||
/// \warning EXPERIMENTAL API
|
||||
extern memkind_t MEMKIND_HUGETLB;
|
||||
|
||||
/// \warning EXPERIMENTAL API
|
||||
extern memkind_t MEMKIND_HBW;
|
||||
|
||||
/// \warning EXPERIMENTAL API
|
||||
extern memkind_t MEMKIND_HBW_ALL;
|
||||
|
||||
/// \warning EXPERIMENTAL API
|
||||
extern memkind_t MEMKIND_HBW_PREFERRED;
|
||||
|
||||
/// \warning EXPERIMENTAL API
|
||||
extern memkind_t MEMKIND_HBW_HUGETLB;
|
||||
|
||||
/// \warning EXPERIMENTAL API
|
||||
extern memkind_t MEMKIND_HBW_ALL_HUGETLB;
|
||||
|
||||
/// \warning EXPERIMENTAL API
|
||||
extern memkind_t MEMKIND_HBW_PREFERRED_HUGETLB;
|
||||
|
||||
/// \warning EXPERIMENTAL API
|
||||
extern memkind_t MEMKIND_HBW_INTERLEAVE;
|
||||
|
||||
/// \warning EXPERIMENTAL API
|
||||
extern memkind_t MEMKIND_INTERLEAVE;
|
||||
|
||||
///
|
||||
/// \brief Get Memkind API version
|
||||
/// \note STANDARD API
|
||||
/// \return Version number represented by a single integer number(major * 1000000 + minor * 1000 + patch)
|
||||
///
|
||||
int memkind_get_version();
|
||||
|
||||
///
|
||||
/// \brief Convert error number into an error message
|
||||
/// \note STANDARD API
|
||||
/// \param err error number
|
||||
/// \param msg error message
|
||||
/// \param size size of message
|
||||
///
|
||||
void memkind_error_message(int err, char *msg, size_t size);
|
||||
|
||||
///
|
||||
/// \brief Create a new PMEM (file-backed) kind of given size on top of a temporary file
|
||||
/// in the given directory dir
|
||||
/// \note STANDARD API
|
||||
/// \param dir path to specified directory to temporary file
|
||||
/// \param max_size size limit for kind
|
||||
/// \param kind pointer to kind which will be created
|
||||
/// \return Memkind operation status, MEMKIND_SUCCESS on success, other values on failure
|
||||
///
|
||||
int memkind_create_pmem(const char *dir, size_t max_size, memkind_t *kind);
|
||||
|
||||
///
|
||||
/// \brief Check if kind is available
|
||||
/// \note STANDARD API
|
||||
/// \param kind specified memory kind
|
||||
/// \return Memkind operation status, MEMKIND_SUCCESS on success, other values on failure
|
||||
///
|
||||
int memkind_check_available(memkind_t kind);
|
||||
|
||||
/* HEAP MANAGEMENT INTERFACE */
|
||||
|
||||
///
|
||||
/// \brief Allocates size bytes of uninitialized storage of the specified kind
|
||||
/// \note STANDARD API
|
||||
/// \param kind specified memory kind
|
||||
/// \param size number of bytes to allocate
|
||||
/// \return Pointer to the allocated memory
|
||||
///
|
||||
void *memkind_malloc(memkind_t kind, size_t size);
|
||||
|
||||
///
|
||||
/// \brief Obtain size of block of memory allocated with the memkind API
|
||||
/// \note STANDARD API
|
||||
/// \param kind specified memory kind
|
||||
/// \param ptr pointer to the allocated memory
|
||||
/// \return Number of usable bytes
|
||||
///
|
||||
size_t memkind_malloc_usable_size(memkind_t kind, void *ptr);
|
||||
|
||||
///
|
||||
/// \brief Allocates memory of the specified kind for an array of num elements
|
||||
/// of size bytes each and initializes all bytes in the allocated storage to zero
|
||||
/// \note STANDARD API
|
||||
/// \param kind specified memory kind
|
||||
/// \param num number of objects
|
||||
/// \param size specified size of each element
|
||||
/// \return Pointer to the allocated memory
|
||||
///
|
||||
void *memkind_calloc(memkind_t kind, size_t num, size_t size);
|
||||
|
||||
/// \brief Allocates size bytes of the specified kind and places the address of the allocated memory
|
||||
/// in *memptr. The address of the allocated memory will be a multiple of alignment,
|
||||
/// which must be a power of two and a multiple of sizeof(void *)
|
||||
/// \note EXPERIMENTAL API
|
||||
/// \param kind specified memory kind
|
||||
/// \param memptr address of the allocated memory
|
||||
/// \param alignment specified alignment of bytes
|
||||
/// \param size specified size of bytes
|
||||
/// \return Memkind operation status, MEMKIND_SUCCESS on success, EINVAL or ENOMEM on failure
|
||||
///
|
||||
int memkind_posix_memalign(memkind_t kind, void **memptr, size_t alignment,
|
||||
size_t size);
|
||||
|
||||
///
|
||||
/// \brief Reallocates memory of the specified kind
|
||||
/// \note STANDARD API
|
||||
/// \param kind specified memory kind
|
||||
/// \param ptr pointer to the memory block to be reallocated
|
||||
/// \param size new size for the memory block in bytes
|
||||
/// \return Pointer to the allocated memory
|
||||
///
|
||||
void *memkind_realloc(memkind_t kind, void *ptr, size_t size);
|
||||
|
||||
///
|
||||
/// \brief Free the memory space of the specified kind pointed by ptr
|
||||
/// \note STANDARD API
|
||||
/// \param kind specified memory kind
|
||||
/// \param ptr pointer to the allocated memory
|
||||
///
|
||||
void memkind_free(memkind_t kind, void *ptr);
|
||||
|
||||
int memkind_fd(struct memkind *kind);
|
||||
void memkind_pmem_remapfd(struct memkind *kind, int fdNew);
|
||||
int memkind_tmpfile(const char *dir, int *fd);
|
||||
memkind_t memkind_get_kind(void *ptr);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (C) 2017 - 2018 Intel Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memkind.h>
|
||||
|
||||
void heap_manager_init(struct memkind *kind);
|
||||
void heap_manager_free(struct memkind *kind, void *ptr);
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright (C) 2014 - 2018 Intel Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef MEMKIND_INTERNAL_API
|
||||
#warning "DO NOT INCLUDE THIS FILE! IT IS INTERNAL MEMKIND API AND SOON WILL BE REMOVED FROM BIN & DEVEL PACKAGES"
|
||||
#endif
|
||||
|
||||
#include <memkind.h>
|
||||
#include <jemalloc/jemalloc.h>
|
||||
#include <memkind/internal/memkind_private.h>
|
||||
|
||||
/*
|
||||
* Header file for the jemalloc arena allocation memkind operations.
|
||||
* More details in memkind_arena(3) man page.
|
||||
*
|
||||
* Functionality defined in this header is considered as EXPERIMENTAL API.
|
||||
* API standards are described in memkind(3) man page.
|
||||
*/
|
||||
|
||||
struct memkind *get_kind_by_arena(unsigned arena_ind);
|
||||
|
||||
int memkind_arena_create(struct memkind *kind, struct memkind_ops *ops,
|
||||
const char *name);
|
||||
int memkind_arena_create_map(struct memkind *kind, extent_hooks_t *hooks);
|
||||
int memkind_arena_destroy(struct memkind *kind);
|
||||
void *memkind_arena_malloc(struct memkind *kind, size_t size);
|
||||
void *memkind_arena_calloc(struct memkind *kind, size_t num, size_t size);
|
||||
void *memkind_arena_pmem_calloc(struct memkind *kind, size_t num, size_t size);
|
||||
int memkind_arena_posix_memalign(struct memkind *kind, void **memptr,
|
||||
size_t alignment, size_t size);
|
||||
void *memkind_arena_realloc(struct memkind *kind, void *ptr, size_t size);
|
||||
int memkind_bijective_get_arena(struct memkind *kind, unsigned int *arena,
|
||||
size_t size);
|
||||
int memkind_thread_get_arena(struct memkind *kind, unsigned int *arena,
|
||||
size_t size);
|
||||
int memkind_arena_finalize(struct memkind *kind);
|
||||
void memkind_arena_init(struct memkind *kind);
|
||||
void memkind_arena_free(struct memkind *kind, void *ptr);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* Copyright (C) 2014 - 2018 Intel Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef MEMKIND_INTERNAL_API
|
||||
#warning "DO NOT INCLUDE THIS FILE! IT IS INTERNAL MEMKIND API AND SOON WILL BE REMOVED FROM BIN & DEVEL PACKAGES"
|
||||
#endif
|
||||
|
||||
#include <memkind.h>
|
||||
#include <memkind/internal/memkind_private.h>
|
||||
|
||||
/*
|
||||
* Header file for the default implementations for memkind operations.
|
||||
* More details in memkind_default(3) man page.
|
||||
*
|
||||
* Functionality defined in this header is considered as EXPERIMENTAL API.
|
||||
* API standards are described in memkind(3) man page.
|
||||
*/
|
||||
|
||||
int memkind_default_create(struct memkind *kind, struct memkind_ops *ops,
|
||||
const char *name);
|
||||
int memkind_default_destroy(struct memkind *kind);
|
||||
void *memkind_default_malloc(struct memkind *kind, size_t size);
|
||||
void *memkind_default_calloc(struct memkind *kind, size_t num, size_t size);
|
||||
int memkind_default_posix_memalign(struct memkind *kind, void **memptr,
|
||||
size_t alignment, size_t size);
|
||||
void *memkind_default_realloc(struct memkind *kind, void *ptr, size_t size);
|
||||
void memkind_default_free(struct memkind *kind, void *ptr);
|
||||
void *memkind_default_mmap(struct memkind *kind, void *addr, size_t size);
|
||||
int memkind_default_mbind(struct memkind *kind, void *ptr, size_t size);
|
||||
int memkind_default_get_mmap_flags(struct memkind *kind, int *flags);
|
||||
int memkind_default_get_mbind_mode(struct memkind *kind, int *mode);
|
||||
int memkind_default_get_mbind_nodemask(struct memkind *kind,
|
||||
unsigned long *nodemask, unsigned long maxnode);
|
||||
int memkind_preferred_get_mbind_mode(struct memkind *kind, int *mode);
|
||||
int memkind_interleave_get_mbind_mode(struct memkind *kind, int *mode);
|
||||
int memkind_nohugepage_madvise(struct memkind *kind, void *addr, size_t size);
|
||||
int memkind_posix_check_alignment(struct memkind *kind, size_t alignment);
|
||||
void memkind_default_init_once(void);
|
||||
size_t memkind_default_malloc_usable_size(struct memkind *kind, void *ptr);
|
||||
|
||||
static inline bool size_out_of_bounds(size_t size)
|
||||
{
|
||||
return !size;
|
||||
}
|
||||
|
||||
extern struct memkind_ops MEMKIND_DEFAULT_OPS;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (C) 2014 - 2016 Intel Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef MEMKIND_INTERNAL_API
|
||||
#warning "DO NOT INCLUDE THIS FILE! IT IS INTERNAL MEMKIND API AND SOON WILL BE REMOVED FROM BIN & DEVEL PACKAGES"
|
||||
#endif
|
||||
|
||||
#include <memkind.h>
|
||||
|
||||
/*
|
||||
* Header file for the gigabyte TLB memkind operations.
|
||||
*
|
||||
* All function declarations has been moved to memkind_deprecated.h
|
||||
* because of end of GBTLB support.
|
||||
*
|
||||
* API standards are described in memkind(3) man page.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* Copyright (C) 2014 - 2017 Intel Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef MEMKIND_INTERNAL_API
|
||||
#warning "DO NOT INCLUDE THIS FILE! IT IS INTERNAL MEMKIND API AND SOON WILL BE REMOVED FROM BIN & DEVEL PACKAGES"
|
||||
#endif
|
||||
|
||||
#include <memkind.h>
|
||||
|
||||
/*
|
||||
* Header file for the high bandwidth memory memkind operations.
|
||||
* More details in memkind_hbw(3) man page.
|
||||
*
|
||||
* Functionality defined in this header is considered as EXPERIMENTAL API.
|
||||
* API standards are described in memkind(3) man page.
|
||||
*/
|
||||
|
||||
int memkind_hbw_check_available(struct memkind *kind);
|
||||
int memkind_hbw_hugetlb_check_available(struct memkind *kind);
|
||||
int memkind_hbw_get_mbind_nodemask(struct memkind *kind,
|
||||
unsigned long *nodemask,
|
||||
unsigned long maxnode);
|
||||
int memkind_hbw_all_get_mbind_nodemask(struct memkind *kind,
|
||||
unsigned long *nodemask,
|
||||
unsigned long maxnode);
|
||||
void memkind_hbw_init_once(void);
|
||||
void memkind_hbw_all_init_once(void);
|
||||
void memkind_hbw_hugetlb_init_once(void);
|
||||
void memkind_hbw_all_hugetlb_init_once(void);
|
||||
void memkind_hbw_preferred_init_once(void);
|
||||
void memkind_hbw_preferred_hugetlb_init_once(void);
|
||||
void memkind_hbw_interleave_init_once(void);
|
||||
|
||||
extern struct memkind_ops MEMKIND_HBW_OPS;
|
||||
extern struct memkind_ops MEMKIND_HBW_ALL_OPS;
|
||||
extern struct memkind_ops MEMKIND_HBW_HUGETLB_OPS;
|
||||
extern struct memkind_ops MEMKIND_HBW_ALL_HUGETLB_OPS;
|
||||
extern struct memkind_ops MEMKIND_HBW_PREFERRED_OPS;
|
||||
extern struct memkind_ops MEMKIND_HBW_PREFERRED_HUGETLB_OPS;
|
||||
extern struct memkind_ops MEMKIND_HBW_INTERLEAVE_OPS;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright (C) 2014 - 2017 Intel Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef MEMKIND_INTERNAL_API
|
||||
#warning "DO NOT INCLUDE THIS FILE! IT IS INTERNAL MEMKIND API AND SOON WILL BE REMOVED FROM BIN & DEVEL PACKAGES"
|
||||
#endif
|
||||
|
||||
#include <memkind.h>
|
||||
|
||||
/*
|
||||
* Header file for the hugetlb memory memkind operations.
|
||||
* More details in memkind_hugetlb(3) man page.
|
||||
*
|
||||
* Functionality defined in this header is considered as EXPERIMENTAL API.
|
||||
* API standards are described in memkind(3) man page.
|
||||
*/
|
||||
|
||||
int memkind_hugetlb_get_mmap_flags(struct memkind *kind, int *flags);
|
||||
void memkind_hugetlb_init_once(void);
|
||||
int memkind_hugetlb_check_available_2mb(struct memkind *kind);
|
||||
|
||||
extern struct memkind_ops MEMKIND_HUGETLB_OPS;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (C) 2015 - 2017 Intel Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef MEMKIND_INTERNAL_API
|
||||
#warning "DO NOT INCLUDE THIS FILE! IT IS INTERNAL MEMKIND API AND SOON WILL BE REMOVED FROM BIN & DEVEL PACKAGES"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Header file for the interleave memory memkind operations.
|
||||
*
|
||||
* Functionality defined in this header is considered as EXPERIMENTAL API.
|
||||
* API standards are described in memkind(3) man page.
|
||||
*/
|
||||
|
||||
void memkind_interleave_init_once(void);
|
||||
|
||||
extern struct memkind_ops MEMKIND_INTERLEAVE_OPS;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright (C) 2014 - 2018 Intel Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define PRINTF_FORMAT __attribute__ ((format (printf, 1, 2)))
|
||||
|
||||
/*
|
||||
* For printing informational messages
|
||||
* Requires environment variable MEMKIND_DEBUG to be set to appropriate value
|
||||
*/
|
||||
void log_info(const char *format, ...) PRINTF_FORMAT;
|
||||
|
||||
/*
|
||||
* For printing messages regarding errors and failures
|
||||
* Requires environment variable MEMKIND_DEBUG to be set to appropriate value
|
||||
*/
|
||||
void log_err(const char *format, ...) PRINTF_FORMAT;
|
||||
|
||||
/*
|
||||
* For printing messages regarding fatal errors before calling abort()
|
||||
* Works *no matter* of MEMKIND_DEBUG state
|
||||
*/
|
||||
void log_fatal(const char *format, ...)PRINTF_FORMAT;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Copyright (C) 2015 - 2018 Intel Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef MEMKIND_INTERNAL_API
|
||||
#warning "DO NOT INCLUDE THIS FILE! IT IS INTERNAL MEMKIND API AND SOON WILL BE REMOVED FROM BIN & DEVEL PACKAGES"
|
||||
#endif
|
||||
|
||||
#include <memkind.h>
|
||||
#include "memkind_default.h"
|
||||
#include "memkind_arena.h"
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
/*
|
||||
* Header file for the file-backed memory memkind operations.
|
||||
* More details in memkind_pmem(3) man page.
|
||||
*
|
||||
* Functionality defined in this header is considered as EXPERIMENTAL API.
|
||||
* API standards are described in memkind(3) man page.
|
||||
*/
|
||||
|
||||
#define MEMKIND_PMEM_CHUNK_SIZE (1ull << 21ull) // 2MB
|
||||
|
||||
int memkind_pmem_create(struct memkind *kind, struct memkind_ops *ops,
|
||||
const char *name);
|
||||
int memkind_pmem_destroy(struct memkind *kind);
|
||||
void *memkind_pmem_mmap(struct memkind *kind, void *addr, size_t size);
|
||||
int memkind_pmem_get_mmap_flags(struct memkind *kind, int *flags);
|
||||
|
||||
struct memkind_pmem_extent {
|
||||
void *addrBase;
|
||||
size_t cb;
|
||||
off_t offset;
|
||||
};
|
||||
struct memkind_pmem {
|
||||
int fd;
|
||||
off_t offset;
|
||||
size_t max_size;
|
||||
pthread_mutex_t pmem_lock;
|
||||
int cextents;
|
||||
int cextentsAlloc;
|
||||
struct memkind_pmem_extent *rgextents;
|
||||
};
|
||||
|
||||
extern struct memkind_ops MEMKIND_PMEM_OPS;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,127 @@
|
||||
/*
|
||||
* Copyright (C) 2016 - 2018 Intel Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef MEMKIND_INTERNAL_API
|
||||
#warning "DO NOT INCLUDE THIS FILE! IT IS INTERNAL MEMKIND API AND SOON WILL BE REMOVED FROM BIN & DEVEL PACKAGES"
|
||||
#endif
|
||||
|
||||
#include "memkind.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#ifdef __GNUC__
|
||||
# define MEMKIND_LIKELY(x) __builtin_expect(!!(x), 1)
|
||||
# define MEMKIND_UNLIKELY(x) __builtin_expect(!!(x), 0)
|
||||
#else
|
||||
# define MEMKIND_LIKELY(x) (x)
|
||||
# define MEMKIND_UNLIKELY(x) (x)
|
||||
#endif
|
||||
|
||||
#ifndef MEMKIND_EXPORT
|
||||
# define MEMKIND_EXPORT __attribute__((visibility("default")))
|
||||
#endif
|
||||
|
||||
#ifndef JE_PREFIX
|
||||
#error "Can't find JE_PREFIX define. Define one or use build.sh script."
|
||||
#endif
|
||||
|
||||
// This ladder call is required due to meanders of C's preprocessor logic.
|
||||
// Without it, JE_PREFIX would be used directly (i.e. 'JE_PREFIX') and not
|
||||
// substituted with defined value.
|
||||
#define JE_SYMBOL2(a, b) a ## b
|
||||
#define JE_SYMBOL1(a, b) JE_SYMBOL2(a, b)
|
||||
#define JE_SYMBOL(b) JE_SYMBOL1(JE_PREFIX, b)
|
||||
|
||||
// Redefine symbols
|
||||
#define jemk_malloc JE_SYMBOL(malloc)
|
||||
#define jemk_mallocx JE_SYMBOL(mallocx)
|
||||
#define jemk_calloc JE_SYMBOL(calloc)
|
||||
#define jemk_rallocx JE_SYMBOL(rallocx)
|
||||
#define jemk_realloc JE_SYMBOL(realloc)
|
||||
#define jemk_mallctl JE_SYMBOL(mallctl)
|
||||
#define jemk_memalign JE_SYMBOL(memalign)
|
||||
#define jemk_posix_memalign JE_SYMBOL(posix_memalign)
|
||||
#define jemk_free JE_SYMBOL(free)
|
||||
#define jemk_dallocx JE_SYMBOL(dallocx)
|
||||
#define jemk_malloc_usable_size JE_SYMBOL(malloc_usable_size)
|
||||
|
||||
/// \note EXPERIMENTAL API
|
||||
int je_get_defrag_hint(void *ptr, int *bin_util, int *run_util);
|
||||
|
||||
enum memkind_const_private {
|
||||
MEMKIND_NAME_LENGTH_PRIV = 64
|
||||
};
|
||||
|
||||
struct memkind_ops {
|
||||
int (* create)(struct memkind *kind, struct memkind_ops *ops, const char *name);
|
||||
int (* destroy)(struct memkind *kind);
|
||||
void *(* malloc)(struct memkind *kind, size_t size);
|
||||
void *(* calloc)(struct memkind *kind, size_t num, size_t size);
|
||||
int (* posix_memalign)(struct memkind *kind, void **memptr, size_t alignment,
|
||||
size_t size);
|
||||
void *(* realloc)(struct memkind *kind, void *ptr, size_t size);
|
||||
void (* free)(struct memkind *kind, void *ptr);
|
||||
void *(* mmap)(struct memkind *kind, void *addr, size_t size);
|
||||
int (* mbind)(struct memkind *kind, void *ptr, size_t size);
|
||||
int (* madvise)(struct memkind *kind, void *addr, size_t size);
|
||||
int (* get_mmap_flags)(struct memkind *kind, int *flags);
|
||||
int (* get_mbind_mode)(struct memkind *kind, int *mode);
|
||||
int (* get_mbind_nodemask)(struct memkind *kind, unsigned long *nodemask,
|
||||
unsigned long maxnode);
|
||||
int (* get_arena)(struct memkind *kind, unsigned int *arena, size_t size);
|
||||
int (* check_available)(struct memkind *kind);
|
||||
int (* check_addr)(struct memkind *kind, void *addr);
|
||||
void (* init_once)(void);
|
||||
int (* finalize)(struct memkind *kind);
|
||||
size_t (* malloc_usable_size)(struct memkind *kind, void *addr);
|
||||
};
|
||||
|
||||
struct memkind {
|
||||
struct memkind_ops *ops;
|
||||
unsigned int partition;
|
||||
char name[MEMKIND_NAME_LENGTH_PRIV];
|
||||
pthread_once_t init_once;
|
||||
unsigned int arena_map_len; // is power of 2
|
||||
unsigned int *arena_map; // To be deleted beyond 1.2.0+
|
||||
pthread_key_t arena_key;
|
||||
void *priv;
|
||||
unsigned int
|
||||
arena_map_mask; // arena_map_len - 1 to optimize modulo operation on arena_map_len
|
||||
unsigned int arena_zero; // index first jemalloc arena of this kind
|
||||
};
|
||||
|
||||
void memkind_init(memkind_t kind, bool check_numa);
|
||||
|
||||
void *kind_mmap(struct memkind *kind, void *addr, size_t size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (C) 2017 Intel Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef MEMKIND_INTERNAL_API
|
||||
#warning "DO NOT INCLUDE THIS FILE! IT IS INTERNAL MEMKIND API AND SOON WILL BE REMOVED FROM BIN & DEVEL PACKAGES"
|
||||
#endif
|
||||
|
||||
#include <memkind.h>
|
||||
|
||||
/*
|
||||
* Header file for the regular memory memkind operations.
|
||||
* More details in memkind_regular(3) man page.
|
||||
*
|
||||
* Functionality defined in this header is considered as EXPERIMENTAL API.
|
||||
* API standards are described in memkind(3) man page.
|
||||
*/
|
||||
|
||||
extern struct memkind_ops MEMKIND_REGULAR_OPS;
|
||||
int memkind_regular_all_get_mbind_nodemask(struct memkind *kind,
|
||||
unsigned long *nodemask,
|
||||
unsigned long maxnode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
Copyright (c) 2005-2018 Intel Corporation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef void *(*rawAllocType)(intptr_t pool_id, size_t *bytes);
|
||||
typedef int (*rawFreeType)(intptr_t pool_id, void *raw_ptr, size_t raw_bytes);
|
||||
|
||||
struct MemPoolPolicy {
|
||||
rawAllocType pAlloc;
|
||||
rawFreeType pFree;
|
||||
size_t granularity;
|
||||
int version;
|
||||
unsigned fixedPool : 1,
|
||||
keepAllMemory : 1,
|
||||
reserved : 30;
|
||||
};
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (C) 2017 Intel Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <memkind.h>
|
||||
#include <memkind_deprecated.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* ops callbacks are replaced by TBB callbacks. */
|
||||
void tbb_initialize(struct memkind *kind);
|
||||
|
||||
/* ptr pointer must come from the valid TBB pool allocation */
|
||||
void tbb_pool_free(struct memkind *kind, void *ptr);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* Copyright (C) 2016 - 2018 Intel Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* !!!!!!!!!!!!!!!!!!!
|
||||
* !!! WARNING !!!
|
||||
* !!! PLEASE READ !!!
|
||||
* !!!!!!!!!!!!!!!!!!!
|
||||
*
|
||||
* This header file contains all memkind deprecated symbols.
|
||||
*
|
||||
* Please avoid usage of this API in newly developed code, as
|
||||
* eventually this code is subject for removal.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef MEMKIND_DEPRECATED
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define MEMKIND_DEPRECATED(func) func __attribute__ ((deprecated))
|
||||
#elif defined(_MSC_VER)
|
||||
#define MEMKIND_DEPRECATED(func) __declspec(deprecated) func
|
||||
#else
|
||||
#pragma message("WARNING: You need to implement MEMKIND_DEPRECATED for this compiler")
|
||||
#define MEMKIND_DEPRECATED(func) func
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Symbols related to GBTLB that are no longer supported
|
||||
*/
|
||||
extern memkind_t MEMKIND_HBW_GBTLB;
|
||||
extern memkind_t MEMKIND_HBW_PREFERRED_GBTLB;
|
||||
extern memkind_t MEMKIND_GBTLB;
|
||||
|
||||
int MEMKIND_DEPRECATED(memkind_get_kind_by_partition(int partition,
|
||||
memkind_t *kind));
|
||||
|
||||
enum memkind_base_partition {
|
||||
MEMKIND_PARTITION_DEFAULT = 0,
|
||||
MEMKIND_PARTITION_HBW = 1,
|
||||
MEMKIND_PARTITION_HBW_HUGETLB = 2,
|
||||
MEMKIND_PARTITION_HBW_PREFERRED = 3,
|
||||
MEMKIND_PARTITION_HBW_PREFERRED_HUGETLB = 4,
|
||||
MEMKIND_PARTITION_HUGETLB = 5,
|
||||
MEMKIND_PARTITION_HBW_GBTLB = 6,
|
||||
MEMKIND_PARTITION_HBW_PREFERRED_GBTLB = 7,
|
||||
MEMKIND_PARTITION_GBTLB = 8,
|
||||
MEMKIND_PARTITION_HBW_INTERLEAVE = 9,
|
||||
MEMKIND_PARTITION_INTERLEAVE = 10,
|
||||
MEMKIND_PARTITION_REGULAR = 11,
|
||||
MEMKIND_PARTITION_HBW_ALL = 12,
|
||||
MEMKIND_PARTITION_HBW_ALL_HUGETLB = 13,
|
||||
MEMKIND_NUM_BASE_KIND
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
+201
@@ -0,0 +1,201 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Intel Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <exception>
|
||||
#include <type_traits>
|
||||
#include <atomic>
|
||||
#include <cstddef>
|
||||
|
||||
#include "memkind.h"
|
||||
|
||||
/*
|
||||
* Header file for the C++ allocator compatible with the C++ standard library allocator concepts.
|
||||
* More details in pmemallocator(3) man page.
|
||||
* Note: memory heap management is based on memkind_malloc, refer to the memkind(3) man page for more
|
||||
* information.
|
||||
*
|
||||
* Functionality defined in this header is considered as EXPERIMENTAL API.
|
||||
* API standards are described in memkind(3) man page.
|
||||
*/
|
||||
namespace pmem
|
||||
{
|
||||
namespace internal
|
||||
{
|
||||
class kind_wrapper_t
|
||||
{
|
||||
public:
|
||||
kind_wrapper_t(const char *dir, std::size_t max_size)
|
||||
{
|
||||
int err_c = memkind_create_pmem(dir, max_size, &kind);
|
||||
if (err_c) {
|
||||
throw std::runtime_error(
|
||||
std::string("An error occured while creating pmem kind; error code: ") +
|
||||
std::to_string(err_c));
|
||||
}
|
||||
}
|
||||
|
||||
kind_wrapper_t(const kind_wrapper_t &) = delete;
|
||||
void operator=(const kind_wrapper_t &) = delete;
|
||||
|
||||
~kind_wrapper_t()
|
||||
{
|
||||
memkind_destroy_kind(kind);
|
||||
}
|
||||
|
||||
memkind_t get() const
|
||||
{
|
||||
return kind;
|
||||
}
|
||||
|
||||
private:
|
||||
memkind_t kind;
|
||||
};
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
class allocator
|
||||
{
|
||||
using kind_wrapper_t = internal::kind_wrapper_t;
|
||||
std::shared_ptr<kind_wrapper_t> kind_wrapper_ptr;
|
||||
public:
|
||||
using value_type = T;
|
||||
using pointer = value_type*;
|
||||
using const_pointer = const value_type*;
|
||||
using reference = value_type&;
|
||||
using const_reference = const value_type&;
|
||||
using size_type = size_t;
|
||||
using difference_type = ptrdiff_t;
|
||||
|
||||
template<class U>
|
||||
struct rebind {
|
||||
using other = allocator<U>;
|
||||
};
|
||||
|
||||
template<typename U>
|
||||
friend class allocator;
|
||||
|
||||
#ifndef _GLIBCXX_USE_CXX11_ABI
|
||||
/* This is a workaround for compilers (e.g GCC 4.8) that uses C++11 standard,
|
||||
* but use old - non C++11 ABI */
|
||||
template<typename V = void>
|
||||
explicit allocator()
|
||||
{
|
||||
static_assert(std::is_same<V, void>::value,
|
||||
"pmem::allocator cannot be compiled without CXX11 ABI");
|
||||
}
|
||||
#endif
|
||||
|
||||
explicit allocator(const char *dir, size_t max_size) :
|
||||
kind_wrapper_ptr(std::make_shared<kind_wrapper_t>(dir, max_size))
|
||||
{
|
||||
}
|
||||
|
||||
explicit allocator(const std::string &dir, size_t max_size) :
|
||||
allocator(dir.c_str(), max_size)
|
||||
{
|
||||
}
|
||||
|
||||
allocator(const allocator &other) = default;
|
||||
|
||||
template <typename U>
|
||||
allocator(const allocator<U> &other) noexcept : kind_wrapper_ptr(
|
||||
other.kind_wrapper_ptr)
|
||||
{
|
||||
}
|
||||
|
||||
allocator(allocator &&other) = default;
|
||||
|
||||
template <typename U>
|
||||
allocator(allocator<U> &&other) noexcept :
|
||||
kind_wrapper_ptr(std::move(other.kind_wrapper_ptr))
|
||||
{
|
||||
}
|
||||
|
||||
allocator<T> &operator = (const allocator &other) = default;
|
||||
|
||||
template <typename U>
|
||||
allocator<T> &operator = (const allocator<U> &other) noexcept
|
||||
{
|
||||
kind_wrapper_ptr = other.kind_wrapper_ptr;
|
||||
return *this;
|
||||
}
|
||||
|
||||
allocator<T> &operator = (allocator &&other) = default;
|
||||
|
||||
template <typename U>
|
||||
allocator<T> &operator = (allocator<U> &&other) noexcept
|
||||
{
|
||||
kind_wrapper_ptr = std::move(other.kind_wrapper_ptr);
|
||||
return *this;
|
||||
}
|
||||
|
||||
pointer allocate(size_type n) const
|
||||
{
|
||||
pointer result = static_cast<pointer>(memkind_malloc(kind_wrapper_ptr->get(),
|
||||
n*sizeof(T)));
|
||||
if (!result) {
|
||||
throw std::bad_alloc();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void deallocate(pointer p, size_type n) const
|
||||
{
|
||||
memkind_free(kind_wrapper_ptr->get(), static_cast<void *>(p));
|
||||
}
|
||||
|
||||
template <class U, class... Args>
|
||||
void construct(U *p, Args &&... args) const
|
||||
{
|
||||
::new((void *)p) U(std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
void destroy(pointer p) const
|
||||
{
|
||||
p->~value_type();
|
||||
}
|
||||
|
||||
template <typename U, typename V>
|
||||
friend bool operator ==(const allocator<U> &lhs, const allocator<V> &rhs);
|
||||
|
||||
template <typename U, typename V>
|
||||
friend bool operator !=(const allocator<U> &lhs, const allocator<V> &rhs);
|
||||
};
|
||||
|
||||
template <typename U, typename V>
|
||||
bool operator ==(const allocator<U> &lhs, const allocator<V> &rhs)
|
||||
{
|
||||
return lhs.kind_wrapper_ptr->get() == rhs.kind_wrapper_ptr->get();
|
||||
}
|
||||
|
||||
template <typename U, typename V>
|
||||
bool operator !=(const allocator<U> &lhs, const allocator<V> &rhs)
|
||||
{
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2018 Intel Corporation.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright notice(s),
|
||||
# this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
set -ex
|
||||
curl -SL https://sourceforge.net/projects/astyle/files/astyle/astyle%203.1/astyle_3.1_linux.tar.gz -o /tmp/astyle.tar.gz
|
||||
tar -xzvf /tmp/astyle.tar.gz -C /tmp/
|
||||
echo "Install astyle"
|
||||
cd /tmp/astyle/build/gcc
|
||||
make
|
||||
sudo make install
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
version: '{build}'
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- MSYSTEM: MINGW64
|
||||
CPU: x86_64
|
||||
MSVC: amd64
|
||||
- MSYSTEM: MINGW32
|
||||
CPU: i686
|
||||
MSVC: x86
|
||||
- MSYSTEM: MINGW64
|
||||
CPU: x86_64
|
||||
- MSYSTEM: MINGW32
|
||||
CPU: i686
|
||||
- MSYSTEM: MINGW64
|
||||
CPU: x86_64
|
||||
MSVC: amd64
|
||||
CONFIG_FLAGS: --enable-debug
|
||||
- MSYSTEM: MINGW32
|
||||
CPU: i686
|
||||
MSVC: x86
|
||||
CONFIG_FLAGS: --enable-debug
|
||||
- MSYSTEM: MINGW64
|
||||
CPU: x86_64
|
||||
CONFIG_FLAGS: --enable-debug
|
||||
- MSYSTEM: MINGW32
|
||||
CPU: i686
|
||||
CONFIG_FLAGS: --enable-debug
|
||||
|
||||
install:
|
||||
- set PATH=c:\msys64\%MSYSTEM%\bin;c:\msys64\usr\bin;%PATH%
|
||||
- if defined MSVC call "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %MSVC%
|
||||
- if defined MSVC pacman --noconfirm -Rsc mingw-w64-%CPU%-gcc gcc
|
||||
- pacman --noconfirm -Suy mingw-w64-%CPU%-make
|
||||
|
||||
build_script:
|
||||
- bash -c "autoconf"
|
||||
- bash -c "./configure $CONFIG_FLAGS"
|
||||
- mingw32-make
|
||||
- file lib/jemalloc.dll
|
||||
- mingw32-make tests
|
||||
- mingw32-make -k check
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
begin-language: "Autoconf-without-aclocal-m4"
|
||||
args: --no-cache
|
||||
end-language: "Autoconf-without-aclocal-m4"
|
||||
@@ -0,0 +1 @@
|
||||
* text=auto eol=lf
|
||||
@@ -0,0 +1,91 @@
|
||||
/bin/jemalloc-config
|
||||
/bin/jemalloc.sh
|
||||
/bin/jeprof
|
||||
|
||||
/config.stamp
|
||||
/config.log
|
||||
/config.status
|
||||
/configure
|
||||
|
||||
/doc/html.xsl
|
||||
/doc/manpages.xsl
|
||||
/doc/jemalloc.xml
|
||||
/doc/jemalloc.html
|
||||
/doc/jemalloc.3
|
||||
|
||||
/jemalloc.pc
|
||||
|
||||
/lib/
|
||||
|
||||
/Makefile
|
||||
|
||||
/include/jemalloc/internal/jemalloc_preamble.h
|
||||
/include/jemalloc/internal/jemalloc_internal_defs.h
|
||||
/include/jemalloc/internal/private_namespace.gen.h
|
||||
/include/jemalloc/internal/private_namespace.h
|
||||
/include/jemalloc/internal/private_namespace_jet.gen.h
|
||||
/include/jemalloc/internal/private_namespace_jet.h
|
||||
/include/jemalloc/internal/private_symbols.awk
|
||||
/include/jemalloc/internal/private_symbols_jet.awk
|
||||
/include/jemalloc/internal/public_namespace.h
|
||||
/include/jemalloc/internal/public_symbols.txt
|
||||
/include/jemalloc/internal/public_unnamespace.h
|
||||
/include/jemalloc/internal/size_classes.h
|
||||
/include/jemalloc/jemalloc.h
|
||||
/include/jemalloc/jemalloc_defs.h
|
||||
/include/jemalloc/jemalloc_macros.h
|
||||
/include/jemalloc/jemalloc_mangle.h
|
||||
/include/jemalloc/jemalloc_mangle_jet.h
|
||||
/include/jemalloc/jemalloc_protos.h
|
||||
/include/jemalloc/jemalloc_protos_jet.h
|
||||
/include/jemalloc/jemalloc_rename.h
|
||||
/include/jemalloc/jemalloc_typedefs.h
|
||||
|
||||
/src/*.[od]
|
||||
/src/*.sym
|
||||
|
||||
/run_tests.out/
|
||||
|
||||
/test/test.sh
|
||||
test/include/test/jemalloc_test.h
|
||||
test/include/test/jemalloc_test_defs.h
|
||||
|
||||
/test/integration/[A-Za-z]*
|
||||
!/test/integration/[A-Za-z]*.*
|
||||
/test/integration/*.[od]
|
||||
/test/integration/*.out
|
||||
|
||||
/test/integration/cpp/[A-Za-z]*
|
||||
!/test/integration/cpp/[A-Za-z]*.*
|
||||
/test/integration/cpp/*.[od]
|
||||
/test/integration/cpp/*.out
|
||||
|
||||
/test/src/*.[od]
|
||||
|
||||
/test/stress/[A-Za-z]*
|
||||
!/test/stress/[A-Za-z]*.*
|
||||
/test/stress/*.[od]
|
||||
/test/stress/*.out
|
||||
|
||||
/test/unit/[A-Za-z]*
|
||||
!/test/unit/[A-Za-z]*.*
|
||||
/test/unit/*.[od]
|
||||
/test/unit/*.out
|
||||
|
||||
/VERSION
|
||||
|
||||
*.pdb
|
||||
*.sdf
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.cachefile
|
||||
*.suo
|
||||
*.user
|
||||
*.sln.docstates
|
||||
*.tmp
|
||||
/msvc/Win32/
|
||||
/msvc/x64/
|
||||
/msvc/projects/*/*/Debug*/
|
||||
/msvc/projects/*/*/Release*/
|
||||
/msvc/projects/*/*/Win32/
|
||||
/msvc/projects/*/*/x64/
|
||||
+155
@@ -0,0 +1,155 @@
|
||||
language: generic
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: osx
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- gcc-multilib
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-prof" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=background_thread:true" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: osx
|
||||
env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: osx
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: osx
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: osx
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: osx
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=clang CXX=clang++ COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- gcc-multilib
|
||||
- os: linux
|
||||
env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-prof" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=background_thread:true" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="--enable-debug" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- gcc-multilib
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="--enable-prof" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- gcc-multilib
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="--disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- gcc-multilib
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="--with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- gcc-multilib
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="--with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- gcc-multilib
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="--with-malloc-conf=percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- gcc-multilib
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="--with-malloc-conf=background_thread:true" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- gcc-multilib
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug --enable-prof" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug --disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug --with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug --with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug --with-malloc-conf=percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug --with-malloc-conf=background_thread:true" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-prof --disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-prof --with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-prof --with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-prof --with-malloc-conf=percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-prof --with-malloc-conf=background_thread:true" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-stats --with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-stats --with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-stats --with-malloc-conf=percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-stats --with-malloc-conf=background_thread:true" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=tcache:false,dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=tcache:false,percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=tcache:false,background_thread:true" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=dss:primary,percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=dss:primary,background_thread:true" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=percpu_arena:percpu,background_thread:true" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
|
||||
|
||||
before_script:
|
||||
- autoconf
|
||||
- ./configure ${COMPILER_FLAGS:+ CC="$CC $COMPILER_FLAGS" CXX="$CXX $COMPILER_FLAGS" } $CONFIGURE_FLAGS
|
||||
- make -j3
|
||||
- make -j3 tests
|
||||
|
||||
script:
|
||||
- make check
|
||||
|
||||
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
Unless otherwise specified, files in the jemalloc source distribution are
|
||||
subject to the following license:
|
||||
--------------------------------------------------------------------------------
|
||||
Copyright (C) 2002-2017 Jason Evans <jasone@canonware.com>.
|
||||
All rights reserved.
|
||||
Copyright (C) 2007-2012 Mozilla Foundation. All rights reserved.
|
||||
Copyright (C) 2009-2017 Facebook, Inc. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
1. Redistributions of source code must retain the above copyright notice(s),
|
||||
this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice(s),
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
|
||||
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
--------------------------------------------------------------------------------
|
||||
Vendored
+1230
File diff suppressed because it is too large.
Load diff
Vendored
+411
@@ -0,0 +1,411 @@
|
||||
Building and installing a packaged release of jemalloc can be as simple as
|
||||
typing the following while in the root directory of the source tree:
|
||||
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
|
||||
If building from unpackaged developer sources, the simplest command sequence
|
||||
that might work is:
|
||||
|
||||
./autogen.sh
|
||||
make dist
|
||||
make
|
||||
make install
|
||||
|
||||
Note that documentation is not built by the default target because doing so
|
||||
would create a dependency on xsltproc in packaged releases, hence the
|
||||
requirement to either run 'make dist' or avoid installing docs via the various
|
||||
install_* targets documented below.
|
||||
|
||||
|
||||
## Advanced configuration
|
||||
|
||||
The 'configure' script supports numerous options that allow control of which
|
||||
functionality is enabled, where jemalloc is installed, etc. Optionally, pass
|
||||
any of the following arguments (not a definitive list) to 'configure':
|
||||
|
||||
* `--help`
|
||||
|
||||
Print a definitive list of options.
|
||||
|
||||
* `--prefix=<install-root-dir>`
|
||||
|
||||
Set the base directory in which to install. For example:
|
||||
|
||||
./configure --prefix=/usr/local
|
||||
|
||||
will cause files to be installed into /usr/local/include, /usr/local/lib,
|
||||
and /usr/local/man.
|
||||
|
||||
* `--with-version=(<major>.<minor>.<bugfix>-<nrev>-g<gid>|VERSION)`
|
||||
|
||||
The VERSION file is mandatory for successful configuration, and the
|
||||
following steps are taken to assure its presence:
|
||||
1) If --with-version=<major>.<minor>.<bugfix>-<nrev>-g<gid> is specified,
|
||||
generate VERSION using the specified value.
|
||||
2) If --with-version is not specified in either form and the source
|
||||
directory is inside a git repository, try to generate VERSION via 'git
|
||||
describe' invocations that pattern-match release tags.
|
||||
3) If VERSION is missing, generate it with a bogus version:
|
||||
0.0.0-0-g0000000000000000000000000000000000000000
|
||||
|
||||
Note that --with-version=VERSION bypasses (1) and (2), which simplifies
|
||||
VERSION configuration when embedding a jemalloc release into another
|
||||
project's git repository.
|
||||
|
||||
* `--with-rpath=<colon-separated-rpath>`
|
||||
|
||||
Embed one or more library paths, so that libjemalloc can find the libraries
|
||||
it is linked to. This works only on ELF-based systems.
|
||||
|
||||
* `--with-mangling=<map>`
|
||||
|
||||
Mangle public symbols specified in <map> which is a comma-separated list of
|
||||
name:mangled pairs.
|
||||
|
||||
For example, to use ld's --wrap option as an alternative method for
|
||||
overriding libc's malloc implementation, specify something like:
|
||||
|
||||
--with-mangling=malloc:__wrap_malloc,free:__wrap_free[...]
|
||||
|
||||
Note that mangling happens prior to application of the prefix specified by
|
||||
--with-jemalloc-prefix, and mangled symbols are then ignored when applying
|
||||
the prefix.
|
||||
|
||||
* `--with-jemalloc-prefix=<prefix>`
|
||||
|
||||
Prefix all public APIs with <prefix>. For example, if <prefix> is
|
||||
"prefix_", API changes like the following occur:
|
||||
|
||||
malloc() --> prefix_malloc()
|
||||
malloc_conf --> prefix_malloc_conf
|
||||
/etc/malloc.conf --> /etc/prefix_malloc.conf
|
||||
MALLOC_CONF --> PREFIX_MALLOC_CONF
|
||||
|
||||
This makes it possible to use jemalloc at the same time as the system
|
||||
allocator, or even to use multiple copies of jemalloc simultaneously.
|
||||
|
||||
By default, the prefix is "", except on OS X, where it is "je_". On OS X,
|
||||
jemalloc overlays the default malloc zone, but makes no attempt to actually
|
||||
replace the "malloc", "calloc", etc. symbols.
|
||||
|
||||
* `--without-export`
|
||||
|
||||
Don't export public APIs. This can be useful when building jemalloc as a
|
||||
static library, or to avoid exporting public APIs when using the zone
|
||||
allocator on OSX.
|
||||
|
||||
* `--with-private-namespace=<prefix>`
|
||||
|
||||
Prefix all library-private APIs with <prefix>je_. For shared libraries,
|
||||
symbol visibility mechanisms prevent these symbols from being exported, but
|
||||
for static libraries, naming collisions are a real possibility. By
|
||||
default, <prefix> is empty, which results in a symbol prefix of je_ .
|
||||
|
||||
* `--with-install-suffix=<suffix>`
|
||||
|
||||
Append <suffix> to the base name of all installed files, such that multiple
|
||||
versions of jemalloc can coexist in the same installation directory. For
|
||||
example, libjemalloc.so.0 becomes libjemalloc<suffix>.so.0.
|
||||
|
||||
* `--with-malloc-conf=<malloc_conf>`
|
||||
|
||||
Embed `<malloc_conf>` as a run-time options string that is processed prior to
|
||||
the malloc_conf global variable, the /etc/malloc.conf symlink, and the
|
||||
MALLOC_CONF environment variable. For example, to change the default decay
|
||||
time to 30 seconds:
|
||||
|
||||
--with-malloc-conf=decay_ms:30000
|
||||
|
||||
* `--enable-debug`
|
||||
|
||||
Enable assertions and validation code. This incurs a substantial
|
||||
performance hit, but is very useful during application development.
|
||||
|
||||
* `--disable-stats`
|
||||
|
||||
Disable statistics gathering functionality. See the "opt.stats_print"
|
||||
option documentation for usage details.
|
||||
|
||||
* `--enable-prof`
|
||||
|
||||
Enable heap profiling and leak detection functionality. See the "opt.prof"
|
||||
option documentation for usage details. When enabled, there are several
|
||||
approaches to backtracing, and the configure script chooses the first one
|
||||
in the following list that appears to function correctly:
|
||||
|
||||
+ libunwind (requires --enable-prof-libunwind)
|
||||
+ libgcc (unless --disable-prof-libgcc)
|
||||
+ gcc intrinsics (unless --disable-prof-gcc)
|
||||
|
||||
* `--enable-prof-libunwind`
|
||||
|
||||
Use the libunwind library (http://www.nongnu.org/libunwind/) for stack
|
||||
backtracing.
|
||||
|
||||
* `--disable-prof-libgcc`
|
||||
|
||||
Disable the use of libgcc's backtracing functionality.
|
||||
|
||||
* `--disable-prof-gcc`
|
||||
|
||||
Disable the use of gcc intrinsics for backtracing.
|
||||
|
||||
* `--with-static-libunwind=<libunwind.a>`
|
||||
|
||||
Statically link against the specified libunwind.a rather than dynamically
|
||||
linking with -lunwind.
|
||||
|
||||
* `--disable-thp`
|
||||
|
||||
Disable transparent huge page (THP) integration. This option can be useful
|
||||
when cross compiling.
|
||||
|
||||
* `--disable-fill`
|
||||
|
||||
Disable support for junk/zero filling of memory. See the "opt.junk" and
|
||||
"opt.zero" option documentation for usage details.
|
||||
|
||||
* `--disable-zone-allocator`
|
||||
|
||||
Disable zone allocator for Darwin. This means jemalloc won't be hooked as
|
||||
the default allocator on OSX/iOS.
|
||||
|
||||
* `--enable-utrace`
|
||||
|
||||
Enable utrace(2)-based allocation tracing. This feature is not broadly
|
||||
portable (FreeBSD has it, but Linux and OS X do not).
|
||||
|
||||
* `--enable-xmalloc`
|
||||
|
||||
Enable support for optional immediate termination due to out-of-memory
|
||||
errors, as is commonly implemented by "xmalloc" wrapper function for malloc.
|
||||
See the "opt.xmalloc" option documentation for usage details.
|
||||
|
||||
* `--enable-lazy-lock`
|
||||
|
||||
Enable code that wraps pthread_create() to detect when an application
|
||||
switches from single-threaded to multi-threaded mode, so that it can avoid
|
||||
mutex locking/unlocking operations while in single-threaded mode. In
|
||||
practice, this feature usually has little impact on performance unless
|
||||
thread-specific caching is disabled.
|
||||
|
||||
* `--disable-cache-oblivious`
|
||||
|
||||
Disable cache-oblivious large allocation alignment for large allocation
|
||||
requests with no alignment constraints. If this feature is disabled, all
|
||||
large allocations are page-aligned as an implementation artifact, which can
|
||||
severely harm CPU cache utilization. However, the cache-oblivious layout
|
||||
comes at the cost of one extra page per large allocation, which in the
|
||||
most extreme case increases physical memory usage for the 16 KiB size class
|
||||
to 20 KiB.
|
||||
|
||||
* `--disable-syscall`
|
||||
|
||||
Disable use of syscall(2) rather than {open,read,write,close}(2). This is
|
||||
intended as a workaround for systems that place security limitations on
|
||||
syscall(2).
|
||||
|
||||
* `--disable-cxx`
|
||||
|
||||
Disable C++ integration. This will cause new and delete operator
|
||||
implementations to be omitted.
|
||||
|
||||
* `--with-xslroot=<path>`
|
||||
|
||||
Specify where to find DocBook XSL stylesheets when building the
|
||||
documentation.
|
||||
|
||||
* `--with-lg-page=<lg-page>`
|
||||
|
||||
Specify the base 2 log of the allocator page size, which must in turn be at
|
||||
least as large as the system page size. By default the configure script
|
||||
determines the host's page size and sets the allocator page size equal to
|
||||
the system page size, so this option need not be specified unless the
|
||||
system page size may change between configuration and execution, e.g. when
|
||||
cross compiling.
|
||||
|
||||
* `--with-lg-page-sizes=<lg-page-sizes>`
|
||||
|
||||
Specify the comma-separated base 2 logs of the page sizes to support. This
|
||||
option may be useful when cross compiling in combination with
|
||||
`--with-lg-page`, but its primary use case is for integration with FreeBSD's
|
||||
libc, wherein jemalloc is embedded.
|
||||
|
||||
* `--with-lg-hugepage=<lg-hugepage>`
|
||||
|
||||
Specify the base 2 log of the system huge page size. This option is useful
|
||||
when cross compiling, or when overriding the default for systems that do
|
||||
not explicitly support huge pages.
|
||||
|
||||
* `--with-lg-quantum=<lg-quantum>`
|
||||
|
||||
Specify the base 2 log of the minimum allocation alignment. jemalloc needs
|
||||
to know the minimum alignment that meets the following C standard
|
||||
requirement (quoted from the April 12, 2011 draft of the C11 standard):
|
||||
|
||||
> The pointer returned if the allocation succeeds is suitably aligned so
|
||||
that it may be assigned to a pointer to any type of object with a
|
||||
fundamental alignment requirement and then used to access such an object
|
||||
or an array of such objects in the space allocated [...]
|
||||
|
||||
This setting is architecture-specific, and although jemalloc includes known
|
||||
safe values for the most commonly used modern architectures, there is a
|
||||
wrinkle related to GNU libc (glibc) that may impact your choice of
|
||||
<lg-quantum>. On most modern architectures, this mandates 16-byte
|
||||
alignment (<lg-quantum>=4), but the glibc developers chose not to meet this
|
||||
requirement for performance reasons. An old discussion can be found at
|
||||
<https://sourceware.org/bugzilla/show_bug.cgi?id=206> . Unlike glibc,
|
||||
jemalloc does follow the C standard by default (caveat: jemalloc
|
||||
technically cheats for size classes smaller than the quantum), but the fact
|
||||
that Linux systems already work around this allocator noncompliance means
|
||||
that it is generally safe in practice to let jemalloc's minimum alignment
|
||||
follow glibc's lead. If you specify `--with-lg-quantum=3` during
|
||||
configuration, jemalloc will provide additional size classes that are not
|
||||
16-byte-aligned (24, 40, and 56).
|
||||
|
||||
The following environment variables (not a definitive list) impact configure's
|
||||
behavior:
|
||||
|
||||
* `CFLAGS="?"`
|
||||
* `CXXFLAGS="?"`
|
||||
|
||||
Pass these flags to the C/C++ compiler. Any flags set by the configure
|
||||
script are prepended, which means explicitly set flags generally take
|
||||
precedence. Take care when specifying flags such as -Werror, because
|
||||
configure tests may be affected in undesirable ways.
|
||||
|
||||
* `EXTRA_CFLAGS="?"`
|
||||
* `EXTRA_CXXFLAGS="?"`
|
||||
|
||||
Append these flags to CFLAGS/CXXFLAGS, without passing them to the
|
||||
compiler(s) during configuration. This makes it possible to add flags such
|
||||
as -Werror, while allowing the configure script to determine what other
|
||||
flags are appropriate for the specified configuration.
|
||||
|
||||
* `CPPFLAGS="?"`
|
||||
|
||||
Pass these flags to the C preprocessor. Note that CFLAGS is not passed to
|
||||
'cpp' when 'configure' is looking for include files, so you must use
|
||||
CPPFLAGS instead if you need to help 'configure' find header files.
|
||||
|
||||
* `LD_LIBRARY_PATH="?"`
|
||||
|
||||
'ld' uses this colon-separated list to find libraries.
|
||||
|
||||
* `LDFLAGS="?"`
|
||||
|
||||
Pass these flags when linking.
|
||||
|
||||
* `PATH="?"`
|
||||
|
||||
'configure' uses this to find programs.
|
||||
|
||||
In some cases it may be necessary to work around configuration results that do
|
||||
not match reality. For example, Linux 4.5 added support for the MADV_FREE flag
|
||||
to madvise(2), which can cause problems if building on a host with MADV_FREE
|
||||
support and deploying to a target without. To work around this, use a cache
|
||||
file to override the relevant configuration variable defined in configure.ac,
|
||||
e.g.:
|
||||
|
||||
echo "je_cv_madv_free=no" > config.cache && ./configure -C
|
||||
|
||||
|
||||
## Advanced compilation
|
||||
|
||||
To build only parts of jemalloc, use the following targets:
|
||||
|
||||
build_lib_shared
|
||||
build_lib_static
|
||||
build_lib
|
||||
build_doc_html
|
||||
build_doc_man
|
||||
build_doc
|
||||
|
||||
To install only parts of jemalloc, use the following targets:
|
||||
|
||||
install_bin
|
||||
install_include
|
||||
install_lib_shared
|
||||
install_lib_static
|
||||
install_lib
|
||||
install_doc_html
|
||||
install_doc_man
|
||||
install_doc
|
||||
|
||||
To clean up build results to varying degrees, use the following make targets:
|
||||
|
||||
clean
|
||||
distclean
|
||||
relclean
|
||||
|
||||
|
||||
## Advanced installation
|
||||
|
||||
Optionally, define make variables when invoking make, including (not
|
||||
exclusively):
|
||||
|
||||
* `INCLUDEDIR="?"`
|
||||
|
||||
Use this as the installation prefix for header files.
|
||||
|
||||
* `LIBDIR="?"`
|
||||
|
||||
Use this as the installation prefix for libraries.
|
||||
|
||||
* `MANDIR="?"`
|
||||
|
||||
Use this as the installation prefix for man pages.
|
||||
|
||||
* `DESTDIR="?"`
|
||||
|
||||
Prepend DESTDIR to INCLUDEDIR, LIBDIR, DATADIR, and MANDIR. This is useful
|
||||
when installing to a different path than was specified via --prefix.
|
||||
|
||||
* `CC="?"`
|
||||
|
||||
Use this to invoke the C compiler.
|
||||
|
||||
* `CFLAGS="?"`
|
||||
|
||||
Pass these flags to the compiler.
|
||||
|
||||
* `CPPFLAGS="?"`
|
||||
|
||||
Pass these flags to the C preprocessor.
|
||||
|
||||
* `LDFLAGS="?"`
|
||||
|
||||
Pass these flags when linking.
|
||||
|
||||
* `PATH="?"`
|
||||
|
||||
Use this to search for programs used during configuration and building.
|
||||
|
||||
|
||||
## Development
|
||||
|
||||
If you intend to make non-trivial changes to jemalloc, use the 'autogen.sh'
|
||||
script rather than 'configure'. This re-generates 'configure', enables
|
||||
configuration dependency rules, and enables re-generation of automatically
|
||||
generated source files.
|
||||
|
||||
The build system supports using an object directory separate from the source
|
||||
tree. For example, you can create an 'obj' directory, and from within that
|
||||
directory, issue configuration and build commands:
|
||||
|
||||
autoconf
|
||||
mkdir obj
|
||||
cd obj
|
||||
../configure --enable-autogen
|
||||
make
|
||||
|
||||
|
||||
## Documentation
|
||||
|
||||
The manual page is generated in both html and roff formats. Any web browser
|
||||
can be used to view the html manual. The roff manual page can be formatted
|
||||
prior to installation via the following command:
|
||||
|
||||
nroff -man -t doc/jemalloc.3
|
||||
+563
@@ -0,0 +1,563 @@
|
||||
# Clear out all vpaths, then set just one (default vpath) for the main build
|
||||
# directory.
|
||||
vpath
|
||||
vpath % .
|
||||
|
||||
# Clear the default suffixes, so that built-in rules are not used.
|
||||
.SUFFIXES :
|
||||
|
||||
SHELL := /bin/sh
|
||||
|
||||
CC := @CC@
|
||||
CXX := @CXX@
|
||||
|
||||
# Configuration parameters.
|
||||
DESTDIR =
|
||||
BINDIR := $(DESTDIR)@BINDIR@
|
||||
INCLUDEDIR := $(DESTDIR)@INCLUDEDIR@
|
||||
LIBDIR := $(DESTDIR)@LIBDIR@
|
||||
DATADIR := $(DESTDIR)@DATADIR@
|
||||
MANDIR := $(DESTDIR)@MANDIR@
|
||||
srcroot := @srcroot@
|
||||
objroot := @objroot@
|
||||
abs_srcroot := @abs_srcroot@
|
||||
abs_objroot := @abs_objroot@
|
||||
|
||||
# Build parameters.
|
||||
CPPFLAGS := @CPPFLAGS@ -I$(srcroot)include -I$(objroot)include
|
||||
CONFIGURE_CFLAGS := @CONFIGURE_CFLAGS@
|
||||
SPECIFIED_CFLAGS := @SPECIFIED_CFLAGS@
|
||||
EXTRA_CFLAGS := @EXTRA_CFLAGS@
|
||||
CFLAGS := $(strip $(CONFIGURE_CFLAGS) $(SPECIFIED_CFLAGS) $(EXTRA_CFLAGS))
|
||||
CONFIGURE_CXXFLAGS := @CONFIGURE_CXXFLAGS@
|
||||
SPECIFIED_CXXFLAGS := @SPECIFIED_CXXFLAGS@
|
||||
EXTRA_CXXFLAGS := @EXTRA_CXXFLAGS@
|
||||
CXXFLAGS := $(strip $(CONFIGURE_CXXFLAGS) $(SPECIFIED_CXXFLAGS) $(EXTRA_CXXFLAGS))
|
||||
LDFLAGS := @LDFLAGS@
|
||||
EXTRA_LDFLAGS := @EXTRA_LDFLAGS@
|
||||
LIBS := @LIBS@
|
||||
RPATH_EXTRA := @RPATH_EXTRA@
|
||||
SO := @so@
|
||||
IMPORTLIB := @importlib@
|
||||
O := @o@
|
||||
A := @a@
|
||||
EXE := @exe@
|
||||
LIBPREFIX := @libprefix@
|
||||
REV := @rev@
|
||||
install_suffix := @install_suffix@
|
||||
ABI := @abi@
|
||||
XSLTPROC := @XSLTPROC@
|
||||
AUTOCONF := @AUTOCONF@
|
||||
_RPATH = @RPATH@
|
||||
RPATH = $(if $(1),$(call _RPATH,$(1)))
|
||||
cfghdrs_in := $(addprefix $(srcroot),@cfghdrs_in@)
|
||||
cfghdrs_out := @cfghdrs_out@
|
||||
cfgoutputs_in := $(addprefix $(srcroot),@cfgoutputs_in@)
|
||||
cfgoutputs_out := @cfgoutputs_out@
|
||||
enable_autogen := @enable_autogen@
|
||||
enable_prof := @enable_prof@
|
||||
enable_zone_allocator := @enable_zone_allocator@
|
||||
MALLOC_CONF := @JEMALLOC_CPREFIX@MALLOC_CONF
|
||||
link_whole_archive := @link_whole_archive@
|
||||
DSO_LDFLAGS = @DSO_LDFLAGS@
|
||||
SOREV = @SOREV@
|
||||
PIC_CFLAGS = @PIC_CFLAGS@
|
||||
CTARGET = @CTARGET@
|
||||
LDTARGET = @LDTARGET@
|
||||
TEST_LD_MODE = @TEST_LD_MODE@
|
||||
MKLIB = @MKLIB@
|
||||
AR = @AR@
|
||||
ARFLAGS = @ARFLAGS@
|
||||
DUMP_SYMS = @DUMP_SYMS@
|
||||
AWK := @AWK@
|
||||
CC_MM = @CC_MM@
|
||||
LM := @LM@
|
||||
INSTALL = @INSTALL@
|
||||
|
||||
ifeq (macho, $(ABI))
|
||||
TEST_LIBRARY_PATH := DYLD_FALLBACK_LIBRARY_PATH="$(objroot)lib"
|
||||
else
|
||||
ifeq (pecoff, $(ABI))
|
||||
TEST_LIBRARY_PATH := PATH="$(PATH):$(objroot)lib"
|
||||
else
|
||||
TEST_LIBRARY_PATH :=
|
||||
endif
|
||||
endif
|
||||
|
||||
LIBJEMALLOC := $(LIBPREFIX)jemalloc$(install_suffix)
|
||||
|
||||
# Lists of files.
|
||||
BINS := $(objroot)bin/jemalloc-config $(objroot)bin/jemalloc.sh $(objroot)bin/jeprof
|
||||
C_HDRS := $(objroot)include/jemalloc/jemalloc$(install_suffix).h
|
||||
C_SRCS := $(srcroot)src/jemalloc.c \
|
||||
$(srcroot)src/arena.c \
|
||||
$(srcroot)src/background_thread.c \
|
||||
$(srcroot)src/base.c \
|
||||
$(srcroot)src/bitmap.c \
|
||||
$(srcroot)src/ckh.c \
|
||||
$(srcroot)src/ctl.c \
|
||||
$(srcroot)src/extent.c \
|
||||
$(srcroot)src/extent_dss.c \
|
||||
$(srcroot)src/extent_mmap.c \
|
||||
$(srcroot)src/hash.c \
|
||||
$(srcroot)src/hooks.c \
|
||||
$(srcroot)src/large.c \
|
||||
$(srcroot)src/malloc_io.c \
|
||||
$(srcroot)src/mutex.c \
|
||||
$(srcroot)src/mutex_pool.c \
|
||||
$(srcroot)src/nstime.c \
|
||||
$(srcroot)src/pages.c \
|
||||
$(srcroot)src/prng.c \
|
||||
$(srcroot)src/prof.c \
|
||||
$(srcroot)src/rtree.c \
|
||||
$(srcroot)src/stats.c \
|
||||
$(srcroot)src/spin.c \
|
||||
$(srcroot)src/sz.c \
|
||||
$(srcroot)src/tcache.c \
|
||||
$(srcroot)src/ticker.c \
|
||||
$(srcroot)src/tsd.c \
|
||||
$(srcroot)src/witness.c
|
||||
ifeq ($(enable_zone_allocator), 1)
|
||||
C_SRCS += $(srcroot)src/zone.c
|
||||
endif
|
||||
ifeq ($(IMPORTLIB),$(SO))
|
||||
STATIC_LIBS := $(objroot)lib/$(LIBJEMALLOC).$(A)
|
||||
endif
|
||||
ifdef PIC_CFLAGS
|
||||
STATIC_LIBS += $(objroot)lib/$(LIBJEMALLOC)_pic.$(A)
|
||||
else
|
||||
STATIC_LIBS += $(objroot)lib/$(LIBJEMALLOC)_s.$(A)
|
||||
endif
|
||||
DSOS := $(objroot)lib/$(LIBJEMALLOC).$(SOREV)
|
||||
ifneq ($(SOREV),$(SO))
|
||||
DSOS += $(objroot)lib/$(LIBJEMALLOC).$(SO)
|
||||
endif
|
||||
ifeq (1, $(link_whole_archive))
|
||||
LJEMALLOC := -Wl,--whole-archive -L$(objroot)lib -l$(LIBJEMALLOC) -Wl,--no-whole-archive
|
||||
else
|
||||
LJEMALLOC := $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB)
|
||||
endif
|
||||
PC := $(objroot)jemalloc.pc
|
||||
MAN3 := $(objroot)doc/jemalloc$(install_suffix).3
|
||||
DOCS_XML := $(objroot)doc/jemalloc$(install_suffix).xml
|
||||
DOCS_HTML := $(DOCS_XML:$(objroot)%.xml=$(objroot)%.html)
|
||||
DOCS_MAN3 := $(DOCS_XML:$(objroot)%.xml=$(objroot)%.3)
|
||||
DOCS := $(DOCS_HTML) $(DOCS_MAN3)
|
||||
C_TESTLIB_SRCS := $(srcroot)test/src/btalloc.c $(srcroot)test/src/btalloc_0.c \
|
||||
$(srcroot)test/src/btalloc_1.c $(srcroot)test/src/math.c \
|
||||
$(srcroot)test/src/mtx.c $(srcroot)test/src/mq.c \
|
||||
$(srcroot)test/src/SFMT.c $(srcroot)test/src/test.c \
|
||||
$(srcroot)test/src/thd.c $(srcroot)test/src/timer.c
|
||||
ifeq (1, $(link_whole_archive))
|
||||
C_UTIL_INTEGRATION_SRCS :=
|
||||
C_UTIL_CPP_SRCS :=
|
||||
else
|
||||
C_UTIL_INTEGRATION_SRCS := $(srcroot)src/nstime.c $(srcroot)src/malloc_io.c
|
||||
C_UTIL_CPP_SRCS := $(srcroot)src/nstime.c $(srcroot)src/malloc_io.c
|
||||
endif
|
||||
TESTS_UNIT := \
|
||||
$(srcroot)test/unit/a0.c \
|
||||
$(srcroot)test/unit/arena_reset.c \
|
||||
$(srcroot)test/unit/atomic.c \
|
||||
$(srcroot)test/unit/background_thread.c \
|
||||
$(srcroot)test/unit/base.c \
|
||||
$(srcroot)test/unit/bitmap.c \
|
||||
$(srcroot)test/unit/ckh.c \
|
||||
$(srcroot)test/unit/decay.c \
|
||||
$(srcroot)test/unit/extent_quantize.c \
|
||||
$(srcroot)test/unit/fork.c \
|
||||
$(srcroot)test/unit/hash.c \
|
||||
$(srcroot)test/unit/hooks.c \
|
||||
$(srcroot)test/unit/junk.c \
|
||||
$(srcroot)test/unit/junk_alloc.c \
|
||||
$(srcroot)test/unit/junk_free.c \
|
||||
$(srcroot)test/unit/mallctl.c \
|
||||
$(srcroot)test/unit/malloc_io.c \
|
||||
$(srcroot)test/unit/math.c \
|
||||
$(srcroot)test/unit/mq.c \
|
||||
$(srcroot)test/unit/mtx.c \
|
||||
$(srcroot)test/unit/pack.c \
|
||||
$(srcroot)test/unit/pages.c \
|
||||
$(srcroot)test/unit/ph.c \
|
||||
$(srcroot)test/unit/prng.c \
|
||||
$(srcroot)test/unit/prof_accum.c \
|
||||
$(srcroot)test/unit/prof_active.c \
|
||||
$(srcroot)test/unit/prof_gdump.c \
|
||||
$(srcroot)test/unit/prof_idump.c \
|
||||
$(srcroot)test/unit/prof_reset.c \
|
||||
$(srcroot)test/unit/prof_tctx.c \
|
||||
$(srcroot)test/unit/prof_thread_name.c \
|
||||
$(srcroot)test/unit/ql.c \
|
||||
$(srcroot)test/unit/qr.c \
|
||||
$(srcroot)test/unit/rb.c \
|
||||
$(srcroot)test/unit/retained.c \
|
||||
$(srcroot)test/unit/rtree.c \
|
||||
$(srcroot)test/unit/SFMT.c \
|
||||
$(srcroot)test/unit/size_classes.c \
|
||||
$(srcroot)test/unit/slab.c \
|
||||
$(srcroot)test/unit/smoothstep.c \
|
||||
$(srcroot)test/unit/spin.c \
|
||||
$(srcroot)test/unit/stats.c \
|
||||
$(srcroot)test/unit/stats_print.c \
|
||||
$(srcroot)test/unit/ticker.c \
|
||||
$(srcroot)test/unit/nstime.c \
|
||||
$(srcroot)test/unit/tsd.c \
|
||||
$(srcroot)test/unit/witness.c \
|
||||
$(srcroot)test/unit/zero.c
|
||||
ifeq (@enable_prof@, 1)
|
||||
TESTS_UNIT += \
|
||||
$(srcroot)test/unit/arena_reset_prof.c
|
||||
endif
|
||||
TESTS_INTEGRATION := $(srcroot)test/integration/aligned_alloc.c \
|
||||
$(srcroot)test/integration/allocated.c \
|
||||
$(srcroot)test/integration/extent.c \
|
||||
$(srcroot)test/integration/mallocx.c \
|
||||
$(srcroot)test/integration/MALLOCX_ARENA.c \
|
||||
$(srcroot)test/integration/overflow.c \
|
||||
$(srcroot)test/integration/posix_memalign.c \
|
||||
$(srcroot)test/integration/rallocx.c \
|
||||
$(srcroot)test/integration/sdallocx.c \
|
||||
$(srcroot)test/integration/thread_arena.c \
|
||||
$(srcroot)test/integration/thread_tcache_enabled.c \
|
||||
$(srcroot)test/integration/xallocx.c
|
||||
ifeq (@enable_cxx@, 1)
|
||||
CPP_SRCS := $(srcroot)src/jemalloc_cpp.cpp
|
||||
TESTS_INTEGRATION_CPP := $(srcroot)test/integration/cpp/basic.cpp
|
||||
else
|
||||
CPP_SRCS :=
|
||||
TESTS_INTEGRATION_CPP :=
|
||||
endif
|
||||
TESTS_STRESS := $(srcroot)test/stress/microbench.c
|
||||
|
||||
TESTS := $(TESTS_UNIT) $(TESTS_INTEGRATION) $(TESTS_INTEGRATION_CPP) $(TESTS_STRESS)
|
||||
|
||||
PRIVATE_NAMESPACE_HDRS := $(objroot)include/jemalloc/internal/private_namespace.h $(objroot)include/jemalloc/internal/private_namespace_jet.h
|
||||
PRIVATE_NAMESPACE_GEN_HDRS := $(PRIVATE_NAMESPACE_HDRS:%.h=%.gen.h)
|
||||
C_SYM_OBJS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.sym.$(O))
|
||||
C_SYMS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.sym)
|
||||
C_OBJS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.$(O))
|
||||
CPP_OBJS := $(CPP_SRCS:$(srcroot)%.cpp=$(objroot)%.$(O))
|
||||
C_PIC_OBJS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.pic.$(O))
|
||||
CPP_PIC_OBJS := $(CPP_SRCS:$(srcroot)%.cpp=$(objroot)%.pic.$(O))
|
||||
C_JET_SYM_OBJS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.jet.sym.$(O))
|
||||
C_JET_SYMS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.jet.sym)
|
||||
C_JET_OBJS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.jet.$(O))
|
||||
C_TESTLIB_UNIT_OBJS := $(C_TESTLIB_SRCS:$(srcroot)%.c=$(objroot)%.unit.$(O))
|
||||
C_TESTLIB_INTEGRATION_OBJS := $(C_TESTLIB_SRCS:$(srcroot)%.c=$(objroot)%.integration.$(O))
|
||||
C_UTIL_INTEGRATION_OBJS := $(C_UTIL_INTEGRATION_SRCS:$(srcroot)%.c=$(objroot)%.integration.$(O))
|
||||
C_TESTLIB_STRESS_OBJS := $(C_TESTLIB_SRCS:$(srcroot)%.c=$(objroot)%.stress.$(O))
|
||||
C_TESTLIB_OBJS := $(C_TESTLIB_UNIT_OBJS) $(C_TESTLIB_INTEGRATION_OBJS) $(C_UTIL_INTEGRATION_OBJS) $(C_TESTLIB_STRESS_OBJS)
|
||||
|
||||
TESTS_UNIT_OBJS := $(TESTS_UNIT:$(srcroot)%.c=$(objroot)%.$(O))
|
||||
TESTS_INTEGRATION_OBJS := $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%.$(O))
|
||||
TESTS_INTEGRATION_CPP_OBJS := $(TESTS_INTEGRATION_CPP:$(srcroot)%.cpp=$(objroot)%.$(O))
|
||||
TESTS_STRESS_OBJS := $(TESTS_STRESS:$(srcroot)%.c=$(objroot)%.$(O))
|
||||
TESTS_OBJS := $(TESTS_UNIT_OBJS) $(TESTS_INTEGRATION_OBJS) $(TESTS_STRESS_OBJS)
|
||||
TESTS_CPP_OBJS := $(TESTS_INTEGRATION_CPP_OBJS)
|
||||
|
||||
.PHONY: all dist build_doc_html build_doc_man build_doc
|
||||
.PHONY: install_bin install_include install_lib
|
||||
.PHONY: install_doc_html install_doc_man install_doc install
|
||||
.PHONY: tests check clean distclean relclean
|
||||
|
||||
.SECONDARY : $(PRIVATE_NAMESPACE_GEN_HDRS) $(TESTS_OBJS) $(TESTS_CPP_OBJS)
|
||||
|
||||
# Default target.
|
||||
all: build_lib
|
||||
|
||||
dist: build_doc
|
||||
|
||||
$(objroot)doc/%.html : $(objroot)doc/%.xml $(srcroot)doc/stylesheet.xsl $(objroot)doc/html.xsl
|
||||
$(XSLTPROC) -o $@ $(objroot)doc/html.xsl $<
|
||||
|
||||
$(objroot)doc/%.3 : $(objroot)doc/%.xml $(srcroot)doc/stylesheet.xsl $(objroot)doc/manpages.xsl
|
||||
$(XSLTPROC) -o $@ $(objroot)doc/manpages.xsl $<
|
||||
|
||||
build_doc_html: $(DOCS_HTML)
|
||||
build_doc_man: $(DOCS_MAN3)
|
||||
build_doc: $(DOCS)
|
||||
|
||||
#
|
||||
# Include generated dependency files.
|
||||
#
|
||||
ifdef CC_MM
|
||||
-include $(C_SYM_OBJS:%.$(O)=%.d)
|
||||
-include $(C_OBJS:%.$(O)=%.d)
|
||||
-include $(CPP_OBJS:%.$(O)=%.d)
|
||||
-include $(C_PIC_OBJS:%.$(O)=%.d)
|
||||
-include $(CPP_PIC_OBJS:%.$(O)=%.d)
|
||||
-include $(C_JET_SYM_OBJS:%.$(O)=%.d)
|
||||
-include $(C_JET_OBJS:%.$(O)=%.d)
|
||||
-include $(C_TESTLIB_OBJS:%.$(O)=%.d)
|
||||
-include $(TESTS_OBJS:%.$(O)=%.d)
|
||||
-include $(TESTS_CPP_OBJS:%.$(O)=%.d)
|
||||
endif
|
||||
|
||||
$(C_SYM_OBJS): $(objroot)src/%.sym.$(O): $(srcroot)src/%.c
|
||||
$(C_SYM_OBJS): CPPFLAGS += -DJEMALLOC_NO_PRIVATE_NAMESPACE
|
||||
$(C_SYMS): $(objroot)src/%.sym: $(objroot)src/%.sym.$(O)
|
||||
$(C_OBJS): $(objroot)src/%.$(O): $(srcroot)src/%.c
|
||||
$(CPP_OBJS): $(objroot)src/%.$(O): $(srcroot)src/%.cpp
|
||||
$(C_PIC_OBJS): $(objroot)src/%.pic.$(O): $(srcroot)src/%.c
|
||||
$(C_PIC_OBJS): CFLAGS += $(PIC_CFLAGS)
|
||||
$(CPP_PIC_OBJS): $(objroot)src/%.pic.$(O): $(srcroot)src/%.cpp
|
||||
$(CPP_PIC_OBJS): CXXFLAGS += $(PIC_CFLAGS)
|
||||
$(C_JET_SYM_OBJS): $(objroot)src/%.jet.sym.$(O): $(srcroot)src/%.c
|
||||
$(C_JET_SYM_OBJS): CPPFLAGS += -DJEMALLOC_JET -DJEMALLOC_NO_PRIVATE_NAMESPACE
|
||||
$(C_JET_SYMS): $(objroot)src/%.jet.sym: $(objroot)src/%.jet.sym.$(O)
|
||||
$(C_JET_OBJS): $(objroot)src/%.jet.$(O): $(srcroot)src/%.c
|
||||
$(C_JET_OBJS): CPPFLAGS += -DJEMALLOC_JET
|
||||
$(C_TESTLIB_UNIT_OBJS): $(objroot)test/src/%.unit.$(O): $(srcroot)test/src/%.c
|
||||
$(C_TESTLIB_UNIT_OBJS): CPPFLAGS += -DJEMALLOC_UNIT_TEST
|
||||
$(C_TESTLIB_INTEGRATION_OBJS): $(objroot)test/src/%.integration.$(O): $(srcroot)test/src/%.c
|
||||
$(C_TESTLIB_INTEGRATION_OBJS): CPPFLAGS += -DJEMALLOC_INTEGRATION_TEST
|
||||
$(C_UTIL_INTEGRATION_OBJS): $(objroot)src/%.integration.$(O): $(srcroot)src/%.c
|
||||
$(C_TESTLIB_STRESS_OBJS): $(objroot)test/src/%.stress.$(O): $(srcroot)test/src/%.c
|
||||
$(C_TESTLIB_STRESS_OBJS): CPPFLAGS += -DJEMALLOC_STRESS_TEST -DJEMALLOC_STRESS_TESTLIB
|
||||
$(C_TESTLIB_OBJS): CPPFLAGS += -I$(srcroot)test/include -I$(objroot)test/include
|
||||
$(TESTS_UNIT_OBJS): CPPFLAGS += -DJEMALLOC_UNIT_TEST
|
||||
$(TESTS_INTEGRATION_OBJS): CPPFLAGS += -DJEMALLOC_INTEGRATION_TEST
|
||||
$(TESTS_INTEGRATION_CPP_OBJS): CPPFLAGS += -DJEMALLOC_INTEGRATION_CPP_TEST
|
||||
$(TESTS_STRESS_OBJS): CPPFLAGS += -DJEMALLOC_STRESS_TEST
|
||||
$(TESTS_OBJS): $(objroot)test/%.$(O): $(srcroot)test/%.c
|
||||
$(TESTS_CPP_OBJS): $(objroot)test/%.$(O): $(srcroot)test/%.cpp
|
||||
$(TESTS_OBJS): CPPFLAGS += -I$(srcroot)test/include -I$(objroot)test/include
|
||||
$(TESTS_CPP_OBJS): CPPFLAGS += -I$(srcroot)test/include -I$(objroot)test/include
|
||||
ifneq ($(IMPORTLIB),$(SO))
|
||||
$(CPP_OBJS) $(C_SYM_OBJS) $(C_OBJS) $(C_JET_SYM_OBJS) $(C_JET_OBJS): CPPFLAGS += -DDLLEXPORT
|
||||
endif
|
||||
|
||||
# Dependencies.
|
||||
ifndef CC_MM
|
||||
HEADER_DIRS = $(srcroot)include/jemalloc/internal \
|
||||
$(objroot)include/jemalloc $(objroot)include/jemalloc/internal
|
||||
HEADERS = $(filter-out $(PRIVATE_NAMESPACE_HDRS),$(wildcard $(foreach dir,$(HEADER_DIRS),$(dir)/*.h)))
|
||||
$(C_SYM_OBJS) $(C_OBJS) $(CPP_OBJS) $(C_PIC_OBJS) $(CPP_PIC_OBJS) $(C_JET_SYM_OBJS) $(C_JET_OBJS) $(C_TESTLIB_OBJS) $(TESTS_OBJS) $(TESTS_CPP_OBJS): $(HEADERS)
|
||||
$(TESTS_OBJS) $(TESTS_CPP_OBJS): $(objroot)test/include/test/jemalloc_test.h
|
||||
endif
|
||||
|
||||
$(C_OBJS) $(CPP_OBJS) $(C_PIC_OBJS) $(CPP_PIC_OBJS) $(C_TESTLIB_INTEGRATION_OBJS) $(C_UTIL_INTEGRATION_OBJS) $(TESTS_INTEGRATION_OBJS) $(TESTS_INTEGRATION_CPP_OBJS): $(objroot)include/jemalloc/internal/private_namespace.h
|
||||
$(C_JET_OBJS) $(C_TESTLIB_UNIT_OBJS) $(C_TESTLIB_STRESS_OBJS) $(TESTS_UNIT_OBJS) $(TESTS_STRESS_OBJS): $(objroot)include/jemalloc/internal/private_namespace_jet.h
|
||||
|
||||
$(C_SYM_OBJS) $(C_OBJS) $(C_PIC_OBJS) $(C_JET_SYM_OBJS) $(C_JET_OBJS) $(C_TESTLIB_OBJS) $(TESTS_OBJS): %.$(O):
|
||||
@mkdir -p $(@D)
|
||||
$(CC) $(CFLAGS) -c $(CPPFLAGS) $(CTARGET) $<
|
||||
ifdef CC_MM
|
||||
@$(CC) -MM $(CPPFLAGS) -MT $@ -o $(@:%.$(O)=%.d) $<
|
||||
endif
|
||||
|
||||
$(C_SYMS): %.sym:
|
||||
@mkdir -p $(@D)
|
||||
$(DUMP_SYMS) $< | $(AWK) -f $(objroot)include/jemalloc/internal/private_symbols.awk > $@
|
||||
|
||||
$(C_JET_SYMS): %.sym:
|
||||
@mkdir -p $(@D)
|
||||
$(DUMP_SYMS) $< | $(AWK) -f $(objroot)include/jemalloc/internal/private_symbols_jet.awk > $@
|
||||
|
||||
$(objroot)include/jemalloc/internal/private_namespace.gen.h: $(C_SYMS)
|
||||
$(SHELL) $(srcroot)include/jemalloc/internal/private_namespace.sh $^ > $@
|
||||
|
||||
$(objroot)include/jemalloc/internal/private_namespace_jet.gen.h: $(C_JET_SYMS)
|
||||
$(SHELL) $(srcroot)include/jemalloc/internal/private_namespace.sh $^ > $@
|
||||
|
||||
%.h: %.gen.h
|
||||
@if ! `cmp -s $< $@` ; then echo "cp $< $<"; cp $< $@ ; fi
|
||||
|
||||
$(CPP_OBJS) $(CPP_PIC_OBJS) $(TESTS_CPP_OBJS): %.$(O):
|
||||
@mkdir -p $(@D)
|
||||
$(CXX) $(CXXFLAGS) -c $(CPPFLAGS) $(CTARGET) $<
|
||||
ifdef CC_MM
|
||||
@$(CXX) -MM $(CPPFLAGS) -MT $@ -o $(@:%.$(O)=%.d) $<
|
||||
endif
|
||||
|
||||
ifneq ($(SOREV),$(SO))
|
||||
%.$(SO) : %.$(SOREV)
|
||||
@mkdir -p $(@D)
|
||||
ln -sf $(<F) $@
|
||||
endif
|
||||
|
||||
$(objroot)lib/$(LIBJEMALLOC).$(SOREV) : $(if $(PIC_CFLAGS),$(C_PIC_OBJS),$(C_OBJS)) $(if $(PIC_CFLAGS),$(CPP_PIC_OBJS),$(CPP_OBJS))
|
||||
@mkdir -p $(@D)
|
||||
$(CC) $(DSO_LDFLAGS) $(call RPATH,$(RPATH_EXTRA)) $(LDTARGET) $+ $(LDFLAGS) $(LIBS) $(EXTRA_LDFLAGS)
|
||||
|
||||
$(objroot)lib/$(LIBJEMALLOC)_pic.$(A) : $(C_PIC_OBJS) $(CPP_PIC_OBJS)
|
||||
$(objroot)lib/$(LIBJEMALLOC).$(A) : $(C_OBJS) $(CPP_OBJS)
|
||||
$(objroot)lib/$(LIBJEMALLOC)_s.$(A) : $(C_OBJS) $(CPP_OBJS)
|
||||
|
||||
$(STATIC_LIBS):
|
||||
@mkdir -p $(@D)
|
||||
$(AR) $(ARFLAGS)@AROUT@ $+
|
||||
|
||||
$(objroot)test/unit/%$(EXE): $(objroot)test/unit/%.$(O) $(C_JET_OBJS) $(C_TESTLIB_UNIT_OBJS)
|
||||
@mkdir -p $(@D)
|
||||
$(CC) $(LDTARGET) $(filter %.$(O),$^) $(call RPATH,$(objroot)lib) $(LDFLAGS) $(filter-out -lm,$(LIBS)) $(LM) $(EXTRA_LDFLAGS)
|
||||
|
||||
$(objroot)test/integration/%$(EXE): $(objroot)test/integration/%.$(O) $(C_TESTLIB_INTEGRATION_OBJS) $(C_UTIL_INTEGRATION_OBJS) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB)
|
||||
@mkdir -p $(@D)
|
||||
$(CC) $(TEST_LD_MODE) $(LDTARGET) $(filter %.$(O),$^) $(call RPATH,$(objroot)lib) $(LJEMALLOC) $(LDFLAGS) $(filter-out -lm,$(filter -lrt -lpthread -lstdc++,$(LIBS))) $(LM) $(EXTRA_LDFLAGS)
|
||||
|
||||
$(objroot)test/integration/cpp/%$(EXE): $(objroot)test/integration/cpp/%.$(O) $(C_TESTLIB_INTEGRATION_OBJS) $(C_UTIL_INTEGRATION_OBJS) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB)
|
||||
@mkdir -p $(@D)
|
||||
$(CXX) $(LDTARGET) $(filter %.$(O),$^) $(call RPATH,$(objroot)lib) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB) $(LDFLAGS) $(filter-out -lm,$(LIBS)) -lm $(EXTRA_LDFLAGS)
|
||||
|
||||
$(objroot)test/stress/%$(EXE): $(objroot)test/stress/%.$(O) $(C_JET_OBJS) $(C_TESTLIB_STRESS_OBJS) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB)
|
||||
@mkdir -p $(@D)
|
||||
$(CC) $(TEST_LD_MODE) $(LDTARGET) $(filter %.$(O),$^) $(call RPATH,$(objroot)lib) $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB) $(LDFLAGS) $(filter-out -lm,$(LIBS)) $(LM) $(EXTRA_LDFLAGS)
|
||||
|
||||
build_lib_shared: $(DSOS)
|
||||
build_lib_static: $(STATIC_LIBS)
|
||||
build_lib: build_lib_shared build_lib_static
|
||||
|
||||
install_bin:
|
||||
$(INSTALL) -d $(BINDIR)
|
||||
@for b in $(BINS); do \
|
||||
echo "$(INSTALL) -m 755 $$b $(BINDIR)"; \
|
||||
$(INSTALL) -m 755 $$b $(BINDIR); \
|
||||
done
|
||||
|
||||
install_include:
|
||||
$(INSTALL) -d $(INCLUDEDIR)/jemalloc
|
||||
@for h in $(C_HDRS); do \
|
||||
echo "$(INSTALL) -m 644 $$h $(INCLUDEDIR)/jemalloc"; \
|
||||
$(INSTALL) -m 644 $$h $(INCLUDEDIR)/jemalloc; \
|
||||
done
|
||||
|
||||
install_lib_shared: $(DSOS)
|
||||
$(INSTALL) -d $(LIBDIR)
|
||||
$(INSTALL) -m 755 $(objroot)lib/$(LIBJEMALLOC).$(SOREV) $(LIBDIR)
|
||||
ifneq ($(SOREV),$(SO))
|
||||
ln -sf $(LIBJEMALLOC).$(SOREV) $(LIBDIR)/$(LIBJEMALLOC).$(SO)
|
||||
endif
|
||||
|
||||
install_lib_static: $(STATIC_LIBS)
|
||||
$(INSTALL) -d $(LIBDIR)
|
||||
@for l in $(STATIC_LIBS); do \
|
||||
echo "$(INSTALL) -m 755 $$l $(LIBDIR)"; \
|
||||
$(INSTALL) -m 755 $$l $(LIBDIR); \
|
||||
done
|
||||
|
||||
install_lib_pc: $(PC)
|
||||
$(INSTALL) -d $(LIBDIR)/pkgconfig
|
||||
@for l in $(PC); do \
|
||||
echo "$(INSTALL) -m 644 $$l $(LIBDIR)/pkgconfig"; \
|
||||
$(INSTALL) -m 644 $$l $(LIBDIR)/pkgconfig; \
|
||||
done
|
||||
|
||||
install_lib: install_lib_shared install_lib_static install_lib_pc
|
||||
|
||||
install_doc_html:
|
||||
$(INSTALL) -d $(DATADIR)/doc/jemalloc$(install_suffix)
|
||||
@for d in $(DOCS_HTML); do \
|
||||
echo "$(INSTALL) -m 644 $$d $(DATADIR)/doc/jemalloc$(install_suffix)"; \
|
||||
$(INSTALL) -m 644 $$d $(DATADIR)/doc/jemalloc$(install_suffix); \
|
||||
done
|
||||
|
||||
install_doc_man:
|
||||
$(INSTALL) -d $(MANDIR)/man3
|
||||
@for d in $(DOCS_MAN3); do \
|
||||
echo "$(INSTALL) -m 644 $$d $(MANDIR)/man3"; \
|
||||
$(INSTALL) -m 644 $$d $(MANDIR)/man3; \
|
||||
done
|
||||
|
||||
install_doc: install_doc_html install_doc_man
|
||||
|
||||
install: install_bin install_include install_lib install_doc
|
||||
|
||||
tests_unit: $(TESTS_UNIT:$(srcroot)%.c=$(objroot)%$(EXE))
|
||||
tests_integration: $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%$(EXE)) $(TESTS_INTEGRATION_CPP:$(srcroot)%.cpp=$(objroot)%$(EXE))
|
||||
tests_stress: $(TESTS_STRESS:$(srcroot)%.c=$(objroot)%$(EXE))
|
||||
tests: tests_unit tests_integration tests_stress
|
||||
|
||||
check_unit_dir:
|
||||
@mkdir -p $(objroot)test/unit
|
||||
check_integration_dir:
|
||||
@mkdir -p $(objroot)test/integration
|
||||
stress_dir:
|
||||
@mkdir -p $(objroot)test/stress
|
||||
check_dir: check_unit_dir check_integration_dir
|
||||
|
||||
check_unit: tests_unit check_unit_dir
|
||||
$(SHELL) $(objroot)test/test.sh $(TESTS_UNIT:$(srcroot)%.c=$(objroot)%)
|
||||
check_integration_prof: tests_integration check_integration_dir
|
||||
ifeq ($(enable_prof), 1)
|
||||
$(MALLOC_CONF)="prof:true" $(SHELL) $(objroot)test/test.sh $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%) $(TESTS_INTEGRATION_CPP:$(srcroot)%.cpp=$(objroot)%)
|
||||
$(MALLOC_CONF)="prof:true,prof_active:false" $(SHELL) $(objroot)test/test.sh $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%) $(TESTS_INTEGRATION_CPP:$(srcroot)%.cpp=$(objroot)%)
|
||||
endif
|
||||
check_integration_decay: tests_integration check_integration_dir
|
||||
$(MALLOC_CONF)="dirty_decay_ms:-1,muzzy_decay_ms:-1" $(SHELL) $(objroot)test/test.sh $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%) $(TESTS_INTEGRATION_CPP:$(srcroot)%.cpp=$(objroot)%)
|
||||
$(MALLOC_CONF)="dirty_decay_ms:0,muzzy_decay_ms:0" $(SHELL) $(objroot)test/test.sh $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%) $(TESTS_INTEGRATION_CPP:$(srcroot)%.cpp=$(objroot)%)
|
||||
check_integration: tests_integration check_integration_dir
|
||||
$(SHELL) $(objroot)test/test.sh $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%) $(TESTS_INTEGRATION_CPP:$(srcroot)%.cpp=$(objroot)%)
|
||||
stress: tests_stress stress_dir
|
||||
$(SHELL) $(objroot)test/test.sh $(TESTS_STRESS:$(srcroot)%.c=$(objroot)%)
|
||||
check: check_unit check_integration check_integration_decay check_integration_prof
|
||||
|
||||
clean:
|
||||
rm -f $(PRIVATE_NAMESPACE_HDRS)
|
||||
rm -f $(PRIVATE_NAMESPACE_GEN_HDRS)
|
||||
rm -f $(C_SYM_OBJS)
|
||||
rm -f $(C_SYMS)
|
||||
rm -f $(C_OBJS)
|
||||
rm -f $(CPP_OBJS)
|
||||
rm -f $(C_PIC_OBJS)
|
||||
rm -f $(CPP_PIC_OBJS)
|
||||
rm -f $(C_JET_SYM_OBJS)
|
||||
rm -f $(C_JET_SYMS)
|
||||
rm -f $(C_JET_OBJS)
|
||||
rm -f $(C_TESTLIB_OBJS)
|
||||
rm -f $(C_SYM_OBJS:%.$(O)=%.d)
|
||||
rm -f $(C_OBJS:%.$(O)=%.d)
|
||||
rm -f $(CPP_OBJS:%.$(O)=%.d)
|
||||
rm -f $(C_PIC_OBJS:%.$(O)=%.d)
|
||||
rm -f $(CPP_PIC_OBJS:%.$(O)=%.d)
|
||||
rm -f $(C_JET_SYM_OBJS:%.$(O)=%.d)
|
||||
rm -f $(C_JET_OBJS:%.$(O)=%.d)
|
||||
rm -f $(C_TESTLIB_OBJS:%.$(O)=%.d)
|
||||
rm -f $(TESTS_OBJS:%.$(O)=%$(EXE))
|
||||
rm -f $(TESTS_OBJS)
|
||||
rm -f $(TESTS_OBJS:%.$(O)=%.d)
|
||||
rm -f $(TESTS_OBJS:%.$(O)=%.out)
|
||||
rm -f $(TESTS_CPP_OBJS:%.$(O)=%$(EXE))
|
||||
rm -f $(TESTS_CPP_OBJS)
|
||||
rm -f $(TESTS_CPP_OBJS:%.$(O)=%.d)
|
||||
rm -f $(TESTS_CPP_OBJS:%.$(O)=%.out)
|
||||
rm -f $(DSOS) $(STATIC_LIBS)
|
||||
|
||||
distclean: clean
|
||||
rm -f $(objroot)bin/jemalloc-config
|
||||
rm -f $(objroot)bin/jemalloc.sh
|
||||
rm -f $(objroot)bin/jeprof
|
||||
rm -f $(objroot)config.log
|
||||
rm -f $(objroot)config.status
|
||||
rm -f $(objroot)config.stamp
|
||||
rm -f $(cfghdrs_out)
|
||||
rm -f $(cfgoutputs_out)
|
||||
|
||||
relclean: distclean
|
||||
rm -f $(objroot)configure
|
||||
rm -f $(objroot)VERSION
|
||||
rm -f $(DOCS_HTML)
|
||||
rm -f $(DOCS_MAN3)
|
||||
|
||||
#===============================================================================
|
||||
# Re-configuration rules.
|
||||
|
||||
ifeq ($(enable_autogen), 1)
|
||||
$(srcroot)configure : $(srcroot)configure.ac
|
||||
cd ./$(srcroot) && $(AUTOCONF)
|
||||
|
||||
$(objroot)config.status : $(srcroot)configure
|
||||
./$(objroot)config.status --recheck
|
||||
|
||||
$(srcroot)config.stamp.in : $(srcroot)configure.ac
|
||||
echo stamp > $(srcroot)config.stamp.in
|
||||
|
||||
$(objroot)config.stamp : $(cfgoutputs_in) $(cfghdrs_in) $(srcroot)configure
|
||||
./$(objroot)config.status
|
||||
@touch $@
|
||||
|
||||
# There must be some action in order for make to re-read Makefile when it is
|
||||
# out of date.
|
||||
$(cfgoutputs_out) $(cfghdrs_out) : $(objroot)config.stamp
|
||||
@true
|
||||
endif
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
jemalloc is a general purpose malloc(3) implementation that emphasizes
|
||||
fragmentation avoidance and scalable concurrency support. jemalloc first came
|
||||
into use as the FreeBSD libc allocator in 2005, and since then it has found its
|
||||
way into numerous applications that rely on its predictable behavior. In 2010
|
||||
jemalloc development efforts broadened to include developer support features
|
||||
such as heap profiling and extensive monitoring/tuning hooks. Modern jemalloc
|
||||
releases continue to be integrated back into FreeBSD, and therefore versatility
|
||||
remains critical. Ongoing development efforts trend toward making jemalloc
|
||||
among the best allocators for a broad range of demanding applications, and
|
||||
eliminating/mitigating weaknesses that have practical repercussions for real
|
||||
world applications.
|
||||
|
||||
The COPYING file contains copyright and licensing information.
|
||||
|
||||
The INSTALL file contains information on how to configure, build, and install
|
||||
jemalloc.
|
||||
|
||||
The ChangeLog file contains a brief summary of changes for each release.
|
||||
|
||||
URL: http://jemalloc.net/
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
for i in autoconf; do
|
||||
echo "$i"
|
||||
$i
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error $? in $i"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
echo "./configure --enable-autogen $@"
|
||||
./configure --enable-autogen $@
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error $? in ./configure"
|
||||
exit 1
|
||||
fi
|
||||
@@ -0,0 +1,83 @@
|
||||
#!/bin/sh
|
||||
|
||||
usage() {
|
||||
cat <<EOF
|
||||
Usage:
|
||||
@BINDIR@/jemalloc-config <option>
|
||||
Options:
|
||||
--help | -h : Print usage.
|
||||
--version : Print jemalloc version.
|
||||
--revision : Print shared library revision number.
|
||||
--config : Print configure options used to build jemalloc.
|
||||
--prefix : Print installation directory prefix.
|
||||
--bindir : Print binary installation directory.
|
||||
--datadir : Print data installation directory.
|
||||
--includedir : Print include installation directory.
|
||||
--libdir : Print library installation directory.
|
||||
--mandir : Print manual page installation directory.
|
||||
--cc : Print compiler used to build jemalloc.
|
||||
--cflags : Print compiler flags used to build jemalloc.
|
||||
--cppflags : Print preprocessor flags used to build jemalloc.
|
||||
--cxxflags : Print C++ compiler flags used to build jemalloc.
|
||||
--ldflags : Print library flags used to build jemalloc.
|
||||
--libs : Print libraries jemalloc was linked against.
|
||||
EOF
|
||||
}
|
||||
|
||||
prefix="@prefix@"
|
||||
exec_prefix="@exec_prefix@"
|
||||
|
||||
case "$1" in
|
||||
--help | -h)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
--version)
|
||||
echo "@jemalloc_version@"
|
||||
;;
|
||||
--revision)
|
||||
echo "@rev@"
|
||||
;;
|
||||
--config)
|
||||
echo "@CONFIG@"
|
||||
;;
|
||||
--prefix)
|
||||
echo "@PREFIX@"
|
||||
;;
|
||||
--bindir)
|
||||
echo "@BINDIR@"
|
||||
;;
|
||||
--datadir)
|
||||
echo "@DATADIR@"
|
||||
;;
|
||||
--includedir)
|
||||
echo "@INCLUDEDIR@"
|
||||
;;
|
||||
--libdir)
|
||||
echo "@LIBDIR@"
|
||||
;;
|
||||
--mandir)
|
||||
echo "@MANDIR@"
|
||||
;;
|
||||
--cc)
|
||||
echo "@CC@"
|
||||
;;
|
||||
--cflags)
|
||||
echo "@CFLAGS@"
|
||||
;;
|
||||
--cppflags)
|
||||
echo "@CPPFLAGS@"
|
||||
;;
|
||||
--cxxflags)
|
||||
echo "@CXXFLAGS@"
|
||||
;;
|
||||
--ldflags)
|
||||
echo "@LDFLAGS@ @EXTRA_LDFLAGS@"
|
||||
;;
|
||||
--libs)
|
||||
echo "@LIBS@"
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit 1
|
||||
esac
|
||||
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
|
||||
@LD_PRELOAD_VAR@=${libdir}/libjemalloc.@SOREV@
|
||||
export @LD_PRELOAD_VAR@
|
||||
exec "$@"
|
||||
+5622
File diff suppressed because it is too large.
Load diff
+1462
File diff suppressed because it is too large.
Load diff
+1825
File diff suppressed because it is too large.
Load diff
Loaded 100 of 650 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user