1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
|
== [8.0.6] (not released yet) ==
* Add loop to handle abort error like in suspend logic on Darwin
* Add support of OpenBSD/aarch64
* Add threading libraries to bdw-gc.pc
* Allocate start_info struct on the stack in GC_pthread_create
* Allow GC_PAUSE_TIME_TARGET environment variable values smaller than 5 ms
* Avoid compiler warning about unused d in GC_CALLOC/MALLOC_EXPLICITLY_TYPED
* Avoid gcc stringop-overflow warning for intended overflow in smashtest
* Check _MSVC_LANG macro in addition to __cplusplus (MS VC)
* Compile C++ code with exception handling enabled in NT_MAKEFILE
* Define OS_TYPE and DATAEND for UWP targets
* Disable mprotect-based incremental GC if /proc roots are used (Linux)
* Do not use Manual VDB mode if C malloc is redirected
* Do not use iOS private symbols
* Eliminate 'GC_non_gc_bytes is deprecated' warning in new_gc_alloc.h
* Eliminate 'GC_old_bus_handler defined but not used' compiler warning
* Eliminate 'cast between incompatible func types' warnings for FARPROC vars
* Eliminate 'comparing signed and unsigned values' BCC warning in cordtest
* Eliminate 'gc_pthread_redirects.h should contain header guard' code defect
* Eliminate 'implicit declaration of sbrk' gcc warning if -std=c11 on Cygwin
* Eliminate 'possible loss of data' BCC and MS VC warnings
* Eliminate 'static GC_sysinfo definition has incomplete type' Clang warning
* Eliminate 'unused function' compiler warnings (GC_add_map_entry, GC_lock)
* Eliminate 'while clause does not guard' GCC warning in GC_parse_map_entry
* Enable sbrk-to-mmap fallback on major supported Unix-like platforms
* Explicitly zero-initialize trace_buf (fix trace_buf initialization)
* Fix 'ACCESS_VIOLATION in marker' GC warning on Win32 async thread start
* Fix 'GC_generic_malloc must be available' GCC error in new_gc_alloc.h
* Fix 'ISO C++17 does not allow dynamic exception spec' clang-8 error
* Fix 'Wrong __data_start/_end pair' if -Bsymbolic-functions used (Linux)
* Fix 'condition pred!=NULL is always true' compiler warning
* Fix 'external linkage required for var because of dllimport' error on MinGW
* Fix 'ulong undefined' compilation error on AIX
* Fix 'undefined reference to __data_start' linker error on RISC-V
* Fix 'use of undeclared BUS_PAGE_FAULT' compilation error on FreeBSD 12
* Fix 'write to GC log failed' error (Cygwin)
* Fix 'wrong finalization data' gctest failure on Windows
* Fix CMake build on macOS Catalina
* Fix GC_OPENBSD_THREADS definition (OpenBSD/hppa)
* Fix MPROTECT_VDB definition for single-threaded GC builds
* Fix OS_TYPE and USE_MMAP_ANON definitions for Cygwin/x64
* Fix STACKBOTTOM on 32-bit HP/UX 11.11
* Fix abort in GC_printf when gctest is built as WinMain executable (Cygwin)
* Fix build for OS X (CMake)
* Fix building of shared library with C++ support on MinGW
* Fix compiling by Makefile.direct on OpenBSD/UltraSparc
* Fix configure message about 'AIX gcc optimization fix'
* Fix cordtest build in SMakefile.amiga
* Fix data race regarding *rlh value in generic_malloc_many
* Fix first_thread stack_base initialization if custom GC_stackbottom (Win32)
* Fix gc_allocator.h compilation by Clang
* Fix gc_cflags variable name in configure (HP/UX)
* Fix incorrect markup formatting in documentation
* Fix misaligned tlfs passed to AO_load on m68k
* Fix missing gc_dlopen.c and specific.c in CMake script
* Fix mmap() failures on AIX, HP/UX and Haiku
* Fix printf format specifier in simple_example.md
* Fix save_callers for multi-threaded case if built-in backtrace unavailable
* Fix subexpression widening in memhash() of disclaim_weakmap_test
* Fix test_cpp failure caused by arbitrary link order (Win32)
* Fix test_cpp failure when gc_cpp resides in a dll (Borland, Watcom)
* Fix various typos mostly in documentation files
* Fix word size, data start and alignment for OpenBSD/mips64(el)
* Include <alloca.h> when using alloca on AIX
* Limit number of unmapped regions (Linux and DragonFly)
* New macro to avoid system-wide new/delete inlining in gc_cpp.h (Win32)
* Prevent GetThreadContext failure (Windows)
* Prevent WARN of incompatible incremental GC if default or manual VDB
* Reduce a time period between GetExitCodeThread and SuspendThread (Win32)
* Refactoring of WoW64 workaround (Win32)
* Refine GC_INIT documentation about its multiple invocation
* Refine GC_parallel documentation in gc.h
* Refine do_blocking() documentation in gc.h
* Remove a misleading comment about Solaris in gc.h
* Remove cord .h files from list of non-installed headers (Automake)
* Remove dead part of condition to define NEED_FIND_LIMIT in gc_priv.h
* Remove gcmt-lib generation by CMake
* Support MSYS builds by CMake and configure
* Update documentation about the incremental collector support
* Use HEURISTIC2 on OpenBSD when single-threaded
* Use pstat_getprocvm to determine main stack bottom on HP-UX
* Workaround 'expression is only useful for its side effects' WCC warning
* Workaround clang-3.8/s390x bug when processing __builtin_frame_address
* Workaround fread fail after enable_incremental if malloc redirected (Linux)
== [8.0.4] 2019-03-02 ==
* Avoid a full GC when growing finalizer tables if in incremental mode
* Avoid potential race in hb_sz access between realloc and reclaim_block
* Avoid test.o rebuild on tests folder timestamp change (Makefile.direct)
* Avoid unexpected heap growth in gctest caused by GC_disable
* Ensure result of every variant of MS_TIME_DIFF has unsigned long type
* Fix 'duplicate symbol' error for tests using multiple static libs (OS X)
* Fix 'undefined reference to __data_start' linker error (Android/aarch64)
* Fix 'unexpected mark stack overflow' abort in push_all_stack
* Fix 'wrong __data_start/_end pair' error on Android
* Fix BSD_TIME variant of MS_TIME_DIFF for the case of a.tv_usec < b.tv_usec
* Fix GetThreadContext stale register values use if WoW64 (Win32)
* Fix invalid initializer of CLOCK_TYPE variables if BSD_TIME
* Fix thread_info() count argument value (OS X)
* Support de_win.c compilation by Makefile.direct (cord/de)
== [8.0.2] 2018-12-23 ==
* Abort with appropriate message if executable pages cannot be allocated
* Add initial testing of GC_enable/disable, MALLOC[_ATOMIC]_IGNORE_OFF_PAGE
* Add paths to filenames mentioned in the copyright section in README
* Add test using disclaim notifiers to implement a weak map
* Adjust #error messages format
* Allow to force executable pages allocation in gctest
* Avoid potential 'macro redefinition' errors for config.h macros
* Call real pthread_sigmask instead of its wrapper in start_mark_threads
* Check result of pthread_mutex_unlock in specific.c
* Default to a single-threaded build for Nintendo, Orbis, Sony PSP targets
* Default to non-executable memory allocation across all make scripts
* Define GC_ATOMIC_UNCOLLECTABLE and JAVA_FINALIZATION in all make scripts
* Do not prevent GC from looking at environment variables (BCC_MAKEFILE)
* Do not use 'ifndef AO_CLEAR' in mark, pthread_support and gctest
* Do not use spin locks if AO test-and-set is emulated (pthreads)
* Document HANDLE_FORK macro optional usage in Makefile.direct
* Document assertion in the setters that used to return old value
* Eliminate 'assigned value never used' compiler warning in test_cpp WinMain
* Eliminate 'casting signed to bigger unsigned int' CSA warning
* Eliminate 'different const qualifiers' MS VC warnings in cordbscs
* Eliminate 'function is never used' cppcheck warning for calloc/realloc
* Eliminate 'non-virtual destructor for class with inheritors' CSA warning
* Eliminate 'pointer targets differ in signedness' compiler warning (Win32)
* Eliminate 'struct member is never used' cppcheck warnings in os_dep
* Eliminate 'uninitialized var' cppcheck false positive in mach_dep, os_dep
* Eliminate 'unreferenced formal parameter' compiler warning in msvc_dbg
* Eliminate redundant check in backwards_height
* Fix 'USE_MUNMAP macro redefinition' error for NaCl
* Fix 'collecting from unknown thread' abort in leak-finding mode for Win32
* Fix 'mprotect remapping failed' abort on NetBSD with PaX enabled
* Fix 'too wide non-owner permissions are set for resource' code defect
* Fix GC_VSNPRINTF in cordprnt for DJGPP and MS VC for WinCE
* Fix GC_register_disclaim_proc for leak-finding mode
* Fix a deadlock in write_fault_handler if AO_or is emulated
* Fix comment typo in CMakeLists.txt
* Fix concurrent bitmap update in GC_dirty
* Fix deadlocks in write and suspend handlers if AO test-and-set is emulated
* Fix executable memory allocation in GC_unix_get_mem
* Fix hbp overflow in GC_install_counts
* Fix linkage with a system libatomic_ops shared library
* Fix lock assertion violation in get_index if GC_ALWAYS_MULTITHREADED
* Fix marking of finalizer closure object
* Fix marks and hb_n_marks consistency when disclaim returns true
* Fix memory allocation on GCF (Linux/x64)
* Fix missing curses.h in cord/de when compiling manually (MS VC, MinGW)
* Fix test_cpp assertion violation in find-leak mode
* Fix tests linkage with internal atomic_ops.o
* Fix unneeded end_stubborn_change/ptr_store_and_dirty in disclaim_test
* Guard against potential buffer overflow in CORD_next and CORD_pos_fetch
* New macro to suppress printing of leaked objects
* Pass -Wall -Wextra -Wpedantic to g++ if supported (configure)
* Prefix internal durango_get_mem symbol with 'GC_'
* Prevent double inclusion of javaxfc.h and private/specific.h
* Print relevant message in tests not appropriate for leak detection mode
* Reduce scope of local variables in GC_remove_all_threads_but_me
* Refine HIDE_POINTER documentation for the case of the leak-finding mode
* Refine documentation in gc_disclaim.h
* Remove extra USE_MMAP definition for Interix
* Remove redundant header double-inclusion checks in the private headers
* Remove strlen calls with a constant string argument in msvc_dbg
* Specify register_disclaim_proc and finalized_malloc argument as non-null
* Support UWP/arm64 target
* Test marking of finalizer closure object in disclaim_test
* Turn off leak detection mode explicitly in cord/de
* Turn off parallel marker, thread-local allocation if used AO ops emulated
* Turn on gcj functionality in BCC, DMC, NT, OS/2, WCC makefiles
* Turn on memory unmapping in BCC/DMC/NT/WCC makefiles and Makefile.direct
* Update NO_EXECUTE_PERMISSION documentation
* Update documentation about arm64 ABI in gcconfig.h
* Use AO_or in async_set_pht_entry_from_index if available
* Use GC_WORD_MAX macro across all C source files
* Use macro to operate on a flag residing in GC_stop_count
* Use standalone private macro to guard against ptr_t redefinition
* Workaround '#error' cppcheck messages in backgraph and private headers
* Workaround 'AST broken' syntax error reported by cppcheck in GC_mark_some
* Workaround 'GC_dump function is never used' cppcheck warning
* Workaround 'local address assignment to a global variable' CSA warning
* Workaround 'local variable end shadows outer symbol' cppcheck warnings
* Workaround 'local variable obj_displ shadows outer symbol' cppcheck warning
* Workaround 'nonlocal var will use ptr to local var' cppcheck false positive
* Workaround 'pointer addition with NULL pointer' cppcheck error in msvc_dbg
* Workaround 'potential non-terminated string' false positive in cordbscs
* Workaround 'value of _MAX_PATH is unknown' cppcheck warning
* Workaround cppcheck warnings regarding CLOCKS_PER_SEC, REDIRECT_REALLOC
== [8.0.0] 2018-09-05 ==
* Accept Android platform by both CMake and configure
* Access finalize_now atomically to avoid TSan warning without no-sanitize
* Acknowledge thread restart from suspend_handler (NetBSD)
* Add a sanity check that load_acquire and store_release are available
* Add AO primitives implementation to GC based on C11 atomic intrinsic
* Add assertion for suspend_ack_sem in start_world
* Add assertion to allocobj that live unmarked object cannot be reclaimed
* Add assertions about held lock when accessing all_bottom_indices
* Add assertions to ensure ADD_CALL_CHAIN is called holding the lock
* Add assertions to finalize and threads support for MANUAL_VDB needs
* Add basic calculation of the total full-collection time
* Add check that gc_cpp operator delete is called (test_cpp)
* Add debug logging to new_thread about GC_threads hash table collisions
* Add GC prefix to _MSVC_DBG_H macro
* Add initial RISC-V support
* Add Makefile target to run all tests without test-driver
* Add test_atomic_ops to perform minimal testing of used atomic primitives
* Add two-argument alloc_size attribute to calloc_explicitly_typed (GCC)
* Align IRIX/OSF1_THREADS definition in gc_config_macros.h with gcconfig.h
* Allocate non-executable memory by default (CMake)
* Allow compilation of PROC_VDB code on Linux host (GC_NO_SYS_FAULT_H)
* Allow configure --with-libatomic-ops=none to use GCC atomic intrinsics
* Allow custom N_LOCAL_ITERS and ENTRIES_TO_GET values
* Allow disabling of dynamic loading in CMake script and configure
* Allow disabling of main static data registration in CMake and configure
* Allow disabling of threads discovery in CMake script and configure
* Allow gc_assertions enabling in CMake script
* Allow gc_debug, redirect_malloc, large_config options in CMake script
* Allow GC_NETBSD_THREADS_WORKAROUND macro manual definition
* Allow mmap enabling in CMake script and configure
* Allow passing -D DEFAULT_VDB to CFLAGS
* Allow subthreadcreate_test to be compiled with zero NTHREADS
* Allow to turn on spin locking even if thread-local allocations are used
* Always include gc_atomic_ops.h unless threads are disabled
* Avoid 'Unexpected heap growth' in 64-bit multi-threaded gctest if n_tests=1
* Avoid duplication of code handling pthreads case in configure
* Avoid potential data race during apply_to_each_object(reset_back_edge)
* Avoid potential data race during GC_dump execution
* Avoid potential race between malloc_kind and mark_thread_local_fls_for
* Avoid potential race between realloc and clear_hdr_marks/reclaim_generic
* Avoid potential race in print_static_roots called by dyld_image_add/remove
* Avoid potential race in SET_MARK_BIT_EXIT_IF_SET if parallel marking
* Avoid potential race when accessing size_map table
* Avoid potential race when storing oh_back_ptr during parallel marking
* Avoid SIGSEGV during GC_INIT on some Android devices
* Build only shared libraries by default (configure)
* Change pointer arguments of push_all[_eager]/conditional API to void* type
* Change type of hb_sz field (of hblkhdr) from size_t to word
* Check consistency of descr, adjust, clear arguments of GC_new_kind
* Check that GC_WIN32_PTHREADS is not specified for Cygwin
* Check thread_local is initialized before accessing thread_key
* Collapse multiple BCOPY_EXISTS macro definitions
* Collapse multiple NT_*_MAKEFILE scripts into a single NT_MAKEFILE
* Collapse multiple page_was_dirty, remove_protection, read_dirty definitions
* Compile checksums.c only if --enable-checksums is given (configure)
* Consistently define WIN32_LEAN_AND_MEAN/NOSERVICE before include windows.h
* Convert .html files to Markdown format
* Convert code of .c files to valid C++ code
* Decide between memory unmapping and mprotect-based dirty bits at runtime
* Declare t local variable in the block where the variable is used
* Define ABORT() using _CrtDbgBreak (if available) on Windows host
* Define CLANG/GNUC_PREREQ macros to check gcc/clang minimum version
* Define DYNAMIC_LOADING for Darwin unless IGNORE_DYNAMIC_LOADING
* Define GC_ASSERT(x) as C assert(x) for external clients of gc_inline.h
* Define GC_PREFETCH_FOR_WRITE to __builtin_prefetch in gc_inline.h (GCC)
* Define GC_THREADS instead of GC_x_THREADS in Makefiles
* Define macro to specify the environment file name extension (Win32/WinCE)
* Define static resend_lost_signals(), restart_all() in pthread_stop_world
* Detect sigsetjmp() availability by configure
* Determine whether to use compiler TLS for kFreeBSD at compile time
* Do not call BCOPY and BZERO if size is zero
* Do not call sem_getvalue in stop_world if one thread exists
* Do not call set_handle_fork(1) in gctest if pthread_atfork not supported
* Do not compile pcr_interface.c and real_malloc.c except by PCR-Makefile
* Do not declare dl_iterate_phdr as weak for kFreeBSD
* Do not include windows.h when compiling gc_cpp.cc
* Do not install gc_allocator.h, gc_disclaim.h unless the features enabled
* Do not merge dynamic root with the existing static one in add_roots_inner
* Do not print n_rescuing_pages value if incremental collections disabled
* Do not push cpsr and frame pointer on Darwin/arm and Darwin/arm64
* Do not rebuild_root_index unless remove_root_at_pos is called
* Do not specify version info for test libraries (Automake)
* Do not use alternate thread library on Solaris
* Do not use asm in GC_pause
* Do not use PKG_CHECK_MODULES in configure
* Do not use system clock consistently if NO_CLOCK
* Do not use x86 asm in PUSH_CONTENTS_HDR for NaCl
* Document GC_BUILTIN_ATOMIC macro (and gc_atomic_ops private header file)
* Document STACK_NOT_SCANNED macro in gcconfig.h (Emscripten)
* Eliminate 'comparison is always false' code defect in get_maps
* Eliminate 'GC_DEBUG redefined' compiler warning in smashtest
* Eliminate 'potential unsafe sign check of a bitwise operation' code defect
* Enable alternative finalization interface (DISCLAIM) in all makefiles
* Enable compilation for Cygwin with MPROTECT_VDB
* Enable handle-fork and memory unmapping by default
* Enable mprotect-based incremental GC for Win64 (GCC)
* Expose API to control rate and max prior attempts of collect_a_little
* Expose API to control the minimum bytes allocated before a GC occurs
* Fix 'comparison of 255 with expr of type bool' error in gc_atomic_ops.h
* Fix 'doc' files installation folder
* Fix build of cord tests as C++ files (Makefile.direct)
* Fix comment typos in backgraph.c, de.c, gcconfig.h
* Fix delete operator redirection if gc_cpp is built as .dll (Cygwin, MinGW)
* Fix start_world not resuming all threads on Darwin
* Fix test_cpp failure in case GC_DEBUG is defined
* Group common defines for POSIX platforms in configure and CMake scripts
* Guard against USE_PTHREAD_LOCKS and USE_SPIN_LOCK are both defined
* Handle pthread restart signals loss if retry_signals
* Hide value stored to thread-specific entries for a test purpose
* Implement FindTopOfStack(0) for ARM and AArch64 (Darwin)
* Implement memory unmapping for Sony PS/3
* Imply configure --single-obj-compilation if --disable-static
* Include malloc.c in extra/gc.c after include gc_inline.h
* Increase MAX_HEAP_SECTS (10 times) for large-config
* Initial single-threaded support of Interix subsystem
* Initial support of Nintendo, Orbis, Sony PSP2, WinRT, Xbox One
* Initial support of TIZEN platform
* Install gc.3 man page instead of copying gc.man to doc folder (configure)
* Make extend_size_map() static (code refactoring)
* Make subthreadcreate test compilable even without libatomic_ops
* Match GC_FAST_MALLOC_GRANS formal and actual arguments where possible
* Move de_win compiled resource files to cord/tests
* Move pcr_interface.c, real_malloc.c to 'extra' folder
* New API function (GC_dump_named) to produce named dumps
* New API function (GC_is_incremental_mode)
* New API function (get_expl_freed_bytes_since_gc)
* New API function (get_size_map_at) to get content of size_map table
* New API to stop and start the GC world externally
* New API to turn on manual VDB at runtime
* New field (expl_freed_bytes_since_gc) in public prof_stats_s
* New macro ALWAYS_SMALL_CLEAR_STACK to avoid clearing large stack sections
* New public API (PTR_STORE_AND_DIRTY) to simplify store-and-dirty operation
* Pass CFLAGS_FOR_PIC value to CFLAGS in Makefile.direct
* Print time passed since GC initialization in GC_dump
* Public API (GC_deinit) to allow Win32 critical sections deletion
* Reduce probability of collision in threads hashtable for 64-bit targets
* Reduce the default MUNMAP_THRESHOLD value to 2 for Sony PS/3
* Refactoring of USE_MMAP/USE_MMAP_ANON pairs definition in gcconfig.h
* Reformat code and comments in gc_allocator.h
* Remove 'dist' target from Makefile.direct
* Remove a redundant check of __cplusplus in Symbian-specific .cpp files
* Remove Android-specific code in gcconfig.h for M68K
* Remove C++ WeakPointer and CleanUp API which lacks implementation
* Remove DGUX_THREADS macro which duplicates GC_DGUX386_THREADS (configure)
* Remove done_init static variable from fnlz_mlc.c
* Remove duplicate definition of ALIGNMENT macro for OpenBSD/arm
* Remove duplicated sample code in leak.md
* Remove EMX_MAKEFILE (add EMX support to Makefile.direct)
* Remove GC code fragment (which already merged) from README.Mac
* Remove GC_GNU_THREADS macro (HURD)
* Remove GENERAL_MALLOC internal macro
* Remove HIGH_BIT macro duplicating SIGNB
* Remove lint-specific code
* Remove Makefile KandRtest target (that supported K&R C compiler)
* Remove MIN_WORDS macro from gc_priv.h
* Remove multi-line macros (FOR_EACH_PRED, ITERATE_DL_HASHTBL_*, PUSH_OBJ)
* Remove name of optional arguments of operator new and new[] in gc_cpp.h
* Remove notes that K&R C compiler is unsupported
* Remove PUSH_CONTENTS_HDR multi-line macro
* Remove redundant check that clear_fl_marks argument is non-null
* Remove redundant THREADS macro checks in alloc.c and gc_priv.h
* Remove stubborn objects allocation code completely, remove stubborn.c
* Remove unnecessary argument casts in add_roots_inner calls
* Remove unnecessary type casts in n_set_marks
* Remove unused USE_GENERIC macro definition and description
* Remove version info in 'de' cord test application
* Replace GC_MALLOC(sizeof T) with GC_NEW(T) in tests
* Replace GC_NO_RETRY_SIGNALS environment variable with GC_RETRY_SIGNALS=0
* Replace some FIXME items with TODO ones
* Run command passed to if_not_there directly from Makefile.direct
* Same type casts for GC_PTR_STORE arguments regardless of GC_DEBUG
* Skip grungy_pages update when mark state invalid to speedup read_dirty
* Skip typed_test in gctest if NO_TYPED_TEST macro is defined
* Support configure --disable-thread-local-alloc option (similar for CMake)
* Support enable_checksums option in CMake script
* Support Haiku multi-threaded build by CMake
* Support threads for DragonFly in configure
* Turn on 'atomic uncollectable' functionality by default (CMake)
* Turn on GC assertions in NT_MAKEFILE for debug builds
* Turn on gcj, disclaim and java finalization by default (CMake)
* Turn on incremental collection in gctest also if DEFAULT_VDB or MANUAL_VDB
* Turn on incremental mode in cordtest and cord/de
* Turn on incremental mode in disclaim_test, test_cpp and staticroots test
* Turn on parallel marker by default for all multi-threaded builds
* Update GC compilation and usage notes for Win32
* Update shared libraries version info to differentiate against v7.6
* Update top_index entry pointer only when the entry is constructed fully
* Use __builtin_expect in SIZET_SAT_ADD macro
* Use __declspec(allocator) for malloc-like prototypes (MS VS 2015+)
* Use __int64 instead of 'long long' in LONG_MULT if appropriate
* Use __thread keyword for Android NDK r12b+ Clang (arm)
* Use atomic allocation for leafs in reverse_test (gctest)
* Use atomic load/store for the concurrently accessed variables in GC_lock
* Use C11 static_assert if available
* Use compiler atomic intrinsics by default if available (configure)
* Use EXPECT FALSE for mark_from code documented as executed rarely
* Use heap-allocated memory for local mark stack of non-marker thread
* Use HOST_ANDROID define instead of PLATFORM_ANDROID
* Use include gc.h with the angle brackets in the man page synopsis
* Use longjmp in fault_handler_openbsd if siglongjmp unavailable (OpenBSD)
* Use MARK_BIT_PER_GRANULE instead of MARK_BIT_PER_OBJ where appropriate
* Use noexcept specifier in gc_allocator and gc_cpp if C++11
* Use same macro (NTHREADS) across all tests to specify number of threads
* Use sigsetjmp() in setjmp_t tool if available
* Use thread-local allocations for all multi-threaded builds
* Use THREAD_EQUAL consistently to compare pthread_t values
* Workaround 'bad pointer arithmetic' false waring in check_annotated_obj
* Workaround Clang optimizer bug crashing clear_stack_inner on OS X 10.8
* Workaround Thread Sanitizer (TSan) false positive warnings
== [7.6.14] (not released yet) ==
* Add loop to handle abort error like in suspend logic on Darwin
* Add support of OpenBSD/aarch64
* Add threading libraries to bdw-gc.pc
* Disable mprotect-based incremental GC if /proc roots are used (Linux)
* Do not use iOS private symbols
* Eliminate 'GC_old_bus_handler defined but not used' compiler warning
* Eliminate 'comparing signed and unsigned values' BCC warning in cordtest
* Eliminate 'possible loss of data' BCC and MS VC warnings
* Eliminate 'static GC_sysinfo definition has incomplete type' Clang warning
* Eliminate 'unused function GC_add_map_entry' compiler warning
* Eliminate 'while clause does not guard' GCC warning in GC_parse_map_entry
* Explicitly zero-initialize trace_buf (fix trace_buf initialization)
* Fix 'ACCESS_VIOLATION in marker' GC warning on Win32 async thread start
* Fix 'GC_generic_malloc must be available' GCC error in new_gc_alloc.h
* Fix 'ulong undefined' compilation error on AIX
* Fix 'undefined reference to __data_start' linker error on RISC-V
* Fix 'write to GC log failed' error
* Fix MPROTECT_VDB definition for single-threaded GC builds
* Fix OS_TYPE and USE_MMAP_ANON definitions for Cygwin/x64
* Fix STACKBOTTOM on 32-bit HP/UX 11.11
* Fix abort in GC_printf when gctest is built as WinMain executable (Cygwin)
* Fix compiling by Makefile.direct on OpenBSD/UltraSparc
* Fix configure message about 'AIX gcc optimization fix'
* Fix cordtest build in SMakefile.amiga
* Fix data race regarding *rlh value in generic_malloc_many
* Fix first_thread stack_base initialization if custom GC_stackbottom (Win32)
* Fix gc_allocator.h compilation by Clang
* Fix gc_cflags variable name in configure (HP/UX)
* Fix incorrect define GC_OPENBSD_THREADS on sparc64
* Fix misaligned tlfs passed to AO_load on m68k
* Fix missing gc_dlopen.c in CMake script
* Fix printf format specifier in simple_example.html
* Fix save_callers for multi-threaded case if built-in backtrace unavailable
* Fix test_cpp failure caused by arbitrary link order (Win32)
* Fix test_cpp failure when gc_cpp resides in a dll (Borland, Watcom)
* Fix various typos mostly in documentation files
* Fix word size, data start and alignment for OpenBSD/mips64(el)
* Prevent GetThreadContext failure (Windows)
* Prevent WARN of incompatible incremental GC if default or manual VDB
* Reduce a time period between GetExitCodeThread and SuspendThread (Win32)
* Refactoring of WoW64 workaround (Win32)
* Remove a misleading comment about Solaris in gc.h
* Workaround 'expression is only useful for its side effects' WCC warning
* Workaround fread fail after enable_incremental if malloc redirected (Linux)
== [7.6.12] 2019-03-01 ==
* Eliminate 'assigned value never used' compiler warning in test_cpp WinMain
* Fix 'mprotect remapping failed' abort on NetBSD with PaX enabled
* Fix 'undefined reference to __data_start' linker error (Android/aarch64)
* Fix 'unexpected mark stack overflow' abort in push_all_stack
* Fix 'wrong __data_start/_end pair' error on Android
* Fix BSD_TIME variant of MS_TIME_DIFF for the case of a.tv_usec < b.tv_usec
* Fix GetThreadContext stale register values use if WoW64 (Win32)
* Fix executable memory allocation in GC_unix_get_mem
* Fix invalid initializer of CLOCK_TYPE variables if BSD_TIME
* Fix thread_info() count argument value (OS X)
* Update NO_EXECUTE_PERMISSION documentation
== [7.6.10] 2018-12-13 ==
* Add paths to filenames mentioned in the copyright section in README
* Call real pthread_sigmask instead of its wrapper in start_mark_threads
* Eliminate 'casting signed to bigger unsigned int' CSA warning
* Eliminate 'non-virtual destructor for class with inheritors' CSA warning
* Fix 'collecting from unknown thread' abort in leak-finding mode for Win32
* Fix 'too wide non-owner permissions are set for resource' code defect
* Fix 'undefined reference to GC_incremental' linker error in pthread_start
* Fix GC_VSNPRINTF in cordprnt for DJGPP and MS VC for WinCE
* Fix GC_register_disclaim_proc for leak-finding mode
* Fix a deadlock in write_fault_handler if AO_or is emulated
* Fix comment typos in CMakeLists.txt, backgraph.c, de.c, gcconfig.h
* Fix concurrent bitmap update in GC_dirty
* Fix delete operator redirection if gc_cpp is built as .dll (Cygwin, MinGW)
* Fix hbp overflow in GC_install_counts
* Fix linkage with a system libatomic_ops shared library
* Fix lock assertion violation in get_index if GC_ALWAYS_MULTITHREADED
* Fix marking of finalizer closure object
* Fix marks and hb_n_marks consistency when disclaim returns true
* Fix memory allocation on GCF (Linux/x64)
* Fix missing curses.h in cord/de when compiling manually (MS VC, MinGW)
* Fix start_world not resuming all threads on Darwin
* Fix test_cpp assertion violation in find-leak mode
* Fix tests linkage with internal atomic_ops.o
* Fix unneeded end_stubborn_change in disclaim_test
* Guard against potential buffer overflow in CORD_next and CORD_pos_fetch
* New macro to suppress printing of leaked objects
* Prevent double inclusion of javaxfc.h and private/specific.h
* Reduce scope of local variables in GC_remove_all_threads_but_me
* Refine HIDE_POINTER documentation for the case of the leak-finding mode
* Refine documentation in gc_disclaim.h
* Test marking of finalizer closure object in disclaim_test
* Update documentation about arm64 ABI in gcconfig.h
* Use AO_or in async_set_pht_entry_from_index if available
* Use include gc.h with the angle brackets in the man page synopsis
== [7.6.8] 2018-08-12 ==
* Add cpu, make_as_lib, nothreads options to NT_MAKEFILE
* Add NetBSD/aarch64 and initial RISC-V support
* Adjust formatting of configure help messages and config.h comments
* Avoid multiple 'getcontext failed' warnings if getcontext is broken
* Cleanup BCC Makefile (remove absolute GC paths, fix del cmd, update clean)
* Collapse multiple NT_*_MAKEFILE scripts into a single NT_MAKEFILE
* Do not call GC_dirty_inner unless GC_incremental
* Do not use NULL in gc_inline.h
* Eliminate 'cast between incompatible function types' compiler warning
* Eliminate 'comparing signed and unsigned values' compiler warnings (bcc)
* Eliminate 'condition is always true' cppcheck warning in init_gcj_malloc
* Eliminate 'declaration of var hides global declaration' compiler warning
* Eliminate 'language extension used' Clang warning in gc.h
* Eliminate 'possibly incorrect assignment in CORD_vsprintf' compiler warning
* Eliminate 'ptr arithmetic with NULL' cppcheck warning in alloc_mark_stack
* Eliminate 'scope of var can be reduced' cppcheck warning in pthread_join
* Eliminate 'switch statement contains no case label' compiler warning
* Eliminate 'variable might be uninitialized' warning in win32_start_inner
* Eliminate duplicate clear_mark_bit call when removing disappearing link
* Fast fail on invalid CPU parameter passed to NT_MAKEFILE
* Fix 'collecting from unknown thread' abort in leak-finding mode
* Fix 'pointer arithmetic with NULL' code defect in print_callers
* Fix Borland version in documentation to match that in BCC_MAKEFILE
* Fix comment about inv_sz computation in setup_header
* Fix comments style in configure.ac and Makefile.am
* Fix compilation by digimars.mak (DMC)
* Fix compilation by WCC makefile
* Fix compilation of darwin_stop_world for iOS 8+
* Fix cords for MANUAL_VDB
* Fix dependency on gc_cpp source in BCC_MAKEFILE and NT_MAKEFILE
* Fix GC_is_valid_displacement and GC_is_visible for non-small objects
* Fix gctest in leak-finding mode
* Fix infinite restarting of mark_some when a static root disappeared (Linux)
* Fix large object base computation in PUSH_CONTENTS() if MARK_BIT_PER_OBJ
* Fix mark stack overflow checking in push_selected
* Fix missing GC_dirty calls for GC-allocated objects used internally
* Fix missing GC_dirty invocation from debug_end_stubborn_change
* Fix MSWIN32 macro redefinition (WCC)
* Fix multi-threaded gctest for the case of NTHREADS is set to zero
* Fix new and delete operators definition for DigitalMars compiler
* Fix NT_MAKEFILE for VS 2017
* Fix potential null dereference in GC_CONS
* Fix register_dynamic_libraries on Windows 10
* Fix result computation in n_set_marks
* Fix return type in GC_set_warn_proc API documentation
* Fix tests for GC compiled with MANUAL_VDB
* Fix the build for Emscripten
* Fix typo in comment for CORD_ec_flush_buf prototype
* Fix typos in ChangeLog and generic_malloc
* Fix UNTESTED for multi-threaded API functions in gctest
* Fix VirtualQuery call in case of malloc failure (Win32)
* Install gc.3 man page instead of copying gc.man to doc folder (configure)
* Keep pointer to the start of previous entry in remove_specific_after_fork
* Move de_win compiled resource files to cord/tests
* Never return null by C++ GC allocators and gc_cpp operator new
* Perform thread_suspend in loop as it may be interrupted (Darwin)
* Really abort if failed to read /proc for library registration (Linux)
* Remove code duplication in gcj_malloc and malloc_explicitly_typed
* Remove duplicate local variable in reclaim_block
* Remove information how to send bugs from README.cords file
* Remove libatomic_ops license information
* Remove unused USE_GENERIC macro definition and description
* Suppress 'functions containing switch are not expanded inline' bcc warning
* Suppress 'non-member operator new/delete may not be inline' VC++ warning
* Turn on incremental collection in gctest also if MANUAL_VDB
* Update copyright information in alloc.c, gc.c/h and the documentation
* Update EXTRA_DIST in Makefile, Win32/64 docs after NT_*_MAKEFILE removal
* Update NT_MAKEFILE usage information in README files for Win32 and Win64
* Workaround 'class C does not have a copy constructor' cppcheck warning
* Workaround 'function nested_sp is never used' cppcheck style warning
* Workaround 'opposite expression on both sides of &' cppcheck style warning
* Workaround 'template-id not supported in this context' compiler error (WCC)
== [7.6.6] 2018-04-20 ==
* Define GC_FREEBSD_THREADS and GC_ADD_CALLER macros for kFreeBSD
* Eliminate 'boolean result used in bitwise operation' cppcheck warning
* Eliminate 'there is pointer arithmetic with NULL' cppcheck warning
* Explicitly unblock GC signals on GC initialization
* Fix 'scope of var can be reduced' cppcheck err in enqueue_all_finalizers
* Fix 'undefined reference to __builtin_unwind_init' linker error (ArmCC)
* Fix arguments delimiter in pcr_interface.c (PCR)
* Fix assertion violation in DllMain of win32_threads
* Fix comment for debug_generic_malloc_inner[_ignore_off_page]
* Fix data race during apply_to_each_object(reset_back_edge)
* Fix dbg_mlc.c/o file name in documentation
* Fix gctest with musl libc on s390x
* Fix include gc_gcj.h in thread_local_alloc.c
* Fix man section number (3)
* Fix missing GC_generic_malloc_words_small implementation in new_gc_alloc.h
* Fix missing new-line in ABORT_ARG<n> definition
* Fix missing SIGBUS handler setup for kFreeBSD
* Fix null dereference in print_callers on backtrace_symbols failure
* Fix null pointer dereference in get_private_path_and_zero_file (Symbian)
* Fix the collector hang when it is configured with --enable-gc-debug
* Fix thread_suspend fail for threads registered from key destructor (OS X)
* Fix type of local variables receiving result of PHT_HASH
* Fix typo in AIX macro name
* Fix typo in comment in specific.h
* Fix unbounded heap growth in case of intensive disappearing links usage
* Remove API symbols renaming in WCC_MAKEFILE
* Support Haiku/amd64 and Haiku/x86 hosts
* Support threads for DragonFly in configure
* Workaround 'address of auto-variable returned' cppcheck error
* Workaround gctest hang on kFreeBSD (if thread-local allocations are on)
== [7.6.4] 2018-01-26 ==
* Add note of set_free_space_divisor, set_warn_proc ABI change after gc-7.1
* Change compiler invocation example in gc.man to use dynamic libgc
* Delete dont_ar_* build intermediate files on make clean (Makefile.direct)
* Do not declare dl_iterate_phdr as weak for DragonFly
* Fix 'cords' parallel build in Makefile.direct
* Fix 'undeclared identifier USRSTACK' compiler error on OpenBSD-6.2
* Fix error code in abort message if sem_wait failed in start_world (NetBSD)
* Fix GC allocation mutex in child after a fork
* Fix global operator delete definition for C++14 in gc_cpp
* Fix last_reclaimed..gc_no interval comparison to threshold in unmap_old
* Fix libgc version which was changed in linkage breaking way
* Fix missing EOLn output in threadlibs tool
* Fix threadlibs tool to output '-lpthread' for DragonFly
* Prevent DATASTART redefinition for NaCl
* Remove obsolete advice about linking with _DYNAMIC=0 (Linux)
== [7.6.2] 2017-12-23 ==
* Add assertion that no hb_n_marks underflow occurs
* Add minimal testing of GC_MALLOC_[ATOMIC_]WORDS and GC_CONS (gctest)
* Add minimal testing of GC_set_bit (gctest)
* Add more cases to huge_test to cover sizes close to word-type maximum
* Add testing of new[]/delete[] (test_cpp)
* Adjust AO_HAVE_x check to match AO_fetch_and_add primitive variant used
* Adjust code indentation of calloc_explicitly_typed
* Align local_mark_stack in help_marker explicitly
* Allow custom TRACE_ENTRIES value
* Allow gctest and thread_leak_test with zero NTHREADS
* Avoid data race in finalized_count (gctest)
* Code refactoring of divide-by-HBLKSIZE occurrences
* Code refactoring of huge_test
* Code refactoring of tests/subthread_create regarding AO add primitive
* Compile thread_local_alloc only if multi-threaded build (Makefile.am)
* Delete preprocessor output on make clean (Makefile.direct)
* Disable implicit multi-threaded mode for Win32 to avoid LOCK crash
* Do not disable parallel mark for WRAP_MARK_SOME
* Do not enable mprotect-based incremental mode if unmapping is on (gctest)
* Do not install documentation if configure --disable-docs (new option)
* Do not use tkill (Android)
* Document base and size of objects allocated by finalized_malloc
* Document configure 'syntax error' issue in README
* Eliminate 'address of local variable returned' static analyzer warning
* Eliminate 'array vs singleton' code defect in typed_test (gctest)
* Eliminate 'assigned value never used' CSA warning in min_bytes_allocd
* Eliminate 'boolean result used in bitwise op' cppcheck false warning
* Eliminate 'C-style pointer casting' cppcheck style warnings in test
* Eliminate 'checking if unsigned variable is <0' cppcheck style warning
* Eliminate 'class member var with name also defined in parent' warning
* Eliminate 'comparison is always false' static analyzer warning in finalize
* Eliminate 'Condition 0==datastart always false' cppcheck warning (dyn_load)
* Eliminate 'condition is always true' cppcheck style warning
* Eliminate 'constructor with 1 argument is not explicit' cppcheck warning
* Eliminate 'CORD_*printf is never used' cppcheck style warnings (cordtest)
* Eliminate 'dereference of null' CSA false warning in array_mark_proc
* Eliminate 'function result not used' code defect in GC_mark_local
* Eliminate 'GC_collecting is set but never used' code defect (Win32)
* Eliminate 'GC_record_fault is never used' cppcheck style warning
* Eliminate 'integer shift by a negative amount' code defect in finalize
* Eliminate 'label not used' cppcheck false warnings in GC_mark_X
* Eliminate 'memory leak' code defect for scratch-allocated memory
* Eliminate 'memory leak' code defect in remove_specific
* Eliminate 'non-null arg compared to null' warning in toggleref_add (GCC)
* Eliminate 'non-reentrant function strtok called' cppcheck warning (POSIX)
* Eliminate 'possible integer underflow' code defect (cord-de)
* Eliminate 'potential overflow' static analyzer warning in test
* Eliminate 'printf format specifies type void*' GCC pedantic warnings
* Eliminate 'scope of variable can be reduced' cppcheck warnings
* Eliminate 'suspicious pointer subtraction' cppcheck warning (gc_cpp)
* Eliminate 'this statement may fall through' GCC warnings
* Eliminate 'unnecessary comparison of static strings' cppcheck warning
* Eliminate 'unsafe vsprintf is deprecated' compiler warning
* Eliminate 'unused formal parameter' compiler warnings in C++ code (MS VC)
* Eliminate 'unused variable' compiler warning in remove_all_threads_but_me
* Eliminate 'use of vulnerable sprintf' code defect in de_win test (cord)
* Eliminate 'value exceeds maximum object size' GCC warning in huge_test
* Eliminate 'value of CLOCK_TYPE unknown' cppcheck info message
* Eliminate 'value of DATASTART2 unknown' cppcheck info messages
* Eliminate 'value of GC_PTHREAD_EXIT_ATTRIBUTE unknown' cppcheck messages
* Eliminate 'value of GC_RETURN_ADDR_PARENT unknown' cppcheck info messages
* Eliminate 'value of NEED_FIXUP_POINTER unknown' cppcheck info messages
* Eliminate 'write to memory that was const-qualified' code analyzer warning
* Eliminate all 'scope of variable can be reduced' cppcheck style warnings
* Eliminate CSA warning about incorrect cast applied to HBLK_OBJS
* Eliminate CSA warning about narrowing cast in CleanUp of test_cpp
* Eliminate CSA warning of non-virtual destructor in test_cpp base class
* Eliminate CSA warning of staticroot that can be a local variable (tests)
* Eliminate CSA warning of unmodified non-const static var (disclaim_test)
* Eliminate redundant local variable in register_finalizer
* Eliminate TSan (Thread Sanitizer) warnings in gctest
* Eliminate UBSan warning of overflow during descr subtraction in mark_from
* Eliminate unreachable PROC/DEFAULT_VDB GC_printf calls in gctest main()
* Eliminate unsigned fl_builder_count underflow in mark_thread
* Enable GC_is_tmp_root for all platforms
* Execute more single-threaded GC tests by CMake
* Expand tabs to spaces in de_win.rc (tests)
* Export GC_dump_finalization/regions()
* Export GC_is_tmp_root() and GC_print_trace[_inner]()
* Export GC_print_free_list()
* Fix '32-bit value shift followed by expansion to 64-bit' code defect
* Fix 'GC_written_pages never read' code defect (GWW_VDB)
* Fix 'label cannot be reached' static analyzer warning in disclaim_test
* Fix 'size of tv is unknown' error in brief_async_signal_safe_sleep (musl)
* Fix 'syntax error' reported by cppcheck for mach_dep
* Fix 'unknown type name GC_INNER' compilation error (FreeBSD)
* Fix 'variable assigned a value that is never used' cppcheck style warnings
* Fix 'void pointers in calculations: behavior undefined' cppcheck warning
* Fix assertion violation about disabled cancel in try_to_collect_inner
* Fix atomic_ops build in Makefile.direct for Solaris
* Fix Clang static analyzer warning about not found gc_priv.h in extra files
* Fix compilation error in get_main_stack_base (Emscripten)
* Fix compilation for winpthreads if HANDLE_FORK
* Fix compilation if configured with --enable-werror on OS X
* Fix cord/de build in Makefile.direct (Linux)
* Fix data race in a list referenced by A.aa (gctest)
* Fix data race in collectable_count (gctest)
* Fix data race in do_local_mark when comparing active_count to helper_count
* Fix data race in GC_suspend/resume_thread
* Fix data race in last_stop_count access (suspend_handler_inner)
* Fix data race in make_descriptor when setting explicit_typing_initialized
* Fix data race in mark_thread when updating mark_no
* Fix data race when getting object size in explicitly-typed allocators
* Fix deadlock in GC_suspend_thread
* Fix gctest failure for Darwin if CPPCHECK is defined
* Fix lack of barriers to synchronize memory for suspend_handler
* Fix marking of disclaim-reachable objects in the incremental mode
* Fix message of VDB implementation used if MPROTECT_VDB+GWW_VDB (gctest)
* Fix missing started_thread_while_stopped call from mark_some if GCC/Clang
* Fix null dereference in GC_stack_range_for if not DARWIN_DONT_PARSE_STACK
* Fix page calculation in checksums
* Fix parallel build in Makefile.direct
* Fix test_cpp and c++ parallel build in Makefile.direct
* Fix typo in comment of GC_mark_some
* Fix typos in cdescr.html and README.sgi
* Make GC_INIT optional for clients even if thread-local allocations enabled
* Match uclinux pattern in configure
* Move conditional GC_need_to_lock setting to gc_locks.h (refactoring)
* Move README.QUICK from DOC_FILES to OTHER_FILES in Makefile.direct
* New API function (GC_is_init_called) to check if BDWGC is initialized
* New target (check-cpp) in Makefile.direct
* Prevent abort in register_data_segments for Symbian and Emscripten
* Prevent multiple 'Caught ACCESS_VIOLATION in marker' per collection
* Print realloc_count value in gctest
* Put invariant name in quotes to make mark_state comments clearer
* Refine configure messages when checking for compiler option support
* Remove extraneous semicolons after AC_MSG_WARN (configure)
* Remove page_was_dirty and remove_protection duplicate definitions
* Remove unnecessary type casts of printf arguments to unsigned long
* Remove unused ALIGN_DOUBLE, USE_GENERIC_PUSH_REGS macros (TILE-Gx/Pro)
* Rename 'test' to 'check' target in Makefile.direct
* Replace deprecated rewind to fseek in cordxtra
* Report gcc/clang pedantic warnings (configure)
* Skip thread suspend/resume API testing for Tru64 (OSF1)
* Support AddressSanitizer (Clang/GCC) and MemorySanitizer (Clang)
* Support GC_init (and get_stack_base) from non-main thread on FreeBSD/NetBSD
* Suppress 'tainted string passed to vulnerable operation' false defects
* Suppress 'taking address of label non-standard' GCC/Clang pedantic warning
* Test GC initialization from non-main thread on FreeBSD and NetBSD
* Test GCJ object creation with length-based descriptor (gctest)
* Update comment in finalized_disclaim to match FINALIZER_CLOSURE_FLAG
* Update README regarding make cords with Makefile.direct
* Update README to use autogen.sh on build from the source repository
* Update shared libraries version info to differentiate against v7.4
* Use mprotect instead of mmap in GC_unmap() on Cygwin
* Use same style of include gc.h in documentation
* Workaround '!GC_page_size is always false' cppcheck style warning
* Workaround '#error' cppcheck error messages
* Workaround '32-bit value shift by >31 bits is undefined' cppcheck warnings
* Workaround 'array compared to 0', 'untrusted loop bound' false defects
* Workaround 'bad address arithmetic' static analysis tool false positive
* Workaround 'checking if unsigned value is negative' cppcheck warning
* Workaround 'checking unsigned value is negative' code defect in mark_from
* Workaround 'comparison of identical expressions' false code defects
* Workaround 'Condition 0!=GETENV() is always false' cppcheck style warnings
* Workaround 'condition is always false' cppcheck warning in get_next_stack
* Workaround 'condition is always true' cppcheck style warnings in GC_init
* Workaround 'function is never used' cppcheck style warnings
* Workaround 'insecure libc pseudo-random number generator used' code defect
* Workaround 'int shift by negative amount' false code defect in finalize
* Workaround 'local variable size too big' static analyzer warning
* Workaround 'memory leak: result' cppcheck false error (POSIX)
* Workaround 'null pointer dereference' false positive in push_next_marked
* Workaround 'obsolescent bcopy, bzero called' cppcheck warnings (POSIX)
* Workaround 'obsolescent usleep called' cppcheck warning (POSIX)
* Workaround 'obsolete function alloca() called' cppcheck warnings
* Workaround 'passing untyped NULL to variadic function' cppcheck warning
* Workaround 'pointer used before comparison to null' code defect (pthread)
* Workaround 'possible null pointer dereference' cppcheck warnings
* Workaround 'potential multiplication overflow' code defect in de_win (cord)
* Workaround 'redundant assignment of *result to itself' cppcheck warning
* Workaround 'resource leak' false positives in alloc_MS, bl/envfile_init
* Workaround 'same expression on both sides of ==' cppcheck style warning
* Workaround 'same expression on both sides of OR' cppcheck style warning
* Workaround 'struct member is never used' cppcheck style warnings
* Workaround 'tainted int used as loop bound' static analysis tool warning
* Workaround 'Uninitialized variable' cppcheck errors
* Workaround 'unused variable' cppcheck style warnings
* Workaround 'va_list used before va_start' cppcheck error in cord
* Workaround 'value of macro unknown' cppcheck info messages
* Workaround 'value of REDIRECT_MALLOC/FREE unknown' cppcheck info messages
* Workaround 'value of SIGBUS unknown' cppcheck info messages
* Workaround 'value of WINAPI unknown' cppcheck info messages
* Workaround 'variable hides enumerator with same name' cppcheck warnings
* Workaround 'variable reassigned before old value used' cppcheck warnings
* Workaround 'waiting while holding lock' code defect in stop_world (Unix)
* Workaround false 'uninitialized var use' code defect (initsecondarythread)
Also, includes 7.4.6 changes
== [7.6.0] 2016-08-02 ==
* ABORT_ARGn log details at INFO level (Android)
* Add 'pragma message' to gc.h to detect inconsistent WIN64/_WIN64 (MS VC)
* Add API function to calculate total memory in use by all GC blocks
* Add API function to set/modify GC log file descriptor (Unix)
* Add alloc_size attribute to GC_generic_malloc
* Add alt-stack registration support
* Add assertion for GC_new_kind boolean arguments
* Add assertion on lock status to GC_alloc_large and its callers
* Add build scripts for VC 9 (Win32/64)
* Add build system plumbing for building with -Werror
* Add incremental GC support for Darwin/arm64
* Add profiling callback events to indicate start/end of reclaim phase
* Add support for enumerating the reachable objects in the heap
* Add toggle-ref support (following Mono GC API)
* Added instructions to README.md for building from git
* Adjust code indentation of malloc/calloc/str[n]dup
* Allow fork() automatic handling on Android with API level 21+
* Allow specific TLS attributes for GC_thread_key
* Allow thread local allocations from within pthread TLS destructors
* Allow to force GC_dump_regularly set on at compilation
* Altera NIOS2 support
* Change 'cord' no-argument functions declaration style to ANSI C
* Check DATASTART is less than DATAEND even assertions off
* Check for execinfo.h by configure
* Code refactoring of GC_push_finalizer/thread/typed_structures
* Code refactoring regarding 'data start' definition for FreeBSD
* Consistently set type of DATASTART/END to ptr_t (code refactoring)
* Consistently use int[] type for '_end' symbol (code refactoring)
* Consistently use outermost parentheses for DATASTART/END, STACKBOTTOM
* Define GC_LINUX_THREADS, NO_EXECUTE_PERMISSION in configure for NaCl
* Define ROUNDUP_PAGESIZE, ROUNDUP_GRANULE_SIZE macros (code refactoring)
* Define public GC_GENERIC_OR_SPECIAL_MALLOC and GC_get_kind_and_size
* Do no declare kernel_id field of GC_Thread_Rep for 64-bit Android
* Do not allow SHORT_DBG_HDRS if KEEP_BACK_PTRS or MAKE_BACK_GRAPH
* Do not warn of missing PT_GNU_RELRO segment when custom DSO filter used
* Document GC_register_my_thread returned value
* Dump the block information in CSV format
* Eliminate redundant *flh check for null in GC_allocobj
* Enable atomic-uncollectable in operator new in gc_cpp.h
* Enable build with musl libc
* Enable gc.h inclusion by client without implicit include windows.h (Win32)
* Enable huge_test for Win64 (and LLP64 target)
* Enable thread-local storage for Android Clang
* Enable thread-local storage usage for GC_malloc/calloc_explicitly_typed
* Export GC_push_all_eager, GC_push_finalizer_structures
* Fix 'arg parameter might be clobbered by setjmp' compiler warning
* Fix assertion in GC_mark_from for non-heap regions
* Fix compilation for Android clang/arm with bfd linker
* Fix integer shift undefined behavior in GC_init_explicit_typing
* Fix missing new-line and redundant trailing dot in WARN messages
* Fix STACKBOTTOM for Solaris 11/x86
* Fix tag collision between ENABLE_DISCLAIM and KEEP_BACK_PTRS
* Fix unchecked fork() result in gctest (Unix, Cygwin)
* Fix user-defined signals drop by marker threads
* Fix various typos in comments and documentation
* FreeBSD/arm support improvement
* GC_make_descriptor code refactoring (eliminate two local variables)
* GC_malloc[_atomic] global and thread-local generalization with kind
* GC_malloc_[atomic_]uncollectable generalization
* GC_scratch_alloc code refactoring (and WARN message improvement)
* Group all compact fields of GC_arrays to fit in single page
* Handle load_segs overflow in register_dynlib_callback gracefully
* Harmonize OSX/iOS configuration; enable compiling for iPhone simulator
* Implement event callbacks for profiling (following Mono GC API)
* Implement the finalization extension API
* Implement thread suspend/resume API (Linux threads only)
* Improve documentation for disappearing links in gc.h
* Make heap growth more conservative after GC_gcollect_and_unmap call
* Mark fo_head, finalize_now with a single GC_push_all call (refactoring)
* Move MessageBox invocation code from GC_abort to a separate routine (Win32)
* NaCl/arm initial support; NaCl runtime fixes for other CPUs
* New macro (GC_ALWAYS_MULTITHREADED) to set multi-threaded mode implicitly
* New macro (NO_WINMAIN_ENTRY) to prefer main() instead of WinMain in test
* New macro (REDIRECT_MALLOC_IN_HEADER) to enable source-level redirection
* Process all PT_LOAD segments before PT_GNU_RELRO segments (Glibc)
* Re-implement GC_finalized_malloc using GC_malloc_kind
* Refactoring of android_thread_kill/pthread_kill calls
* Refactoring of GC_Xobjfreelist (use single array to keep free lists)
* Refactoring of thread-local *_freelists (use single array of free lists)
* Refine description in README how to build from source repository
* Refine GC_free_space_divisor comment regarding its initial value
* Reformat code of gc_cpp.cc/h
* Remove 'opp' local variable in GC_malloc_X
* Remove 'sig' argument of GC_suspend_handler_inner (code refactoring)
* Remove code commented out by 'ifdef UNDEFINED'
* Remove hb_large_block field (use 1 extra bit of hb_flags instead)
* Remove obsolete BACKING_STORE_ALIGNMENT/DISPLACEMENT macros for Linux/IA64
* Remove redundant casts in GC_generic_or_special_malloc and similar
* Remove unsupported FreeBSD/ia64 case from gcconfig.h file
* Remove unused GC_gcjdebugobjfreelist
* Rename ATOMIC_UNCOLLECTABLE to GC_ATOMIC_UNCOLLECTABLE
* Replace non-API occurrences of GC_word to word (code refactoring)
* Return GC_UNIMPLEMENTED instead of abort in GC_get_stack_base (OS/2)
* Show WoW64 warning message if running 32-bit on Win64 (enabled by macro)
* Standalone profiling callback for threads suspend/resume
* Support (add machine description for) TILE-Gx and TILEPro targets
* Support build for Android 64-bit (arm64, mips64, x86_64)
* Support FreeBSD/aarch64, FreeBSD/mips
* Support iOS7 64-bit (AArch64) and iOS8+ 32/64-bit (Darwin)
* Support MinGW build in scripts
* Turn off sigsetjmp workaround for Android/x86 starting from NDK r8e
* Use magic header on objects to improve disclaim_test
* Workaround 'sa_sigaction member missing' compiler error (Android/x32)
* Workaround 'unresolved __tls_get_addr' error for Android NDK Clang
* Workaround a bug in winpthreads causing parallel marks deadlock (MinGW)
Also, includes 7.4.4 changes
== [7.4.20] (not released yet) ==
* Do not hold GC_fault_handler_lock when in Sleep (Windows)
* Eliminate 'static GC_sysinfo definition has incomplete type' Clang warning
* Eliminate 'unused function GC_add_map_entry' compiler warning
* Eliminate 'while clause does not guard' GCC warning in GC_parse_map_entry
* Fix OS_TYPE and USE_MMAP_ANON definitions for Cygwin/x64
* Fix abort in GC_printf when gctest is built as WinMain executable (Cygwin)
* Fix configure message about 'AIX gcc optimization fix'
* Fix cordtest build in SMakefile.amiga
* Prevent GetThreadContext failure (Windows)
* Refactoring of WoW64 workaround (Win32)
Also, includes 7.2o changes
== [7.4.18] 2019-03-01 ==
* Fix 'wrong __data_start/_end pair' error on Android
* Fix thread_info() count argument value (OS X)
Also, includes 7.2n changes
== [7.4.16] 2018-12-13 ==
* Fix 'collecting from unknown thread' abort in leak-finding mode for Win32
* Fix 'undefined reference to GC_incremental' linker error in pthread_start
* Fix GC_register_disclaim_proc for leak-finding mode
* Fix concurrent bitmap update in GC_dirty
* Fix marking of finalizer closure object
* Fix marks and hb_n_marks consistency when disclaim returns true
* Fix missing curses.h in cord/de when compiling manually (MS VC, MinGW)
* Refine documentation in gc_disclaim.h
Also, includes 7.2m changes
== [7.4.14] 2018-08-11 ==
* Cleanup BCC Makefile (remove absolute GC paths, fix del cmd, update clean)
* Do not call GC_dirty_inner unless GC_incremental
* Eliminate 'cast between incompatible function types' compiler warning
* Eliminate 'comparing signed and unsigned values' compiler warnings (bcc)
* Eliminate 'language extension used' Clang warning in gc.h
* Eliminate 'possibly incorrect assignment in CORD_vsprintf' compiler warning
* Eliminate 'switch statement contains no case label' compiler warning
* Eliminate 'variable might be uninitialized' warning in win32_start_inner
* Eliminate duplicate clear_mark_bit call when removing disappearing link
* Fix 'collecting from unknown thread' abort in leak-finding mode
* Fix compilation by digimars.mak (DMC) and by WCC makefile
* Fix cords for MANUAL_VDB
* Fix dependency on gc_cpp source in BCC_MAKEFILE and NT_MAKEFILE
* Fix gctest in leak-finding mode
* Fix missing GC_dirty calls for GC-allocated objects used internally
* Fix missing GC_dirty invocation from debug_end_stubborn_change
* Fix multi-threaded gctest for the case of NTHREADS is set to zero
* Fix typos in ChangeLog and generic_malloc
* Keep pointer to the start of previous entry in remove_specific_after_fork
* New API function (GC_is_init_called) to check if BDWGC is initialized
* Remove code duplication in gcj_malloc and malloc_explicitly_typed
* Remove duplicate local variable in reclaim_block
* Remove libatomic_ops license information from README
* Workaround 'dynamic exception specifications deprecated in C++11' warning
Also, includes 7.2l changes
== [7.4.12] 2018-04-19 ==
* Define GC_FREEBSD_THREADS and GC_ADD_CALLER macros for kFreeBSD
* Fix comment for debug_generic_malloc_inner[_ignore_off_page]
* Fix gctest with musl libc on s390x
* Fix missing new-line in ABORT_ARG<n> definition
* Fix null pointer dereference in get_private_path_and_zero_file (Symbian)
* Fix type of local variables receiving result of PHT_HASH
* Remove API symbols renaming in WCC_MAKEFILE
Also, includes 7.2k changes
== [7.4.10] 2018-01-22 ==
* Fix error code in abort message if sem_wait failed in start_world (NetBSD)
Also, includes 7.2j changes
== [7.4.8] 2017-12-22 ==
* Eliminate 'this statement may fall through' GCC warnings
* Eliminate 'value exceeds maximum object size' GCC warning in huge_test
* Fix data race in make_descriptor when setting explicit_typing_initialized
* Fix marking of disclaim-reachable objects in the incremental mode
* Update comment in finalized_disclaim to match FINALIZER_CLOSURE_FLAG
Also, includes 7.2i changes
== [7.4.6] 2017-10-26 ==
* Add configure --enable-gcov option (enable code coverage analysis)
* Add configure check whether to define NO_GETCONTEXT
* Adjust GC_memalign comment
* Allow HAVE_DL_ITERATE_PHDR to be defined by client (musl)
* Allow PKG_CHECK_MODULES in configure.ac to be commented out easily
* Avoid busy waiting in mark_thread while GC_parallel is false
* Better document minimum value of size argument for typed allocations
* Change type of THREAD_TABLE_INDEX result to int in win32_threads.c
* Consistently use 'msec' instead of 'ms' in comments in pthread_support
* Do not define amiga_get_mem, MacTemporaryNewPtr unless really used (extra)
* Do not produce .tar.bz2 distribution file (configure)
* Do not require libatomic_ops for single-threaded builds (configure)
* Do not warn of missing PT_GNU_RELRO segment when custom DSO filter used
* Document GWW_VDB in gcdescr.html
* Eliminate 'cast to void* from int' compiler warnings (Darwin/x64)
* Eliminate 'conditional expression is always true' code defect in GC_init
* Eliminate 'FP divide-by-zero' static analyzer warning
* Eliminate 'incompatible function pointer' warning in mark_some (MinGW/x86)
* Eliminate 'ISO C forbids an empty translation unit' GCC pedantic warning
* Eliminate 'ISO C forbids object to function pointer conversion' warning
* Eliminate 'locally defined symbol imported' MS linker warnings (cord)
* Eliminate 'null dereference' code defect warning in register_finalizer
* Eliminate 'possible loss of data' compiler warnings (MS VC)
* Eliminate 'printf format specifier mismatch' compiler warning (tools)
* Eliminate 'type defaults to int in declaration' warning (REDIRECT_MALLOC)
* Eliminate 'value stored is never read' warning of Clang static analyzer
* Eliminate duplicate log messages in GC_mark_from
* Eliminate most of collisions in GC_threads on Linux/x64
* Ensure GC initialized when atfork_prepare is called by client
* Fix 'arg parameter might be clobbered by setjmp' compiler warning
* Fix 'bogus LR' detection in FindTopOfStack (Darwin)
* Fix 'execvp argument incompatible pointer type' compiler warning (tools)
* Fix 'GetVersion deprecated' compiler warning in os_dep (MS VC)
* Fix 'incompatible pointer' compiler warning in GC_init_dyld (OS X 64-bit)
* Fix 'incompatible ptr-to-int conversion' compiler warning in push_all_stack
* Fix 'ISO C90 does not support %lf, %lg gnu_printf formats' GCC warnings
* Fix 'ISO C90 forbids mixed declarations and code' compiler warning
* Fix 'missing libc-version.h' build error (uClibc/x86[_64])
* Fix 'replacement operator delete cannot be inline' GCC warning (Cygwin)
* Fix 'variable unused' compiler warning in FirstDLOpenedLinkMap
* Fix 'zero-size array is extension' Clang warning in os_dep (Linux/x86)
* Fix (adjust) GC_scratch_alloc actual argument type
* Fix deadlock in GC_help_marker caused by use of mark_cv of parent process
* Fix finalize.c compilation in 'strict ANSI' mode
* Fix GC shared library tests failure related to dl_iterate_phdr (musl)
* Fix gc.h compliance to strict ANSI (pthreads)
* Fix GC_bytes_allocd incrementation in case of allocation failure
* Fix GC_jmp_buf multiple definition
* Fix GC_noop6 definition to avoid its calls to be optimized away
* Fix gctest failure if PARALLEL_MARK (musl)
* Fix gctest thread stack overflow (musl-gcc)
* Fix initsecondarythread_test runtime failure if GC compiled w/o threads
* Fix lack of 2 trailing zeros in _MSC_VER numbers
* Fix local variable declarations in disclaim_bench
* Fix missing #error pragma
* Fix missing .exe for disclaim test filenames in Makefile (MinGW)
* Fix missing atomic/[un]collectable/realloc_count increments in gctest
* Fix missing new-line and redundant trailing dot in WARN messages
* Fix missing new-line at format strings end in subthread_create test
* Fix mixed include of GC public header and gc_priv.h in disclaim bench/test
* Fix potential overflow in decrement when computing GC_markers_m1
* Fix printf format specifiers in extra files (cppcheck warnings)
* Fix pthread_start compilation if single-obj-compilation (Linux)
* Fix register_finalizer call in disclaim_bench for GC_DEBUG
* Fix static assertion violation in LONG_MULT for 64-bit targets
* Fix tag collision between ENABLE_DISCLAIM and KEEP_BACK_PTRS
* Fix thread id leaks in subthread_create and threadkey_test
* Fix threaded tests runtime crash if GC_NO_THREAD_REDIRECTS supplied
* Fix tools/setjmp_t to prevent nested_sp inlining
* Fix typo in CHECK_GCLIB_VERSION name (test)
* Fix typos in comments/documentation (ews4800, extend_size_map, push_roots)
* Fix unchecked fork() result in gctest (Unix, Cygwin)
* Improve detection of internal libatomic_ops (configure)
* Move libraries version info to the beginning of Makefile.am
* Prevent abort in register_data_segments for Symbian
* Process all PT_LOAD segments before PT_GNU_RELRO segments (Glibc)
* Refine Makefile.direct comment about multi-threaded GC build
* Refine README about library source downloading
* Refine should_invoke_finalizers documentation
* Remove all generated files by NT_X64_THREADS_MAKEFILE 'clean' target
* Remove non-existent configure option in simple_example.html
* Replace C++ style comments to C ones, remove commented out code (extra)
* Support CFLAGS_EXTRA to pass extra user-defined compiler flags (configure)
* Support CFLAGS_EXTRA when checking for inline and dladdr (configure)
* Suppress 'tainted string passed to vulnerable operation' false defects
* Suppress MS VC warnings about unused param, const condition (NT_MAKEFILE)
* Update bdwgc mailing list online archive link in documentation
* Update shared libraries version info to differentiate against v7.2
* Use AC_DEFINE for defining NO_GETCONTEXT in configure
* Workaround 'index out of bounds' UBSan false warning in push_marked
* Workaround 'mmap() resource handle leak' static analyzer warning
* Workaround 'redundant assignment of *result to itself' cppcheck warning
* Workaround 'resource leak' error reported by cppcheck (tools, test)
Also, includes 7.2h changes
== [7.4.4] 2016-05-25 ==
* Allow GC_FAST_MALLOC_GRANS() multiple use in a function
* Also enable the TSX workaround for i386 (Linux)
* Avoid unstructured procfs on Solaris
* Change cord/de main() declaration style from K-R to ANSI C
* Change no-argument functions declaration style to ANSI C (cord)
* Do not include sigcontext.h and asm/sigcontext.h
* Eliminate 'divide by zero' compiler warning in cordtest
* Eliminate warning about 64-bit pointer-to-int cast (Win64/pthreads-w32)
* Eliminate warnings detected by Cppcheck in cord de[_win]
* Fix 'comparison of non-null parameter is always false' warning (Clang)
* Fix 'CORD_iter5 unused result' code defect in cordxtra
* Fix 'GC_generic_malloc_inner_ignore_off_page not used' compiler warning
* Fix 'implicit declaration of vsnprintf' GCC warning (if strict ANSI mode)
* Fix 'signed-to-bigger-unsigned value assignment' in GC_init_size_map
* Fix 'signed-to-bigger-unsigned value assignment' warning for hb_map
* Fix 'signed-to-bigger-unsigned value assignment' warning in GC_setpagesize
* Fix 'statement unreachable' compiler warning in GC_mark_from
* Fix 'statement unreachable' compiler warning in memalign
* Fix 'unused label' compiler warning in cord/de
* Fix 'value truncated' compiler warning in CORD_cat (MS VC)
* Fix 'variable unused' warning in GC_save_callers
* Fix 'visibility attribute not supported' GCC warning (IBM AIX)
* Fix CMake warning about CMP0054 by unquoting instances of HOST
* Fix Cygwin64 build
* Fix GC_REALLOC to call GC_FREE if new size is zero and pointer is non-NULL
* Fix Makefile.direct for Cygwin
* Fix __alloc_size__ availability detection (Clang)
* Fix abort message in GC_move_long_link
* Fix and code refactoring of lock elision workaround (Linux/x64)
* Fix assertion on mark_lock_holder for non-unique NUMERIC_THREAD_ID
* Fix data race in GC_init_explicit_typing
* Fix gc.mak regarding msvc_dbg and test (MSVC)
* Fix missing error handling of pthread_attr_init/getstacksize
* Fix missing error handling of pthreads_mutex_init and cond_wait
* Fix missing numeric casts in cord
* Fix potential left shift overflows in finalize.c (64-bit targets)
* Fix pthreads-win32 name in comments and documentation
* Fix setup_mark_lock missing prototype
* Fix unchecked fcntl() result
* Fix unchecked pointer dereference in check_ints (gctest)
* Fix unchecked pthread_join() result in threadkey_test
* Fix unchecked sigdelset() result in pthread_support
* Fix undefined PTRFREE/NORMAL in gc_inline.h
* Prefix PREFETCH_FOR_WRITE with GC_ as used in gc_inline.h public header
* Relax mark_mutex attribute needed to disable elision (Linux/x64)
* Remove (deprecate) TODO file
* Remove code duplication in GC_realloc
* Remove duplicate new-line in OUT_OF_MEMORY message (cord)
* Remove references to missing linux_threads.c from documentation
* Revert "Move asm machine-dependent files to 'src' folder" (partly)
* Support Android API level 21
* Update compiler options in gc.mak (Win32)
* Use mmap instead of sbrk (Hurd)
* Workaround 'comparison is always false' GCC warning in GC_FAST_MALLOC_GRANS
* Workaround 'identical expr on both sides of bitwise op' warning
* Workaround Linux NTPL lock elision bug
* Workaround false warning about unreachable code path
* Workaround invalid '_end' symbol on Android clang 3.5+
Also, includes 7.2g changes
== [7.4.2] 2014-06-03 ==
* Add config option to use STGRTMIN-based signals for thread suspend/resume
* Allow parallel mark to be enabled on powerpc-linux systems
* Check for Fujitsu compiler in builtin_unwind logic (enable FX10/K-Computer)
* Fix 'Array subscript is above array bounds' GCC warning in GC_new_kind/proc
* Fix 'attribute declaration must precede definition' warning (clang-3.1)
* Fix (enable) Cygwin-64 build
* Fix GC_finalized_malloc failure on disclaim_test
* Fix GC_sig_suspend initialization when non-constant SIGRTMIN used
* Fix MS VC redefinition warning for functions declared with GC_ATTR_MALLOC
* Fix TEXT() usage for concatenated strings in GC_CreateLogFile (Win32)
* Fix data roots registration for Android/x86 and NDK ARM 'gold' linker
* Fix find stackbottom on BlueGene P/Q systems
* Fix machdep .lo files path in configure (SPARC, IA-64)
* Fix ok_init assignment (missing cast) in GC_new_kind_inner
* Fix typos in names in AUTHORS and ChangeLog files
* Remove barrett_diagram file duplicated by tree.html
* Remove non-existing DISCARD_WORDS from GC data structure ASCII diagram
* Restore contribution information for ancient releases in ChangeLog
Also, includes 7.2f changes
== [7.4.0] 2013-11-17 ==
* Add 'bytes reclaimed' counters to public GC_prof_stats_s
* Add AArch64 (64-bit ARM) target support
* Add GC_LONG_REFS_NOT_NEEDED ifdefs to exclude long link functionality
* Add GC_get_prof_stats[_unsafe]() to GC public API
* Add GC_push_all/conditional() to GC public API
* Add assertion on number_of_objs to GC_extend_size_map
* Add assertion to GC_enable() ensuring no counter underflow
* Add assertion to LOCK definition that lock is not already held
* Add assertion to LONG_MULT and remove useless assert in PUSH_CONTENTS_HDR
* Add double-lock assertion to GC_acquire_mark_lock
* Add manual POSIX fork handling support (Android)
* Add note about 'pkg-config' solving problem with autoconf 2.68 or older
* Add public GC_set/get_abort_func to replace default GC_on_abort
* Add public GC_start_mark_threads() to allow parallel marker in fork child
* Add public setter and getter for GC_push_other_roots
* Add support of Android logger
* Add tests for GC_register/move/unregister_long_link
* Add thread suspend/resume signals public setters (POSIX threads)
* Added long weakref support
* Adjust GC_dont_expand/gc/precollect and GC_print_stats type to match gc.h
* Adjust README.md title and references to doc .html files in it
* Adjust build scripts to enable additional test library in staticrootstest
* Adjust logged messages in start_mark_threads and GC_thr_init
* Adjust printf format specifiers in GC_print_trace
* Allow not to rely on __data_start value (Linux)
* Allow pthread_kill error code logging in GC_suspend/resume (debugging)
* Allow to compile GC_inner_start_routine aside from extra/gc.c
* Allow to omit libc atexit() call
* Avoid LOCK/UNLOCK hard-coding in gc_locks.h for PS3 target
* Better document GC_warn_proc in gc.h
* Call GC_on_abort (with NULL argument) on exit(1)
* Call GC_stats/verbose_log_printf instead of GC_log_printf if print_stats
* Change policy regarding version numbers ("micro" part instead of "alpha")
* Changed C99-style designated init of GC_dl_hashtbl struct to use C89-style
* Check GC_base result in GC_print_all_smashed_proc
* Check that SIG_SUSPEND and SIG_THR_RESTART are different (Pthreads)
* Check traceable_allocator.allocate result before dereference in test_cpp
* Code refactoring of GC_x_printf (move shared code to macro)
* Convert readme to markdown
* Default to use libc_stack_end in single-threaded GC on glibc targets
* Define GC_VSNPRINTF internal macro in misc.c (code refactoring)
* Define functions in darwin_semaphore.h as inline instead of static
* Define old_bus_handler static variable only if used (Unix)
* Detect dladdr() presence by configure
* Disable find-leak GC_gcollect on GC abnormal EXIT
* Do not define _setjmp/_longjmp macros in mach_dep.c
* Do not duplicate android_log_write output to GC log file (Android)
* Do not include sigcontext.h if NO_SIGCONTEXT_H (Linux)
* Do not set GC_lock_holder by call_with_alloc_lock if assertions disabled
* Do not use pthread_getattr_np if NO_PTHREAD_GETATTR_NP specified
* Elaborate comment on dependencies in autogen.sh
* Eliminate 'cast from int to pointer' warning in GC_exclude_static_roots
* Eliminate 'missing exception specification' warning in gc_cpp.cc (Clang)
* Eliminate 'uninitialized variable use' warning in test_printf (cord)
* Eliminate 'unused result' compiler warning in main() of test_cpp
* Eliminate 'unused value' compiler warning in GC_stop_world (Pthreads)
* Eliminate 'unused variable' compiler warning in start_mark_threads (HP/UX)
* Eliminate Clang warning for GC_pthread_exit attribute
* Eliminate GCC warning about uninitialized 'hhdr' in GC_allochblk_nth
* Eliminate GCC warning in GC_get_main_stack_base (OpenBSD)
* Eliminate GCC warnings in setjmp_t.c, test_cpp and cord 'de' app
* Eliminate GC_first_nonempty atomic value reload in GC_mark_local assertion
* Eliminate SIGBUS-related dead code in GC_write_fault_handler (Linux)
* Eliminate warning and simplify expression in GC_init_explicit_typing
* Enable 'force GC at every GC_malloc' debug-related functionality
* Enable on-demand debug logging in GC_FindTopOfStack (Darwin)
* Enable prefetch operations by default (GCC 3.0+)
* Enable staticrootstest for the case of GC shared library build
* Enable thread-local allocation support for Clang on Cygwin
* Explicitly specify that Darwin, Linux and Solaris platforms have dladdr
* Fix ABORT definition for mingw32ce (WinCE)
* Fix AM_CONFIG_HEADER in configure for autoconf-2.69-1
* Fix GC_CreateThread and GC_beginthreadex definition for Cygwin
* Fix GC_INIT_CONF_ROOTS in gc.h for Android
* Fix GC_INLINE definition to comply with ISO C90 standard (GCC)
* Fix GC_remove_all_threads_but_me for Android (fork support)
* Fix debug_register_displacement calls from GC_debug_generic_malloc_inner
* Fix dyn_load.c compilation for Android 4.3
* Fix make disclaim_test to link with new GNU ld linking rules
* Improve GC error printing atomicity in GC_debug_X and GC_print_obj
* Improve GC output atomicity in GC_print_obj, GC_print_all_errors
* Improve debug-only messages of add/remove_roots and init_linux_data_start
* Improve fork test logging in gctest
* Improve logged messages about heap size and usage
* Improve logging for Android differentiating messages by log level
* Improve staticrootstest (add global data to library, add lib w/o GC_INIT)
* Improve staticrootstest checks (tests)
* Include "config.h" instead of "private/config.h" on HAVE_CONFIG_H
* Include proper header file in 'tools' for configuration macros
* Include pthread_np.h from pthread_stop_world.c on OpenBSD
* Log error messages to stderr instead of stdout in tests
* Make GC_generic_malloc_ignore_off_page() public
* Make GC_mark_lock_holder variable static
* Make GC_print_trace always thread-safe and remove 'lock' argument
* Mark GC_started_thread_while_stopped() as GC_INNER
* Minimize code duplication in GC_mark_and_push
* Move 'include setjmp.h' from mach_dep.c to gc_priv.h
* Move GC_OPENBSD_UTHREADS definition to private/gcconfig.h (OpenBSD)
* Move GC_get_suspend/thr_restart_signal to misc.c for NaCl and OpenBSD
* Move LOCK/UNLOCK from GC_unregister_disappearing_link_inner outer
* Port BDWGC to Android/x86
* Postpone the suspend signal in GC_dirty_init only if used to stop world
* Prepend '#' symbol to GC number in logged messages
* Prevent POSIX fork if mprotect_thread is started (Darwin)
* Prevent abort on GC_err/warn_printf write failure
* Prevent misleading AC_MSG_ERROR/AS_IF errors reported in configure.ac
* Put gc_cpp symbols into 'boehmgc' namespace if GC_NAMESPACE defined
* Recognize GC_DONT_GC macro in gc.h (causes GC_INIT to turn off GC)
* Recognize GC_SIG_SUSPEND and GC_SIG_THR_RESTART tuning macros in gc.h
* Redirect WRITE to __android_log_write if GC_ANDROID_LOG (Android)
* Refine comment of GC_is_heap_ptr and GC_thread_is_registered in gc.h
* Register dynamic libraries via dl_iterate_phdr on Android and OpenBSD
* Remove DebugBreak on WriteFile failure (Win32)
* Remove GC_BUILD definition from build scripts
* Remove abort on open log failure from GC_write (Win32)
* Remove configure.ac outdated revision number
* Remove nested EXPECT in GC_core_finalized_malloc
* Remove nested always-false ifdef for HPUX and FREEBSD
* Remove redundant GC_err_printf before abort
* Remove unused UTHREAD_SP_OFFSET macro (OpenBSD)
* Rename subthread_create to subthreadcreate_test (Makefile)
* Replace GC_COND_LOG_PRINTF calls with WARN for allocation failure messages
* Replace GC_log/err_printf() followed by ABORT with ABORT_ARGn()
* Replace GC_stats_log_printf with GC_DBG/INFOLOG_PRINTF
* Replace SIG_SUSPEND/THR_RESTART macros to variables in pthread_stop_world
* Replace Win32 GC_delete_gc_thread with GC_delete_gc_thread_no_free
* Replace conditional GC_log_printf calls with GC_COND/VERBOSE_LOG_PRINTF
* Replace sprintf with defensive snprintf
* Replace var-args GC_noop with GC_noop6 (to eliminate Clang warning)
* Simplify LOCK/UNLOCK macro definition for static code analysis tools
* Specify GC_malloc result is unused in some tests
* Specify GC_pthread_join result is unused in threadkey_test
* Specify LT_INIT in configure.ac
* Start of port to QNX
* Support rthreads introduced in OpenBSD 5.2+
* Suppress 'GC_dont_gc deprecated' warning in gc.h if GC_DONT_GC
* Tag GC malloc routines with alloc_size attribute for Clang 3.2+
* Test NO_WRAP_MARK_SOME macro to suppress WRAP_MARK_SOME-specific code
* Turn off GC_LOOP_ON_ABORT functionality if GC compiled with NO_DEBUGGING
* Turn on world-stop delay logging at debug level by default for Android
* Use EXPECT in GC_COND/VERBOSE_LOG_PRINTF
* Use GC_log_printf for logging instead of GC_[err_]printf
* Use compiler TLS for Android NDK gcc/arm
* Use memcpy (BCOPY) instead of strcpy (to suppress GCC warning)
* Use pthread API to operate thread-local data on Linux if no compiler TLS
* Workaround 'ELF_DATA/EM_ALPHA redefined' warning in Android linker.h
* Workaround 'unresolved __tls_get_addr' error for Android NDK Clang
Also, includes 7.2e, 7.2d, 7.2c, 7.2b changes
== [7.3alpha2] 2012-05-11 ==
* Add 'const' qualifier to pointer argument of some API functions
* Add GC_UNDERSCORE_STDCALL, UNICODE macro templates to configure (Win32)
* Add GC_get_thr_restart_signal, GC_thread_is_registered to GC API
* Add GC_is_heap_ptr, GC_move_disappearing_link to GC API
* Add SHORT_DBG_HDRS macro template to configure
* Add Symbian port to mainline (porting done by Djamel Magri)
* Add TODO file
* Add assertion ensuring proper alignment of 'pushed' GC symbols
* Add assertion in GC_getspecific on qtid
* Add assertion to GC_incremental_protection_needs, refine documentation
* Add assertion to check GC_large_free_bytes by GC_finish_collection
* Add configure option to compile all library .c files into single gc.o
* Add cordtest to make check
* Add disclaim callbacks for efficient finalization (ENABLE_DISCLAIM)
* Add finalization.html to 'doc' folder
* Add javaxfc.h to the installation set of GC header files (configure)
* Add on-heap-resize event notification to API
* Adjust GC_log_printf format specifiers (regarding signed/unsigned long)
* Adjust GC_requested_heapsize on GC_init if GC_INITIAL_HEAP_SIZE given
* Allow GC_exclude_static_roots() region start to be unaligned
* Allow Win32 DllMain chaining on the client side
* Allow to exclude finalization support by GC_NO_FINALIZATION macro
* Allow to get memory via Win32 VirtualAlloc (USE_WINALLOC) on Cygwin
* Avoid unnecessary GC_find_limit invocation if GC_no_dls
* Avoid use of deprecated GC_dont_gc and GC_stackbottom in gctest
* Cast pointers to word (instead of unsigned long) in specific.h
* Changed the order in autogen.sh so ltmain exists in time for automake
* Declare privately and use handy GC_base_C() for constant object pointers
* Define GC_DLL if DLL_EXPORT at GC build (for Cygwin/MinGW)
* Define GC_READ_ENV_FILE in configure for WinCE unless gc-debug is off
* Do not compile backgraph.c unless configure '--enable-gc-debug'
* Do not compile pthread_stop_world.c for Cygwin/Darwin (configure)
* Do not install ancient new_gc_alloc.h broken for modern STL (configure)
* Enable GC_MIN_MARKERS to set minimal number of pthread-based markers
* Enable PARALLEL_MARK and THREAD_LOCAL_ALLOC for FreeBSD in configure
* Enable parallel mark by default in configure (Darwin/Linux/Solaris/Win32)
* Export GC_is_marked, GC_clear/set_mark_bit (for mark-bit manipulation)
* Extend thread-related debug messages
* Fix 'configure --enable-cplusplus' for Cygwin/MinGW
* Fix DATASTART (and other minor improvements) for NaCl target
* Fix GC_setspecific to prevent garbage collection inside
* Fix compiler warning in cordtest
* Fix minor warnings reported by GCC with '-pedantic' option
* Fix static data roots registration on Android (if GC is shared)
* Implement GC_get_stack_base for Darwin for single-threaded mode
* Improve GC_allochblk algorithm of block splitting when unmapping enabled
* Improve GC_collect_or_expand algorithm for many finalizers registered case
* In tests, print a message in case a test is a no-op
* Instruct configure to hide internal libgc.so symbols if supported by GCC
* Log amount of unmapped memory (if enabled) on marking-for-collection
* Make __data_start a weak symbol to allow loading modules on mips
* Move "cord" library tests to "cord/tests" folder
* Move asm machine-dependent files to "src" folder
* Move build tools sources to "tools" folder
* Move cord_pos.h to public headers folder
* Open log file in APPEND mode on Win32 (similar that on Unix/Cygwin)
* Optimize some functions by moving pthread_self calls out of LOCK section
* Place only major per-release changes description to ChangeLog (this file)
* Prevent compiler warnings in GC_FindTopOfStack and GC_ports (Darwin)
* Recognize GC_LOG_TO_FILE_ALWAYS macro to log to 'gc.log' by default
* Remove all auto-generated files from the repo
* Remove binary icon file for de_win
* Remove cordtest from "cord" library
* Remove duplicate MacOS_Test_config.h file
* Remove gc_amiga_redirects.h (included internally) from public headers
* Remove obsolete Makefile.DLL (superseded by Cygwin/MinGW configure)
* Remove obsolete unused asm files for ALPHA, HPUX, SGI, RS6000, ULTRIX
* Remove unsupported MMAP_STACKS (specific to Solaris threads)
* Remove unused ancient SILENT, __STDC__, NO_SIGNALS macros
* Replace ARGSUSED comment-based annotation with GCC 'unused' attribute
* Replace GC_ms_entry declaration with opaque definition for public API
* Replace long GC_markers global variable with int GC_markers_m1
* Replace pointer relational comparisons with non-pointer ones
* Replace printf PRIxMAX specifier with '%p' for thread id debug output
* Require autoconf 2.61 instead of v2.64
* Simplify autogen.sh (use autoreconf)
* Split GC_abort with GC_on_abort and abort() invoked from ABORT
* Support GC_ATTR_MALLOC for MS VisualStudio
* Tag auxiliary malloc-like API functions with 'malloc' attribute
* Tag deprecated variables in GC API
* Tag must-be-non-null arguments of GC API functions
* Turn on "extra" GCC warnings
* Turn on unused-parameter checking for GCC
* Update AUTHORS file
* Use EXPECT for checking various 'initialized' boolean variables
* Use USE_COMPILER_TLS on Cygwin
* Use pthread_key for thread-local storage on FreeBSD
* Use union of AO_t and word to favor strict-aliasing compiler optimization
Also, includes 7.2 changes
== [7.2o] (not released yet) ==
* Add loop to handle abort error like in suspend logic on Darwin
* Disable mprotect-based incremental GC if /proc roots are used (Linux)
* Explicitly zero-initialize trace_buf (fix trace_buf initialization)
* Fix 'ACCESS_VIOLATION in marker' GC warning on Win32 async thread start
* Fix 'GC_generic_malloc must be available' GCC error in new_gc_alloc.h
* Fix 'expected function body after declarator' clang error in gc_cpp.cc
* Fix 'write to GC log failed' error
* Fix GC_proc_fd value in child process at fork (Solaris)
* Fix configure message about 'AIX gcc optimization fix'
* Fix data race regarding *rlh value in generic_malloc_many
* Fix first_thread stack_base initialization if custom GC_stackbottom (Win32)
* Fix fread failure after enable_incremental if malloc is redirected (Linux)
* Fix gc_cflags variable name in configure (HP/UX)
* Fix incorrect define GC_OPENBSD_THREADS on sparc64
* Fix misaligned tlfs passed to AO_load on m68k
* Fix missing gc_dlopen.c in CMake script
* Fix missing scratch_last_end_ptr update (Irix)
* Fix page_was_[ever_]dirty() for static roots (Solaris)
* Fix printf format specifier in simple_example.html
* Fix save_callers for multi-threaded case if built-in backtrace unavailable
* Fix various typos in comments and documentation files
* Fix word size, data start and alignment for OpenBSD/mips64(el)
* Prevent WARN of incompatible incremental GC if default or manual VDB
* Reduce a time period between GetExitCodeThread and SuspendThread (Win32)
* Remove a misleading comment about Solaris in gc.h
== [7.2n] 2019-03-01 ==
* Fix 'mprotect remapping failed' abort on NetBSD with PaX enabled
* Fix 'unexpected mark stack overflow' abort in push_all_stack
* Fix BSD_TIME variant of MS_TIME_DIFF for the case of a.tv_usec < b.tv_usec
* Fix GetThreadContext stale register values use if WoW64 (Win32)
* Fix executable memory allocation in GC_unix_get_mem
* Fix invalid initializer of CLOCK_TYPE variables if BSD_TIME
== [7.2m] 2018-12-11 ==
* Fix comment typos in CMakeLists.txt, backgraph.c, de.c, gcconfig.h
* Fix hbp overflow in GC_install_counts
* Fix start_world not resuming all threads on Darwin
* Guard against potential buffer overflow in CORD_next and CORD_pos_fetch
== [7.2l] 2018-08-10 ==
* Fix 'pointer arithmetic with NULL' code defect in print_callers
* Fix Borland version in documentation to match that in BCC_MAKEFILE
* Fix comment about inv_sz computation in setup_header
* Fix comments style in configure.ac and Makefile.am
* Fix GC_is_valid_displacement and GC_is_visible for non-small objects
* Fix global operator delete definition for C++14 in gc_cpp
* Fix infinite restarting of mark_some when a static root disappeared (Linux)
* Fix large object base computation in PUSH_CONTENTS() if MARK_BIT_PER_OBJ
* Fix mark stack overflow checking in push_selected
* Fix MSWIN32 macro redefinition (WCC)
* Fix potential null dereference in GC_CONS
* Fix register_dynamic_libraries on Windows 10
* Fix result computation in n_set_marks
* Fix return type in GC_set_warn_proc API documentation
* Fix typo in comment for CORD_ec_flush_buf prototype
* Fix typos in ChangeLog
* Fix VirtualQuery call in case of malloc failure (Win32)
* Install gc.3 man page instead of copying gc.man to doc folder (configure)
* Perform thread_suspend in loop as it may be interrupted (Darwin)
* Workaround 'template-id not supported in this context' compiler error (WCC)
== [7.2k] 2018-04-19 ==
* Fix arguments delimiter in pcr_interface.c (PCR)
* Fix assertion violation in DllMain of win32_threads
* Fix data race during apply_to_each_object(reset_back_edge)
* Fix dbg_mlc.c/o file name in documentation
* Fix include gc_gcj.h in thread_local_alloc.c
* Fix man section number (3)
* Fix missing GC_generic_malloc_words_small implementation in new_gc_alloc.h
* Fix missing SIGBUS handler setup for kFreeBSD
* Fix null dereference in print_callers on backtrace_symbols failure
* Fix the collector hang when it is configured with --enable-gc-debug
* Fix thread_suspend fail for threads registered from key destructor (OS X)
* Fix typo in AIX macro name
* Fix typo in comment in specific.h
== [7.2j] 2018-01-21 ==
* Fix GC allocation mutex in child after a fork
* Fix last_reclaimed..gc_no interval comparison to threshold in unmap_old
* Fix libgc version which was changed in linkage breaking way
* Fix missing EOLn output in threadlibs tool
== [7.2i] 2017-12-21 ==
* Avoid data race in finalized_count (gctest)
* Fix assertion violation about disabled cancel in try_to_collect_inner
* Fix data race in a list referenced by A.aa (gctest)
* Fix data race in do_local_mark when comparing active_count to helper_count
* Fix data race in GC_init_explicit_typing
* Fix data race in last_stop_count access (suspend_handler_inner)
* Fix data race in mark_thread when updating mark_no
* Fix data race when getting object size in explicitly-typed allocators
* Fix lack of barriers to synchronize memory for suspend_handler
* Fix typos in cdescr.html, extend_size_map and ews4800 doc, README.sgi
* Prevent 'Unexpected heap growth' in single-threaded gctest (Linux/x64)
== [7.2h] 2017-10-12 ==
* Add gctest as a test (CMake)
* Change no-argument functions declaration style to ANSI C (extra files)
* Do not allow SHORT_DBG_HDRS if KEEP_BACK_PTRS or MAKE_BACK_GRAPH
* Ensure oom_fn callback executed on out-of-memory in calloc
* Fix '~' operator application to unsigned values shorter than word
* Fix 'context local variable might be clobbered by setjmp' compiler warning
* Fix 'doc' files installation folder
* Fix 'shift count >= width of type' compiler warning in GC_SQRT_SIZE_MAX
* Fix ALL_INTERIOR_POINTERS name in comments and documentation
* Fix AO_SRC_DIR target name in NT_*_MAKEFILE
* Fix assertion in GC_mark_from for non-heap regions
* Fix assertion in GC_steal_mark_stack for non-heap regions
* Fix assertion violation in GC_repeat_read if --enable-redirect-malloc
* Fix assertion violation in GC_wait_builder called from start_mark_threads
* Fix assertion violation in mark_local checking GC_mark_stack_top
* Fix assertion violation in return_single_freelist in child process
* Fix bm_huge initialization for 64-bit targets (gctest)
* Fix broken external links in documentation
* Fix bytes count passed to add_to_our_memory in backgraph new_back_edges
* Fix calloc_explicitly_typed in case of lb*n overflow
* Fix CMake warning about CMP0054 by unquoting instances of HOST
* Fix conditional expression in pos_fetch, next non-macro definitions (cord)
* Fix configure --disable-munmap handling
* Fix CORD_substr_closure for the case when CORD_from_fn returns C string
* Fix crash in FirstDLOpenedLinkMap if app linked statically (Alpine Linux)
* Fix double lock in pthread_detach (Cygwin, winpthreads)
* Fix double multiplication of lb by n in calloc_explicitly_typed
* Fix enable_parallel_mark condition in CMake script
* Fix external libatomic_ops pkg-config-based detection
* Fix gc_allocator.h file name in new_gc_alloc.h comment
* Fix gc_backptr.h, gc_mark.h, GC_DS_TAGS names in documentation
* Fix gc_cleanup destructor for non-heap objects (gc_cpp)
* Fix GC_collect_or_expand to prevent allocation size value wrap-around
* Fix GC_incremental declaration/definition type mismatch
* Fix GC_mark_stack_top assertion violation properly in mark_local
* Fix GC_remove_specific invocation from remove_all_threads_but_me
* Fix GC_requested_heapsize increment in GC_init
* Fix GC_setspecific to prevent garbage collection inside
* Fix GC_SIZE_MAX definition (Linux/musl-gcc)
* Fix GCJ support in CMake build script
* Fix gctest crash if configure --enable-handle-fork on Darwin
* Fix get_maps on proc maps file asynchronous growth
* Fix hb_n_marks underflow in clear_fl_marks if MARK_BIT_PER_OBJ
* Fix header filename in gcconfig.h comment
* Fix infinite mark_some calls after memory mapping disappeared (Glibc)
* Fix integer shift undefined behavior in GC_init_explicit_typing
* Fix leak_test crash in print_callers if free() is redirected
* Fix Makefile.direct recursive invocation
* Fix malloc routines to prevent size value wrap-around (fix CVE-2016-9427)
* Fix missing win32_threads.c compilation for Cygwin (CMake)
* Fix MS VC warning about compiling unused checksums and thread_local_alloc
* Fix name typos in GC_FAST_MALLOC_GRANS comment
* Fix null dereference in reclaim_block if DONT_ADD_BYTE_AT_END
* Fix OSF1 host pattern in CMakeLists.txt
* Fix PCR-Makefile by removing compilation of a missing file
* Fix potential data race in GC_SysVGetDataStart (SPARC)
* Fix potential integer overflow in GC_find_limit_* functions
* Fix printf arguments type in print_callers
* Fix pthread_detach for threads not yet registered (Cygwin, winpthreads)
* Fix pthread_join to avoid thread removal on failure (Cygwin, winpthreads)
* Fix pthread_join when thread is registered in thread key destructor
* Fix push_complex_descriptor to avoid unlimited global mark stack growth
* Fix removal of dead threads in a child process
* Fix SIGSEGV in GC_is_marked when gc_cleanup is used in leak-finding mode
* Fix SIGSEGV in mark_from called from do_local_mark if WRAP_MARK_SOME
* Fix Solaris/sparc detection in case of strict C compliance is enforced
* Fix STACKBOTTOM for Solaris 11/x86
* Fix storage class of local variable in register_dynamic_libraries (Irix)
* Fix tools/setjmp_t hang (OS X)
* Fix typed_test to prevent fails in malloc_explicitly_typed (64-bit)
* Fix undefined HEAP_START in register_dynamic_libraries
* Fix USE_CUSTOM_SPECIFIC mode (if manually enabled) for Win32
* Fix USE_GET_STACKBASE_FOR_MAIN definition in gcconfig.h
* Fix various typos in comments, documentation and printed messages
* Handle load_segs overflow in register_dynlib_callback gracefully
* Prevent misleading AC_MSG_ERROR/AS_IF errors reported in configure.ac
* Replace (fix) 'objs' acronym in comments with 'objects' word
* Revert "Skip GC_DS_PER_OBJECT objs with negative descriptor in GC_mark_from"
* Update documentation about bugs reporting and new releases notification
* Update Download information in GC overview document
* Update shared libraries version info (v7.2)
* Workaround a bug in winpthreads causing parallel marks deadlock (MinGW)
* Workaround missing getcontext() in Docker osrf/ubuntu_32bit
== [7.2g] 2016-05-23 ==
* Fix 'illegal option -xassembler-with-cpp' error (Oracle SunCC)
* Fix 'implicit declaration of function' compiler warnings in cord/de
* Fix CFLAGS in configure regarding -O flag passing to SunCC compiler
* Fix FirstDLOpenedLinkMap for case libgc not 1st dynamically linked (NetBSD)
* Fix GC initialization in cord de_win for Cygwin
* Fix GC_get_stack_base if called before GC_init (Win32)
* Fix OSX issue with pthread_attr_setstacksize failure
* Fix Unicode Win32 API calls in cord de_win
* Fix USE_COMPILER_TLS macro duplicate description in README
* Fix cord de_win WndProc prototype parameters for 64-bit (Win64)
* Fix file descriptor resource leak in GC_register_data_segments (OS/2)
* Fix filename printing in cordtest
* Fix missing cord_pos.h, ec.h among installed headers (Automake)
* Fix missing GC_get_stack_base for Amiga
* Fix missing msvc_dbg.h in dist_noinst_HEADERS (Automake)
* Fix mistyped ARM_THREAD_STATE macro (Darwin/arm)
* Fix null-pointer dereferences on out-of-memory in cord and tests
* Fix potential multiplication overflow in check_heap_stats (gctest)
* Fix race (and potential deadlock) at marker threads initialization
* Fix signedness of char values passed to isspace, iscntrl, isxdigit
* Fix typo (items numbering) in GC_finalize_all documentation
* Fix typos in ERROR_FL, GC_malloc_uncollectable comments
* Fix typos in gc_priv.h, in README for ews4800
* Fix unresolved vsnprintf in misc.c and snprintf in cordtest (DJGPP, VC)
* Fix various spelling errors
* Fix vsprintf_args initialization/cleanup in CORD_vsprintf for EMX
* Regenerate configure files using official libtool release (v2.4.2)
* Remove documentation about obsolete GC_REDIRECT_TO_LOCAL
* Skip GC_DS_PER_OBJECT objects with negative descriptor in GC_mark_from
* windows-untested: Fix paths to msvc_dbg.c/h
== [7.2f] 2014-06-03 ==
* Fix 'Bad signal in suspend_handler' abort on FreeBSD-9.2
* Fix 'source file in a subdirectory' Automake warnings
* Fix ABORT message in GC_restart_handler
* Fix ADD_DEFINITION in CMakeLists.txt for kFreeBSD
* Fix CMakeLists.txt: do not override CMAKE_OSX_ARCHITECTURES
* Fix GC_alloc_large by bumping GC_collect_at_heapsize in GC_add_to_heap
* Fix GC_scratch_last_end_ptr update on GC_scratch_alloc failure
* Fix GET_MEM argument rounding in GC_scratch_alloc and similar
* Fix PARALLEL_MARK for Windows 7+
* Fix build (broken by fenv.h inclusion) on Linux/x86_64 under uClibc
* Fix crash when using GC_malloc_many() as first allocation call
* Fix mark stack excessive growth during parallel mark
* Fix or remove broken URLs in documentation
* Fix out-of-memory case in new_back_edges, push_in_progress (backgraph)
* Fix typo in GC_collect_or_expand comment
* Fix typos in GC overview file, gc_config_macros.h, gc_cpp.h, README.changes
* Regenerate configure files by automake 1.14.1, libtool 2.4.2.418
* Update emails/links due to project site and ML transition
== [7.2e] 2013-11-10 ==
* Add weak attribute to avoid __data_start undefined messages (s390x)
* Add weak stubs for pthread_cancel API
* Adjust 'pthread_[un]register_cancel undefined ref' workaround (Pthreads)
* Append _test suffix to 'initsecondarythread' binary file names
* Enable PARALLEL_MARK and THREAD_LOCAL_ALLOC for FreeBSD in configure
* Fix 'stack section' pointer passed to push_all_stack_sections (Pthreads)
* Fix GC_CreateThread 'dwStackSize' argument type for Win64
* Fix GC_PTHREAD_PTRVAL definition for GC_PTHREADS_PARAMARK (Win32)
* Fix GC_clear_stack by declaring 'dummy' local array as volatile
* Fix GC_get_stack_base assembly code (Cygwin/Clang)
* Fix GC_malloc_explicitly_typed_ignore_off_page for large allocations
* Fix GC_marker_Id elements initialization (WinCE)
* Fix GC_print_trace missing unlock
* Fix GC_unix_mmap_get_mem for open of /dev/zero failure
* Fix GC_win32_free_heap compilation error for Cygwin
* Fix GC_win32_free_heap to prevent memory leak if USE_GLOBAL_ALLOC
* Fix Win32 GC_write preventing potential infinite recursion at abort
* Fix assertion violation in GC_mark_from prefetch loop
* Fix collection of objects referenced only from GC_mark_stack_X variables
* Fix dwSize argument of VirtualFree call in detect_GetWriteWatch (Win32)
* Fix heap sections overflow for Win32/Cygwin with enabled parallel marker
* Fix min_bytes_allocd preventing potential infinite loop in GC_allocobj
* Fix missing tabs in SMakefile.amiga file
* Fix null-pointer dereference in CORD_substr_closure
* Fix old_segv/bus_act variables initialization for FreeBSD
* Fix potential double fclose in test_extras (cordtest)
* Fix pthread_attr_t resource leak in pthread_create
* Fix race in GC_print_all_errors regarding GC_leaked
* Fix sizeof in GC_push_thread_structures
* Fix stackbottom/stack_end assignment in GC_call_with_gc_active
* Fix tests makefile to link with new GNU ld linking rules
* Fix typos in comments and documentation
* Fix unportable '==' test operators in configure
* Fix vsprintf_args cleanup in CORD_vsprintf
* Merge FreeBSD New ports collection for boehm-gc v7.2d
* Replace GC_DBG_RA with GC_DBG_EXTRAS macro
* Replace deprecated [CXX]INCLUDES to AM_C[PP]FLAGS in configure.ac file
* Use __builtin_extract_return_addr in GC_RETURN_ADDR_PARENT (gcc/x86)
== [7.2d] 2012-08-09 ==
* Fix GC_call_with_stack_base to prevent its tail-call optimization
* Fix all address-of-dummy operations by using GC_approx_sp() instead
* Fix stop_info.stack_ptr assignment in GC_suspend_all for OpenBSD
* Fix test_cpp (ensure the collector recognizes pointers to interiors)
* Fix thread-related tests for pthreads-w32
* test_cpp: Fix WinMain to prevent SEGV if zero arguments passed (MinGW)
== [7.2c] 2012-06-11 ==
* Fix CORD_cat_char_star to prevent SEGV in case of out-of-memory
* Fix GC_FirstDLOpenedLinkMap() for NetBSD 6 release
* Fix GC_scratch_alloc and GC_get_maps invocations to prevent SEGV
* Fix visibility of GC_clear/set_mark_bit (unhide symbols)
* Fix visibility of GC_push_all/conditional, GC_push_other_roots symbols
== [7.2b] 2012-05-23 ==
* Fix assertion in GC_malloc_[atomic_]uncollectable (THREADS case only)
== [7.2] 2012-05-11 ==
* Abort in GC_thr_init on pthread_atfork failure (POSIX threads)
* Add GC_WIN32_PTHREADS target in configure
* Add GC_is_disabled new function to GC API
* Add info that getcontext() resets FPE mask no longer on Linux/x86_64
* Add public GC_set_handle_fork to control forked child handling support
* Add realloc_test.c test
* Add support for Hexagon target
* Add thread-safe GC_get_heap_usage_safe to GC API
* Change GC_check_fl_marks prototype and implementation
* Check pthread_create/join result in test
* Define GC_DLL (in configure) if building only dynamic libraries
* Define NO_DEBUGGING (in configure) if "--disable-gc-debug" is set
* Disable incremental mode on Darwin if fork handling requested
* Enable parallel marker in configure for Solaris
* Fix "comparison of signed and unsigned values" compiler warnings
* Fix 'volatile' keyword placement in GC_SysVGetDataStart
* Fix ALIGNMENT, CPP_WORDSZ, GC_GRANULE_BYTES/WORDS for x32 target
* Fix GC_READ_ENV_FILE code for Cygwin
* Fix GC_add_roots_inner for Mac OS X (align segment start)
* Fix GC_check_fl_marks regarding concurrent access
* Fix GC_finalizer_nested size to workaround alignment problem in Watcom
* Fix GC_find_limit_with_bound to always reset fault handler on return
* Fix GC_init static assertion for clang/x64 (Darwin)
* Fix GC_init[_lib_bounds] and GC_get_main_stack_base for malloc redirection
* Fix GC_push_all/selected boundaries check
* Fix GC_register_my_thread marking thread as detached (Cygwin/pthreads-w32)
* Fix GC_remove_all_threads_but_me to cleanup thread-specific data storage
* Fix GC_restart_handler to preserve errno if needed
* Fix GC_root_size update in GC_add_roots_inner (Win32)
* Fix GC_unregister_my_thread to ensure no ongoing incremental GC (Win32)
* Fix GC_with_callee_saves_pushed for clang (disable __builtin_unwind_init)
* Fix calloc, GC_generic_malloc to check for allocation size overflows
* Fix compiler warning in GC_dyld_image_add/remove (Darwin)
* Fix configure --enable-cplusplus make install
* Fix configure to disable GCC aliasing optimization unless forced to
* Fix duplicate definitions in gcconfig.h for NetBSD
* Fix fork() support on Cygwin and Darwin targets
* Fix gc.h compatibility regression regarding GC_PTR, GC_I_HIDE_POINTERS
* Fix gc_cpp.cc for Cygwin (remove duplicate function definition)
* Fix gcconfig.h to define USE_GET_STACKBASE_FOR_MAIN for Android
* Fix gcconfig.h to handle mips64-linux target
* Fix gctest (for Win32) to avoid GC_print_stats internal variable usage
* Fix mach_dep.c to include sys/ucontext.h on Mac OS X 10.6
* Fix tests to check GC_malloc result for NULL (out-of-memory)
* Fix thread model in configure for MinGW ("win32" instead of "posix")
* Fix various warnings reported by LINT-like tools
* Fix visibility of some GC internal symbols used by GNU GCJ currently
* Port some thread tests to Win32
* Refine API GC setters and getter comments regarding locking
* Refine GC_stackbottom description in gc.h
* Remove duplicate calls in GC_register_dynamic_libraries
* Remove locking in API GC_get_bytes_since_gc and friends
* Remove newly-added GC_get_heap_size/free_bytes_inner from API
* Remove some local variables that are unused
* Support multi-threading for RTEMS target
* Use global GC_noop_sink variable in GC_noop1 to suppress compiler warning
* Use pkg-config to pick up libatomic_ops, etc
* Workaround some Linux/arm kernels bug to get correct GC_nprocs value
== [7.2alpha6] 2011-06-14 ==
* configure_atomic_ops.sh: Remove.
* Makefile.direct (dist gc.tar): Remove configure_atomic_ops.sh.
* Makefile.am (EXTRA_DIST): Add autogen.sh.
* NT_STATIC_THREADS_MAKEFILE (.cpp.obj): Remove duplicate .cpp
filename passed.
* NT_X64_THREADS_MAKEFILE (.cpp.obj): Use lowercase file
extension.
* NT_X64_STATIC_THREADS_MAKEFILE (.cpp.obj): Likewise.
* NT_MAKEFILE (.cpp.obj): Likewise.
* alloc.c (GC_add_current_malloc_heap, GC_build_back_graph,
GC_traverse_back_graph): Move prototype to gc_priv.h.
* checksums.c (GC_page_was_ever_dirty): Likewise.
* dbg_mlc.c (GC_default_print_heap_obj_proc): Likewise.
* dyn_load.c (GC_parse_map_entry, GC_get_maps,
GC_segment_is_thread_stack, GC_roots_present, GC_is_heap_base,
GC_get_next_stack): Likewise.
* finalize.c (GC_reset_finalizer_nested,
GC_check_finalizer_nested): Likewise.
* gcj_mlc.c (GC_start_debugging, GC_store_debug_info): Likewise.
* malloc.c (GC_extend_size_map, GC_text_mapping): Likewise.
* mark_rts.c (GC_mark_thread_local_free_lists): Likewise.
* misc.c (GC_register_main_static_data, GC_init_win32,
GC_setpagesize, GC_init_linux_data_start,
GC_set_and_save_fault_handler, GC_init_dyld, GC_init_netbsd_elf,
GC_initialize_offsets, GC_bl_init, GC_do_blocking_inner,
GC_bl_init_no_interiors): Likewise.
* os_dep.c (GC_greatest_stack_base_below, GC_push_all_stacks):
Likewise.
* reclaim.c (GC_check_leaked): Likewise.
* win32_threads.c (GC_gww_dirty_init): Likewise.
* darwin_stop_world.c (GC_is_mach_marker, GC_mprotect_stop,
GC_mprotect_resume): Move prototype to darwin_stop_world.h.
* pthread_support.c (GC_FindTopOfStack): Likewise.
* dyn_load.c (GC_cond_add_roots): Merge adjacent definitions.
* mark.c (GC_page_was_ever_dirty): Remove (as already declared).
* mark_rts.c (GC_roots_present): Change return type to void
pointer (to match the prototype); return NULL instead of FALSE.
* mark_rts.c (GC_add_roots_inner): Cast GC_roots_present() result.
* os_dep.c (NEED_PROC_MAPS): Move definition to gcconfig.h.
* os_dep.c (GC_write_fault_handler): Make STATIC.
* os_dep.c (GC_set_write_fault_handler): New function (only if
GC_WIN32_THREADS).
* pthread_start.c (GC_start_rtn_prepare_thread,
GC_thread_exit_proc): Move prototype to pthread_support.h.
* pthread_support.c (GC_nacl_initialize_gc_thread,
GC_nacl_shutdown_gc_thread, GC_unblock_gc_signals):
Likewise.
* pthread_support.c (GC_stop_init): Move prototype to
pthread_stop_world.h.
* win32_threads.c (GC_write_fault_handler): Remove prototype.
* win32_threads.c (GC_register_my_thread_inner): Call
GC_set_write_fault_handler instead of SetUnhandledExceptionFilter
(only if MPROTECT_VDB).
* doc/README.win32: Add information about DMC.
* include/private/gc_priv.h (GC_set_write_fault_handler): New
prototype (only if GC_WIN32_THREADS and MPROTECT_VDB).
* misc.c (vsnprintf): Redirect to vsprintf() if NO_VSNPRINTF.
* win32_threads.c (GC_unregister_my_thread): Use KNOWN_FINISHED()
instead of FINISHED macro.
* tests/test.c (check_heap_stats): Round up max_heap_sz value for
Win32 (same as for USE_MMAP).
* tests/test.c (check_heap_stats): Adjust printf format specifier
for max_heap_sz; cast max_heap_sz accordingly.
* doc/README.solaris2: Add note.
* configure.ac (SOLARIS25_PROC_VDB_BUG_FIXED): Don't define for
Solaris/x86 2.10+.
* tests/threadkey_test.c (SKIP_THREADKEY_TEST): Skip the test if
defined; explicitly define for some targets.
* mark.c (GC_dirty): Add prototype (only if MANUAL_VDB).
* stubborn.c (GC_dirty): Likewise.
* include/private/gcconfig.h (GWW_VDB, MPROTECT_VDB, PCR_VDB,
PROC_VDB): Undefine if MANUAL_VDB.
* include/private/gcconfig.h (DEFAULT_VDB): Don't define if
MANUAL_VDB.
* os_dep.c (async_set_pht_entry_from_index): Define for
MANUAL_VDB.
* os_dep.c (GC_read_dirty): Set GC_dirty_maintained only if
success; if ioctl() failed then just print warning instead of
aborting.
* include/private/gc_priv.h (GC_ASSERT): Use "%d" (instead of %ld)
for line number printing.
* os_dep.c (GC_read_dirty): Add debug logging if DEBUG_DIRTY_BITS
(for PROC_VDB only); print errors via GC_err_printf; rename "ps"
and "np" local variables to npages and pagesize, respectively;
remove "current_addr" local variable.
* os_dep.c (GC_get_main_stack_base): Convert to GC_get_stack_base
for BeOS and OS/2; define HAVE_GET_STACK_BASE.
* os_dep.c (GET_MAIN_STACKBASE_SPECIAL): Define when a specific
GC_get_main_stack_base implementation is defined.
* os_dep.c (GC_get_main_stack_base): Define that based on
GC_get_stack_base() in a single place (only if
GET_MAIN_STACKBASE_SPECIAL is unset); check GC_get_stack_base()
result.
* mark.c (GC_push_selected): Remove "push_fn" argument (use
GC_push_all directly); update the documentation.
* mark.c (GC_push_conditional): Simplify the code (for better
readability).
* mark.c (alloc_mark_stack): Use FALSE/TRUE (instead of 0/1) for
boolean local variables.
* doc/README.macros (GC_PREFER_MPROTECT_VDB): Update.
* os_dep.c (GC_page_was_dirty, GC_page_was_ever_dirty,
GC_remove_protection): Define for GWW_VDB and PROC_VDB in a single
place.
* os_dep.c (GC_page_was_dirty, GC_page_was_ever_dirty): Compute
PHT_HASH(h) only once (store result to a local variable).
* doc/README.solaris2: Update.
* include/private/gcconfig.h (end, InitStackBottom): Declare
extern variable for RTEMS.
* include/private/gcconfig.h (DATASTART, DATAEND, STACKBOTTOM):
Update (for RTEMS).
* include/private/gcconfig.h (DATAEND): Fix a typo in the macro
name (for RTEMS).
* tests/test.c (CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER):
Replace with CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER (for RTEMS).
* include/private/gcconfig.h (MPROTECT_VDB): Enable for Solaris in
single-threaded environment.
* include/private/gcconfig.h (MPROTECT_VDB): Undefine if PROC_VDB.
* tests/test.c (NUMBER_ROUND_UP): New macro.
* tests/test.c (check_heap_stats): Round up total expected heap
size to the nearest 4 MiB bound.
* tests/test.c (check_heap_stats): Print the current and expected
heap sizes in case of failure.
* checksums.c (GC_check_blocks, GC_check_dirty): Do log printing
only if GC_print_stats; print errors using GC_err_printf.
* checksums.c (GC_check_blocks): Join adjacent printf() calls into
a single one.
* pthread_support.c (pthread_join): Add assertion (check thread is
finished).
* pthread_support.c (GC_register_my_thread): Don't detach the
thread if invoked from the thread destructor.
* win32_threads.c (GC_register_my_thread): Likewise.
* win32_threads.c (GC_unregister_my_thread): Don't delete the
thread (just set FINISHED) if the thread is not detached (only if
GC_PTHREADS); add assertion (check the thread is not finished).
* tests/threadkey_test.c (main): Join some created threads.
* pthread_support.c (GC_delete_gc_thread): Rename "gc_id" local
variable to "t".
* win32_threads.c (GC_delete_gc_thread): Likewise.
* pthread_support.c (pthread_join, pthread_detach,
pthread_cancel): Rename "thread_gc_id" local variable to "t".
* win32_threads.c (GC_pthread_detach): Likewise.
* win32_threads.c (GC_delete_gc_thread): Remove "gc_nvid" local
variable.
* win32_threads.c (GC_pthread_join): Rename "joinee" local
variable to "t".
* pthread_stop_world.c (pthread_sigmask): Undefine even if not
DEBUG_THREADS.
* pthread_stop_world.c (GC_unblock_gc_signals): New function (only
if GC_EXPLICIT_SIGNALS_UNBLOCK).
* pthread_support.c (GC_unblock_gc_signals): New prototype.
* pthread_support.c (GC_register_my_thread_inner,
GC_register_my_thread): Call GC_unblock_gc_signals (only if
GC_EXPLICIT_SIGNALS_UNBLOCK); add comment.
* include/private/gcconfig.h (GC_EXPLICIT_SIGNALS_UNBLOCK): New
macro.
* pthread_stop_world.c (GC_suspend_handler_inner): Remove "dummy",
"sig" local variables; rename my_thread local variable to "self".
* tests/threadkey_test.c (LIMIT): Use smaller value (don't create
more than 30 in parallel by default).
* tests/threadkey_test.c (key_once, main): Work around for Solaris
PTHREAD_ONCE_INIT.
* tests/threadkey_test.c (LIMIT): Use smaller value for Solaris.
* dyn_load.c (GC_FirstDLOpenedLinkMap): Remove unused "r" local
variable.
* pthread_support.c (GC_unregister_my_thread_inner): Revert back
GC_remove_specific invocation; add a comment.
* include/private/thread_local_alloc.h (GC_remove_specific):
Revert back.
* specific.c (slow_getspecific): Cast qtid to AO_t.
* include/private/specific.h (key_create, setspecific,
remove_specific): Remove "extern" keyword.
* include/private/specific.h (getspecific): Change type of "qtid"
local variable to unsigned long.
* pthread_support.c (GC_check_tls): Fix "#endif" comment.
* include/gc.h (GC_REDIRECT_TO_LOCAL): Remove deprecated comment.
* include/private/thread_local_alloc.h (THREAD_LOCAL_ALLOC):
Remove redundant test of the macro.
* backgraph.c (add_edge): Recognize DEBUG_PRINT_BIG_N_EDGES macro.
* os_dep.c (GC_set_and_save_fault_handler): Recognize
SIGACTION_FLAGS_NODEFER_HACK macro.
* pthread_support.c (mark_mutex): Recognize GLIBC_2_1_MUTEX_HACK
macro.
* pthread_support.c (GC_acquire_mark_lock): Remove commented out
code.
* include/private/gc_priv.h (SUNOS5SIGS): Don't include
sys/siginfo.h on Linux.
* include/private/gcconfig.h (FORCE_WRITE_PREFETCH): New macro
recognized, force PREFETCH_FOR_WRITE to be defined on x86.
* include/private/gcconfig.h (USE_HPUX_FIXED_STACKBOTTOM): New
macro recognized (for HP/UX).
* os_dep.c (GC_gww_page_was_ever_dirty): Fix comment (for
GWW_VDB).
* os_dep.c (GC_dirty_init): Use memset() for GC_written_pages
resetting (for PROC_VDB).
* tests/threadkey_test.c: New file.
* tests/tests.am (TESTS, check_PROGRAMS): Add 'threadkey_test'.
* tests/tests.am (threadkey_test_SOURCES, threadkey_test_LDADD):
New variable.
* pthread_support.c (GC_unregister_my_thread_inner): Don't call
GC_remove_specific.
* include/private/thread_local_alloc.h (GC_remove_specific):
Remove (since it is empty for all targets).
* pthread_support.c (GC_record_stack_base): New inline function.
* win32_threads.c (GC_record_stack_base): Likewise.
* pthread_support.c (GC_register_my_thread_inner): Invoke
GC_record_stack_base.
* win32_threads.c (GC_register_my_thread_inner): Likewise.
* pthread_support.c (GC_register_my_thread): If thread is FINISHED
then call GC_record_stack_base, clear FINISHED, initialize
thread-local list and return success.
* win32_threads.c (GC_register_my_thread): Likewise.
* include/gc.h (GC_register_my_thread): Update documentation.
* include/private/thread_local_alloc.h (GC_thread_key): Likewise.
* thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Join
adjacent "#ifdef".
* thread_local_alloc.c (GC_malloc_atomic): Call
GC_core_malloc_atomic (instead of GC_core_malloc).
* pthread_start.c (GC_start_rtn_prepare_thread): Change return
type to GC_thread.
* pthread_start.c (GC_inner_start_routine): Pass the current
thread descriptor to pthread_cleanup_push (same as in
win32_threads.c).
* pthread_stop_world.c (GC_push_all_stacks): Rename "me" local
variable to "self".
* win32_threads.c (GC_push_all_stacks): Likewise.
* pthread_stop_world.c (GC_suspend_all, GC_start_world): Rename
"my_thread" local variable to "self".
* pthread_support.c (GC_unregister_my_thread_inner): New static
function.
* pthread_support.c (GC_unregister_my_thread,
GC_thread_exit_proc): Use GC_unregister_my_thread_inner.
* win32_threads.c (GC_register_my_thread, GC_unregister_my_thread,
GC_do_blocking_inner): Rename "t" local variable to "thread_id".
* win32_threads.c (GC_wait_marker, GC_notify_all_marker): Rename
"id" local variable to "thread_id".
* pthread_support.c (GC_unregister_my_thread): Call pthread_self
only once.
* win32_threads.c (GC_pthread_start_inner): Likewise.
* pthread_support.c (GC_unregister_my_thread): Add debug output.
* win32_threads.c (GC_unregister_my_thread): Likewise.
* pthread_support.c (GC_register_my_thread,
GC_start_rtn_prepare_thread): Rename "my_pthread" local variable
to "self".
* include/gc.h (GC_HIDE_POINTER, GC_REVEAL_POINTER): Define
unconditionally (do not test GC_I_HIDE_POINTERS); update the
comment.
* include/gc.h (HIDE_POINTER, REVEAL_POINTER): Define as alias to
GC_HIDE/REVEAL_POINTER, respectively.
* include/private/gc_pmark.h (GC_I_HIDE_POINTERS): Do not define.
* include/private/gc_priv.h (GC_I_HIDE_POINTERS): Likewise.
* include/gc.h (GC_register_my_thread): Refine the comment.
* include/gc_inline.h (GC_MALLOC_WORDS, GC_CONS): Add missing
parentheses.
* include/gc_typed.h (GC_get_bit, GC_set_bit,
GC_CALLOC_EXPLICITLY_TYPED): Likewise.
* include/private/gcconfig.h (NO_GETCONTEXT): Add missing ')'.
* include/private/gcconfig.h (NO_GETCONTEXT): Do not use
getcontext(2) on m68k because it is not implemented there.
* alloc.c (GC_clear_a_few_frames): Use BZERO().
* mark_rts.c (GC_clear_roots, GC_rebuild_root_index): Likewise.
* reclaim.c (GC_start_reclaim): Likewise.
* blacklst.c (total_stack_black_listed): Remove "len" local
variable.
* dbg_mlc.c (GC_generate_random_valid_address): Replace "for"
statement with "do-while" one.
* dyn_load.c (GC_register_dynamic_libraries,
GC_register_dynlib_callback): Remove redundant parentheses.
* cord/cordxtra.c (CORD_from_file_lazy_inner): Suppress
"unused result" compiler warning for fread().
* os_dep.c (GC_write_fault_handler): Break when in_allocd_block
is set to true.
* dbg_mlc.c (GC_has_other_debug_info): Change return type to int;
return -1 if the object has (or had) debugging info but was
marked deallocated.
* include/private/dbg_mlc.h (GC_has_other_debug_info): Likewise.
* dbg_mlc.c (GC_has_other_debug_info): Update documentation;
remove "ohdr" local variable.
* dbg_mlc.c (GC_debug_free): Don't call GC_free if the object has
probably been deallocated.
* dbg_mlc.c (GC_debug_free): Don't actually free the object even
in the leak-finding mode if GC_findleak_delay_free.
* dbg_mlc.c (GC_check_leaked): New function (only unless
SHORT_DBG_HDRS).
* doc/README.environment (GC_FINDLEAK_DELAY_FREE): Document.
* doc/README.macros (GC_FINDLEAK_DELAY_FREE): Likewise.
* include/private/dbg_mlc.h (START_FLAG, END_FLAG): Use GC_WORD_C
on 64-bit architectures.
* include/private/dbg_mlc.h (NOT_MARKED): Remove redundant
parentheses.
* include/private/dbg_mlc.h (GC_HAS_DEBUG_INFO): Update (due to
GC_has_other_debug_info change).
* include/private/gc_priv.h (GC_findleak_delay_free): New global
variable declaration (unless SHORT_DBG_HDRS).
* misc.c (GC_findleak_delay_free): New global variable; recognize
GC_FINDLEAK_DELAY_FREE.
* misc.c (GC_init): Recognize GC_FINDLEAK_DELAY_FREE environment
variable (unless SHORT_DBG_HDRS).
* reclaim.c (GC_check_leaked): Declare (unless SHORT_DBG_HDRS).
* reclaim.c (GC_add_leaked): Don't add the object to leaked list
if marked as deallocated.
* dbg_mlc.c (GC_has_other_debug_info): Fix punctuation in the
comment.
* dbg_mlc.c (GC_FREED_MEM_MARKER): New macro.
* dbg_mlc.c (GC_debug_free): Use GC_FREED_MEM_MARKER.
* dbg_mlc.c (GC_smashed): Refine documentation.
* mark.c (GC_push_selected): Change dirty_fn return type to
GC_bool.
* os_dep.c (GC_page_was_ever_dirty): Make GC_INNER.
* reclaim.c (GC_reclaim_small_nonempty_block): Remove "kind"
local variable.
* reclaim.c (GC_reclaim_block): Pass true constant to
GC_reclaim_small_nonempty_block (instead of report_if_found).
* doc/README.autoconf: Update; fix a typo.
* include/private/gcconfig.h (GC_WORD_C): New macro.
* dbg_mlc.c (GC_store_debug_info_inner): Cast "linenum".
* dbg_mlc.c (GC_check_annotated_obj): Fix punctuation in the
comment.
* dbg_mlc.c (GC_print_smashed_obj): Add (and print) "msg"
argument.
* dbg_mlc.c (GC_debug_free, GC_print_all_smashed_proc): Pass
message to GC_print_smashed_obj.
* dbg_mlc.c (GC_debug_free): Call GC_size once.
* dbg_mlc.c (GC_debug_realloc): Calculate old_sz only if
allocation succeeded; remove unnecessary check for object is
smashed (since this is done in GC_debug_free); remove "clobbered"
local variable.
* dbg_mlc.c (GC_store_debug_info_inner, GC_store_debug_info):
Rename "integer" argument to "linenum"; change the type of the
argument to int.
* gcj_mlc.c (GC_store_debug_info): Likewise.
* dbg_mlc.c (GET_OH_LINENUM): New macro.
* dbg_mlc.c (GC_print_obj, GC_print_smashed_obj): Use
GET_OH_LINENUM; adjust print format specifier.
* dbg_mlc.c (GC_debug_malloc, GC_debug_malloc_ignore_off_page,
GC_debug_malloc_atomic_ignore_off_page,
GC_debug_generic_malloc_inner,
GC_debug_generic_malloc_inner_ignore_off_page,
GC_debug_malloc_stubborn, GC_debug_malloc_atomic,
GC_debug_malloc_uncollectable,
GC_debug_malloc_atomic_uncollectable): Remove unnecessary cast of
"i".
* gcj_mlc.c (GC_debug_gcj_malloc): Likewise.
* os_dep.c (GC_linux_stack_base): Rename to
GC_linux_main_stack_base.
* os_dep.c (GC_freebsd_stack_base): Rename to
GC_freebsd_main_stack_base; adjust error message.
* pthread_stop_world.c (GC_stop_init): Use GC_SEM_INIT_PSHARED
as an argument for sem_init().
* pthread_support.c (pthread_create): Likewise.
* pthread_support.c (pthread_create): Abort in case sem_init()
fails.
* include/private/gc_priv.h (GC_SEM_INIT_PSHARED): Define.
* tests/initsecondarythread.c: Include gcconfig.h; call GC_INIT
from main() if it should be done from the primordial thread only.
* alloc.c: Don't include sys/types.h for ArmCC.
* dyn_load.c: Likewise.
* os_dep.c: Likewise.
* mach_dep.c (_setjmp, _longjmp): Redirect to setjmp/longjmp for
ArmCC.
* mark.c (GC_noop): Define specially for ArmCC.
* include/private/gc_priv.h (GC_noop): Likewise.
* misc.c (GC_init): Don't test pointers comparison for ArmCC.
* misc.c: Don't include unistd.h for ArmCC.
* os_dep.c (pages_executable): Rename to GC_pages_executable;
make STATIC.
* os_dep.c (GC_unix_mmap_get_mem): Don't define for ArmCC.
* ptr_chck.c (GC_is_visible): Explicitly cast
(GC_DS_PER_OBJECT-GC_INDIR_PER_OBJ_BIAS) to word (to suppress
a compiler warning).
* include/private/gcconfig.h: Recognize __arm.
* include/private/gcconfig.h (HBLKPTR): Define for ArmCC.
* include/private/gcconfig.h (HBLKPTR): Add parentheses for
"bytes" argument.
* pthread_support.c (GC_get_nprocs): Don't define for Android.
* pthread_support.c (GC_dummy_thread_local): Don't test
GC_LINUX_THREADS.
* include/gc_config_macros.h (GC_ADD_CALLER, GC_RETURN_ADDR):
Define for Android.
* mach_dep.c (NO_GETCONTEXT): Move to gcconfig.h.
* os_dep.c (GC_write_fault_handler): Don't include ucontext.h if
NO_GETCONTEXT.
* include/private/gcconfig.h (GETPAGESIZE): Define as a sysconf
call for Android.
* include/private/gc_locks.h (WIN32_LEAN_AND_MEAN, NOSERVICE):
Define before including windows.h.
* include/private/gc_priv.h (WIN32_LEAN_AND_MEAN, NOSERVICE):
Likewise.
* include/private/thread_local_alloc.h (WIN32_LEAN_AND_MEAN,
NOSERVICE): Likewise.
* include/private/gc_priv.h (MS_TIME_DIFF): Avoid floating-point
arithmetics; add a comment.
* mark.c (GC_clear_hdr_marks): Don't test USE_MARK_BYTES.
* extra/setjmp_t.c (main): Don't test USE_MARK_BITS.
* include/private/gc_pmark.h (SET_MARK_BIT_EXIT_IF_SET): Likewise.
* include/private/gc_pmark.h (SET_MARK_BIT_EXIT_IF_SET): Remove
"mark_byte" local variable.
* include/private/gc_pmark.h (OR_WORD_EXIT_IF_SET): Add a comment
about that AO_or() is not used by GC unless USE_MARK_BITS
explicitly set.
* include/private/gc_priv.h (OR_WORD): Likewise.
* include/private/gc_pmark.h (INCR_MARKS): Remove trailing ';',
add parentheses.
* include/private/gc_priv.h (ONES): Define before use by
MAKE_COOLER.
* include/private/gc_priv.h (MARK_BITS_SZ): Define where used.
* include/private/gc_priv.h (OR_WORD): Don't define if
USE_MARK_BYTES.
* include/private/gcconfig.h (USE_MARK_BYTES); Remove duplicate
definition; simplify expression.
* os_dep.c (GC_get_maps): Always close the file.
* pthread_support.c (GC_get_nprocs): Likewise.
* os_dep.c (READ): Define similarly across the file (without
parameters).
* pthread_support.c (GC_get_nprocs): Use signed int type for "i"
and "len" local variables (since read() may return -1).
* include/private/gc_pmark.h (LONG_MULT): Add prefix/suffix
double underscore; add "volatile" for asm.
* include/private/gc_pmark.h (LONG_MULT): Add missing
parentheses.
* include/private/gc_priv.h (OR_WORD): Likewise.
* include/private/gc_priv.h (OR_WORD): Remove unnecessary brackets
and ';' symbol.
* os_dep.c (GC_get_stack_base): Implement for Android (same as
for Linux).
* pthread_support.c (GC_get_nprocs): Return 1 (instead of -1) if
failed to open "stat" file (not to issue a warning twice); update
the comment.
* pthread_support.c (GC_thr_init): Call sysconf() on Android to
get the number of CPUs.
* include/private/gc_priv.h (_GNU_SOURCE): Revert one of the
recent patches regarding this macro as the macro should be set
(to 1) before including any other system header.
* doc/README.environment (GC_INITIAL_HEAP_SIZE,
GC_MAXIMUM_HEAP_SIZE): Update.
* misc.c (GC_parse_mem_size_arg): Allow 'k', 'M', 'G' suffixes in
heap size specifier; return 0 if not a valid one.
* include/gc_cpp.h: Explicitly define inline one-argument delete
operator for Cygwin (as a workaround).
* tests/test_cpp.cc (main): Suppress compiler warnings about
"assigned value is unused".
* misc.c (GC_parse_mem_size_arg): New function.
* misc.c (GC_init): Use GC_parse_mem_size_arg().
* pthread_stop_world.c (tkill): Declare for Android.
* include/private/gc_priv.h (_GNU_SOURCE): Include features.h
first (except for NaCl) and then define the macro to 1 if not yet.
* tests/tests.am (TESTS, check_PROGRAMS): Add
'initsecondarythread'.
* tests/tests.am (initsecondarythread_SOURCES,
initsecondarythread_LDADD): New variable.
* dbg_mlc.c (GC_store_debug_info_inner): Always define; add
"const" to its string argument.
* dbg_mlc.c (GC_store_debug_info): Call GC_store_debug_info_inner.
* dbg_mlc.c (GC_debug_free): Set GC_have_errors in case of
smashed or previously deallocated found.
* dbg_mlc.c (GC_check_heap_block): Replace while loop with a for
one.
* reclaim.c (GC_reclaim_check): Likewise.
* dbg_mlc.c (GC_check_heap_proc): Remove redundant cast to word.
* os_dep.c (GC_get_stack_base): Don't initialize
stackbase_main_self/ss_sp on Solaris if thr_main() is zero (thus
calling GC_INIT() from a non-primordial thread is possible now).
* reclaim.c (GC_add_leaked): Turn into an inline one.
* reclaim.c (GC_reclaim_small_nonempty_block):
Change report_if_found type from int/word to boolean.
* include/private/gc_priv.h (GC_start_reclaim): Likewise.
* include/private/gc_priv.h (set_mark_bit_from_hdr,
clear_mark_bit_from_hdr): Place closing parenthesis properly.
* os_dep.c (GC_get_main_stack_base): Try to use
pthread_attr_getstack first for Linux if THREADS.
* doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Adjust text
alignment.
* dbg_mlc.c (GC_generate_random_backtrace_no_gc): Fix a message
typo.
* dbg_mlc.c (GC_debug_malloc): Add a comment (about zero size).
* dbg_mlc.c (GC_strdup): Call GC_err_printf instead of WARN (in
case of NULL argument).
* dbg_mlc.c (GC_free): In case of NULL argument, just return
(without any warning printed); eliminate "uncollectable" local
variable.
* configure.ac (THREADDLLIBS): Use alternate thread library on
Solaris 8.
* configure.ac (need_atomic_ops_asm): Set to true only for SPARC
Solaris.
* configure.ac: Don't use libdl on mips-sgi-irix6.
* mach_dep.c (NO_GETCONTEXT); Define for RTEMS.
* mach_dep.c (GC_with_callee_saves_pushed): Don't call
__builtin_unwind_init() for RTEMS; use setjmp() without the
leading underscore (for RTEMS).
* tests/test.c (BIG): Use smaller value for RTEMS.
* tests/test.c (main): Customize for RTEMS.
* configure.host: Remove doubled words in comments.
* os_dep.c: Likewise.
* doc/README: Likewise.
* extra/setjmp_t.c: Likewise.
* tests/huge_test.c: Likewise.
* extra/setjmp_t.c (getpagesize, nested_sp, main, g): Replace the
K&R-style function definition with the ANSI C one.
* extra/setjmp_t.c (nested_sp): Implement in the same way as
GC_approx_sp.
* dyn_load.c (GC_dyld_sections): Add more sections.
* dyn_load.c (GC_dyld_add_sect_fmts): New static variable.
* dyn_load.c (L2_MAX_OFILE_ALIGNMENT): New macro.
* dyn_load.c (GC_dyld_image_add, GC_dyld_image_remove): Improve
logging; add support for on-demand sections.
* gcj_mlc.c (GC_gcj_malloc_initialized): Use STATIC unless
GC_ASSERTIONS.
* include/private/gc_priv.h (GC_gcj_malloc_initialized): Don't
declare (as external) unless GC_ASSERTIONS.
* os_dep.c (GC_win32_free_heap): Clear GC_heap_bases[] also for
Cygwin; add FIXME.
* include/private/gcconfig.h: Include <sys/unistd.h> for RTEMS.
* include/private/gcconfig.h: Add "#error" for every "-->" mark.
* include/private/gcconfig.h (CLEAR_DOUBLE): Turn the code into
an expression.
* include/private/pthread_support.h (SUSPENDED_EXT): Add new flag
(which existed previously as SUSPENDED and still exists in GCJ).
* include/private/pthread_support.h (DISABLED_GC): Change the
value (as it is already used by SUSPENDED_EXT).
* tests/test.c (reverse_test): Modify count (BIG) for
ppc64-darwin.
* reclaim.c (GC_print_all_errors): Recognize new GC_ABORT_ON_LEAK
macro and environment variable; abort if any error has been
printed provided the environment variable (or macro) is set.
* doc/README.environment (GC_ABORT_ON_LEAK): Document.
* doc/README.macros (GC_ABORT_ON_LEAK): Likewise.
* os_dep.c (GC_unix_sbrk_get_mem, GC_unix_get_mem): Don't define
for RTEMS.
* include/private/gcconfig.h (RTEMS): Add support for.
* include/private/gcconfig.h (GET_MEM): Use calloc() for RTEMS.
* mallocx.c (GC_malloc_uncollectable): Move to malloc.c (since
it is used internally in some places).
* dbg_mlc.c (GC_register_finalizer_no_order): Remove redundant
declaration.
* dbg_mlc.c (GC_debug_malloc_replacement,
GC_debug_realloc_replacement): Rename RA to GC_DBG_RA.
* malloc.c (GC_debug_malloc_replacement): Likewise.
* mallocx.c (GC_debug_realloc_replacement): Likewise.
* dbg_mlc.c (GC_store_debug_info): Move proto from dbg_mlc.h.
* malloc.c (GC_strdup, GC_strndup, GC_wcsdup): Move to mallocx.c.
* malloc.c: Include errno.h only REDIRECT_MALLOC; remove redundant
includes of string.h.
* mallocx.c: Include string.h (for GC_strdup).
* include/private/dbg_mlc.h (GC_store_debug_info): Move declaration
to dbg_mlc.c.
* include/private/gc_locks.h (UNCOND_LOCK, UNCOND_UNLOCK): Remove
redundant trailing ';'.
* include/private/gc_priv.h (START_WORLD, COND_DUMP): Likewise.
* include/private/gc_locks.h (LOCK, UNLOCK): Place opening '{'
properly.
* include/private/gc_priv.h (GC_DBG_RA): Move from dbg_mlc.c,
malloc.c, mallocx.c.
* alloc.c (GC_check_heap, GC_print_all_smashed): Move the
definition from misc.c.
* dbg_mlc.c (GC_debug_malloc_atomic_uncollectable): Define as
public.
* include/gc.h (GC_debug_malloc_atomic_uncollectable): Declare.
* include/gc.h (GC_MALLOC_ATOMIC_UNCOLLECTABLE): Define new public
macro.
* dbg_mlc.c (MAX_SMASHED): Don't define if already set.
* reclaim.c (MAX_LEAKED): Likewise.
* dbg_mlc.c (GC_add_smashed): Add FIXME about the concurrent
access to the global array.
* reclaim.c (GC_add_leaked): Likewise.
* misc.c (GC_print_back_height): Set on if GC_PRINT_BACK_HEIGHT
(new macro) is defined.
* doc/README.macros (GC_PRINT_BACK_HEIGHT): Document.
* misc.c (GC_dump_regularly, GC_init): Replace 0/1 for
GC_dump_regularly and GC_print_back_height variables with
FALSE/TRUE.
* reclaim.c (GC_print_all_errors): Refine the comment.
* tests/test.c (reverse_test_inner): Undo one of the previous
patches which shifts "c" and "d" pointers only if
ALL_INTERIOR_POINTERS (since interior pointers are always
recognized in stacks).
* misc.c (GC_stdout, GC_stderr): Move the definition to the place
where GC_log is defined (Unix only).
* misc.c (GC_init): Recognize "GC_ONLY_LOG_TO_FILE" environment
variable and the similar macro; redirect GC_stdout and GC_stderr
to GC_log if "GC_LOG_FILE" environment variable is set unless
prohibited by GC_ONLY_LOG_TO_FILE (Unix only).
* doc/README.environment (GC_ONLY_LOG_TO_FILE): Document.
* doc/README.macros (GC_ONLY_LOG_TO_FILE): Likewise.
* misc.c (GC_stdout, GC_write): Rename GC_stdout to GC_log (Win32
only).
* misc.c (GC_write): Add for MacOS (and OS/2); change WRITE()
accordingly.
* misc.c (GC_printf): Check GC_quiet before va_start().
* allchblk.c (GC_freehblk): Use GC_log_printf instead of GC_printf
inside "if (GC_print_stats)" branch.
* alloc.c (GC_collect_or_expand): Likewise.
* dyn_load.c (GC_register_dynamic_libraries): Likewise.
* headers.c (GC_scratch_alloc): Likewise.
* os_dep.c (GC_get_maps, GC_remap, PROTECT,
GC_write_fault_handler, GC_dirty_init, GC_mprotect_thread): Likewise.
* alloc.c (min_bytes_allocd): Use GC_log_printf instead of
GC_printf for DEBUG_THREADS output.
* darwin_stop_world.c (GC_stack_range_for, GC_suspend_thread_list,
GC_stop_world, GC_thread_resume, GC_start_world): Likewise.
* pthread_start.c (GC_inner_start_routine): Likewise.
* pthread_stop_world.c (GC_suspend_handler, GC_restart_handler,
GC_push_all_stacks, GC_suspend_all, GC_stop_world,
GC_start_world): Likewise.
* pthread_support.c (GC_mark_thread, GC_get_nprocs,
GC_start_rtn_prepare_thread, pthread_create): Likewise.
* checksums.c (GC_update_check_page): Use GC_printf() instead of
GC_err_printf() for error printing.
* checksums.c (GC_check_blocks, GC_check_dirty): Use GC_log_printf
instead of GC_printf for logging purposes.
* dyn_load.c (sys_errlist, sys_nerr, errno): Move declaration of
external variable outside from GC_register_dynamic_libraries.
* dyn_load.c (GC_register_dynamic_libraries): Don't use
sys_errlist value if errno equals to sys_nerr.
* dyn_load.c (GC_register_dynamic_libraries): Use GC_log_printf
instead of GC_printf for DL_VERBOSE output.
* dyn_load.c (GC_dyld_image_add, GC_dyld_image_remove,
GC_init_dyld): Use GC_log_printf instead of GC_printf for
DARWIN_DEBUG output.
* os_dep.c (catch_exception_raise): Use GC_log_printf
instead of GC_printf for DEBUG_EXCEPTION_HANDLING output.
* reclaim.c (GC_print_free_list): Move "n" increment out of
GC_printf() call.
* win32_threads.c (DEBUG_CYGWIN_THREADS, DEBUG_WIN32_PTHREADS,
DEBUG_WIN32_THREADS): Remove.
* win32_threads.c (GC_register_my_thread_inner,
GC_win32_start_inner): Use GC_log_printf instead of GC_printf
inside "if (GC_print_stats)" branch.
* win32_threads.c (GC_PTHREAD_PTRVAL): New macro (defined only if
GC_PTHREADS).
* win32_threads.c (GC_delete_gc_thread, NUMERIC_THREAD_ID,
GC_pthread_join, GC_pthread_create): Use GC_PTHREAD_PTRVAL
macro.
* win32_threads.c (GC_push_stack_for, GC_mark_thread,
GC_CreateThread, GC_beginthreadex, GC_pthread_join,
GC_pthread_create, GC_pthread_start_inner, GC_thread_exit_proc,
GC_mark_thread_local_free_lists): Use GC_log_printf instead of
GC_printf for DEBUG_THREADS output.
* win32_threads.c (GC_win32_start_inner, GC_CreateThread,
GC_beginthreadex, GC_pthread_join, GC_pthread_create,
GC_pthread_start_inner, GC_thread_exit_proc): Cast
GetCurrentThreadId result to long; don't cast value of pthread_t
type to int; adjust printf format specifiers.
* doc/README.win32 (DEBUG_WIN32_PTHREADS): Remove obsolete
information.
* tests/test.c (cons, small_cons, gcj_cons, check_ints,
check_uncollectable_ints, print_int_list, check_marks_int_list,
fork_a_thread, finalizer, mktree, chktree, alloc8bytes,
alloc_small, tree_test, typed_test, check_heap_stats, WinMain,
test, main): Remove unnecessary casts of GC_printf calls to void.
* allchblk.c (GC_print_hblkfreelist): Adjust (make uniform across
BDWGC) printed message (adjust letters case, terminating dot and
new line symbols).
* alloc.c (GC_check_fl_marks): Likewise.
* backgraph.c (new_back_edges): Likewise.
* checksums.c (GC_check_dirty): Likewise.
* darwin_stop_world.c (GC_push_all_stacks,
GC_suspend_thread_list): Likewise.
* dbg_mlc.c (GC_print_type, GC_debug_free, GC_debug_realloc,
store_old): Likewise.
* dyn_load.c (GC_register_dynamic_libraries): Likewise.
* mark.c (GC_initiate_gc, GC_mark_some, GC_mark_from, GC_push_all,
GC_push_selected, GC_push_next_marked_dirty): Likewise.
* mark_rts.c (GC_exclude_static_roots_inner): Likewise.
* os_dep.c (GC_remap, GC_default_push_other_roots,
GC_push_thread_structures, GC_dirty_init, GC_read_dirty,
catch_exception_raise_state, catch_exception_raise_state_identity,
GC_mprotect_thread_notify, GC_mprotect_thread,
catch_exception_raise): Likewise.
* pthread_stop_world.c (GC_print_sig_mask, GC_push_all_stacks,
GC_stop_world, GC_stop_init): Likewise.
* pthread_support.c (GC_thr_init, GC_register_my_thread_inner,
GC_start_routine): Likewise.
* win32_threads.c (GC_register_my_thread_inner,
GC_push_all_stacks, GC_win32_start_inner, GC_pthread_join,
GC_pthread_start_inner): Likewise.
* alloc.c (GC_expand_hp_inner): Realign the code.
* mark.c (GC_mark_from, GC_mark_local, GC_do_parallel_mark):
Likewise.
* misc.c (GC_init): Likewise.
* os_dep.c (GC_dirty_init, GC_read_dirty): Likewise.
* include/private/gc_pmark.h (PUSH_CONTENTS_HDR): Likewise.
* tests/test.c (run_one_test): Likewise.
* misc.c (GC_err_puts): Document.
* misc.c (GC_err_write): Remove.
* os_dep.c (dump_maps): Likewise.
* include/private/gc_priv.h (GC_err_write): Likewise.
* os_dep.c (GC_print_address_map): Call GC_err_puts() instead of
dump_maps() and GC_err_write().
* os_dep.c (GC_read_dirty): Remove redundant brackets.
* tests/test.c (reverse_test_inner): Test interior pointer
recognition only if ALL_INTERIOR_POINTERS.
* tests/test.c (run_one_test): Replace GC_all_interior_pointers
with GC_get_all_interior_pointers(); simplify the expression.
* tests/test.c (check_heap_stats): Replace GC_bytes_allocd and
GC_bytes_allocd_before_gc with GC_get_total_bytes().
* tests/test.c (main): Replace GC_gc_no with GC_get_gc_no().
* dbg_mlc.c (GC_debug_strdup, GC_debug_free): Output a portability
warning if the argument is NULL and GC is in leaks detection mode.
* dbg_mlc.c (GC_debug_strndup, GC_debug_wcsdup): New public
function definition.
* malloc.c (GC_strndup, GC_wcsdup, strndup): Likewise.
* mallocx.c (GC_posix_memalign): Likewise.
* malloc.c (strdup): Fix string size value; rename "len" to "lb".
* mallocx.c: Include errno.h unless WinCE (otherwise include
windows.h for Win32 error constants).
* win32_threads.c: Define WIN32_LEAN_AND_MEAN and NOSERVICE before
windows.h inclusion.
* misc.c (GC_init): Register at-exit callback if GC_find_leak
(even if GC_FIND_LEAK macro is unset).
* pthread_stop_world.c (NACL_STORE_REGS,
__nacl_suspend_thread_if_needed, GC_nacl_initialize_gc_thread):
Use BCOPY() instead of memcpy().
* pthread_support.c (GC_init_real_syms): Likewise.
* doc/README.macros (GC_DEBUG_REPLACEMENT, GC_REQUIRE_WCSDUP):
Document new macro.
* doc/README.macros (REDIRECT_MALLOC): Update documentation.
* include/gc.h (GC_strndup, GC_posix_memalign, GC_debug_strndup):
New API function prototype.
* include/gc.h (GC_MALLOC, GC_REALLOC): Redirect to
GC_debug_malloc/realloc_replacement() if GC_DEBUG_REPLACEMENT.
* include/gc.h (GC_STRDUP): Remove redundant parentheses.
* include/leak_detector.h (realloc, strdup): Likewise.
* include/gc.h (GC_STRNDUP): New API macro.
* include/gc.h (GC_NEW, GC_NEW_ATOMIC, GC_NEW_STUBBORN,
GC_NEW_UNCOLLECTABLE): Add missing parentheses.
* include/gc.h (GC_wcsdup, GC_debug_wcsdup): New API function
prototype (only if GC_REQUIRE_WCSDUP).
* include/gc.h (GC_WCSDUP): New API macro (only if
GC_REQUIRE_WCSDUP).
* include/leak_detector.h: Include stdlib.h and string.h after gc.h (unless
GC_DONT_INCLUDE_STDLIB).
* include/leak_detector.h (malloc, calloc, free, realloc):
Undefine symbol before its redefinition.
* include/leak_detector.h (strndup, memalign, posix_memalign):
Redefine to the corresponding GC function.
* include/leak_detector.h (wcsdup): Redefine to GC_WCSDUP (only
if GC_REQUIRE_WCSDUP).
* include/leak_detector.h (CHECK_LEAKS): Add comment; don't define
the macro if already defined.
* misc.c (GC_abort): Use _exit() (instead of DebugBreak) on Win32
when doing code static analysis (to inform the tool that the
function is a no-return one).
* os_dep.c (GC_linux_stack_base): Remove a duplicate validation
of the length of "stat" file; use signed int type for "i",
"buf_offset" and "len" local variables (since read() may
return -1).
* blacklst.c (GC_bl_init_no_interiors): New function (the code
moved from GC_bl_init).
* blacklst.c (GC_bl_init): Invoke GC_bl_init_no_interiors unless
GC_all_interior_pointers mode; remove unnecessarily parameter cast
for GC_scratch_alloc call.
* include/private/gc_priv.h (GC_bl_init): Move the function
declaration to misc.c file.
* misc.c (GC_bl_init_no_interiors): Add a prototype.
* misc.c (GC_set_all_interior_pointers): Allow values other than 0
and 1; allow altering GC_set_all_interior_pointers value even
after GC initialization.
* obj_map.c (GC_initialize_offsets): Clear GC_valid_offsets and
GC_modws_valid_offsets if GC_all_interior_pointers is off.
* misc.c (GC_init): Don't call GC_initialize_offsets() unless
GC_all_interior_pointers mode.
* alloc.c (GC_finish_collection): Remove redundant brackets;
adjust code indentation.
* blacklst.c (GC_add_to_black_list_normal): Simplify expression
(to improve code readability).
* blacklst.c (GC_is_black_listed): Join nested "if" (into a single
conditional expression); initialize "nblocks" just before the loop
beginning.
* misc.c (GC_init): Don't compute initial_heap_sz if GC is already
initialized.
* include/private/gc_priv.h (GC_initialize_offsets): Move the
function declaration to misc.c file.
* obj_map.c (GC_initialize_offsets): Remove offsets_initialized
static variable since the function is called only once.
* tests/middle.c (main): Use setter for GC_all_interior_pointers;
adjust printf format specifier (and cast the value passed to).
* doc/README.macros (SMALL_CONFIG, LARGE_CONFIG): Refine the
documentation.
* include/private/gc_hdrs.h (LOG_BOTTOM_SZ): Ignore SMALL_CONFIG
if LARGE_CONFIG is defined.
* include/private/gc_priv.h (CPP_LOG_HBLKSIZE): Likewise.
* alloc.c (GC_finish_collection): Replace "#else #ifdef" with
"#elif".
* include/private/gc_priv.h (CPP_LOG_HBLKSIZE, LOG_PHT_ENTRIES,
MAX_ROOT_SETS, MAX_HEAP_SECTS): Likewise.
* alloc.c (GC_expand_hp_inner): Check for GC_collect_at_heapsize
overflow even if not LARGE_CONFIG.
* dbg_mlc.c (GC_check_heap_proc): Check "oh" size even if
SMALL_CONFIG.
* finalize.c (GC_print_finalization_stats): Fix "#endif" comment.
* doc/README.environment (GC_LOG_FILE, GC_PRINT_VERBOSE_STATS,
GC_FULL_FREQUENCY): Refine the documentation.
* extra/msvc_dbg.c: Test _MSC_VER macro; include "gc.h" (for
GC_word).
* extra/msvc_dbg.c (ULONG_PTR): Replace with GC_ULONG_PTR; define
as word.
* dbg_mlc.c (GC_get_back_ptr_info, GC_print_obj,
GC_print_smashed_obj, GC_debug_free_inner): Add a code for a
LINT-like tool to instruct it that the function is invoked only
with valid parameters (otherwise a SEGV is ok); recognize LINT2
new macro.
* misc.c (GC_abort): Instruct a LINT-like tool that the function
never returns in fact.
* os_dep.c (GC_linux_stack_base): Check for read buffer overflow;
close the file immediately after read; use STRTOULL() instead of
decoding the address number manually.
* include/private/gc_priv.h (EXPECT): Don't specify outcome for a
LINT-like tool.
* include/private/gc_priv.h (GC_all_interior_pointers): Instruct a
LINT-like tool that the value is restricted to zero and one only
(required since the variable is global and its value is used as a
part of array index expression is some places).
* dbg_mlc.c (GC_make_closure): Fix SEGV in case GC_malloc returns
NULL.
* dbg_mlc.c (GC_debug_register_finalizer,
GC_debug_register_finalizer_no_order,
GC_debug_register_finalizer_unreachable,
GC_debug_register_finalizer_ignore_self): Handle out of memory
case properly (similar to GC_register_finalizer_inner).
* headers.c (GC_install_header): Handle the case when alloc_hdr()
returns NULL.
* os_dep.c (GC_get_maps_len): Defend against missing "maps" file.
* pthread_support.c (GC_mark_thread): Place a dummy return
statement (which uses "id" argument) before the actual use of "id"
as an array index (to suppress a warning produced by some static
code analysis tools).
* win32_threads.c (GC_mark_thread): Likewise.
* pthread_support.c (GC_thr_init): Abort (with the appropriate
message) if out of memory.
* finalize.c (GC_register_finalizer_inner): Fix a typo in a
comment.
*include/private/gcconfig.h (STACKBOTTOM): Likewise.
* gcj_mlc.c (GC_core_gcj_malloc): Replace 0/1 with TRUE/FALSE in
EXPECT (the 2nd argument).
* malloc.c (GC_core_malloc_atomic, GC_core_malloc, GC_free):
Likewise.
* mark.c (GC_mark_and_push, GC_mark_and_push_stack): Likewise.
* thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Likewise.
* include/private/gc_hdrs.h (HC_GET_HDR): Likewise.
* include/private/gc_priv.h (SMALL_OBJ): Likewise.
* include/private/specific.h (getspecific): Likewise.
* pthread_support.c (LOCK_STATS): Add a comment.
* include/gc_pthread_redirects.h (GC_NO_DLOPEN,
GC_NO_PTHREAD_SIGMASK, GC_PTHREAD_CREATE_CONST,
GC_PTHREAD_EXIT_ATTRIBUTE, GC_NO_PTHREAD_CANCEL): Move the
definition to gc_config_macros.
* pthread_support.c (pthread_cancel, GC_pthread_cancel_t,
GC_pthread_cancel): Test GC_NO_PTHREAD_CANCEL (instead of NACL and
GC_PTHREAD_EXIT_ATTRIBUTE).
* include/gc_pthread_redirects.h (GC_pthread_cancel,
pthread_cancel): Likewise.
* pthread_support.c (GC_pthread_create, GC_pthread_sigmask,
GC_pthread_join, GC_pthread_detach, GC_pthread_cancel): Realign
code.
* include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE):
Define as empty for NaCl.
* include/gc_pthread_redirects.h (GC_NO_PTHREAD_CANCEL): New macro
defined.
* dyn_load.c (GC_init_dyld): Do not invoke
_dyld_bind_fully_image_containing_address() if GC_no_dls (as it is
not required to register the main data segment in that case).
* include/gc.h (GC_no_dls): Adjust the comment.
* dyn_load.c (GC_MUST_RESTORE_REDEFINED_DLOPEN): Test
GC_NO_DLOPEN.
* gc_dlopen.c: Likewise.
* include/gc_pthread_redirects.h (GC_dlopen, dlopen): Likewise.
* gc_dlopen.c: Don't include dlfcn.h (as it is included in
gc_pthread_redirects.h).
* pthread_support.c (pthread_sigmask, GC_pthread_sigmask_t,
GC_pthread_sigmask): Test GC_NO_PTHREAD_SIGMASK (instead of
GC_DARWIN_THREADS, GC_OPENBSD_THREADS and NACL).
* include/gc_pthread_redirects.h (GC_pthread_sigmask,
pthread_sigmask): Likewise.
* win32_threads.c (pthread_sigmask, GC_pthread_sigmask): Test
GC_NO_PTHREAD_SIGMASK (instead of GC_WIN32_PTHREADS).
* pthread_support.c (pthread_create, GC_pthread_create_t,
GC_pthread_create): Rename GC_PTHREAD_CONST to
GC_PTHREAD_CREATE_CONST.
* win32_threads.c (GC_pthread_create): Likewise.
* include/gc_pthread_redirects.h: Likewise.
* include/gc_pthread_redirects.h (GC_NO_DLOPEN,
GC_NO_PTHREAD_SIGMASK): New macro defined.
* include/gc_pthread_redirects.h (GC_PTHREAD_CREATE_CONST): Set to
empty for NaCl.
* include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE): Do
not define for Android (as CANCEL_SAFE is not defined).
* include/gc.h (GC_ADD_CALLER, GC_RETURN_ADDR,
GC_HAVE_BUILTIN_BACKTRACE, GC_CAN_SAVE_CALL_STACKS): Move
definition to gc_config_macros.h file.
* include/gc_config_macros.h: Check the file is included from gc.h
file.
* include/gc_version.h: Likewise.
* gc_dlopen.c: Empty unit for NaCl.
* os_dep.c: Include fcntl.h for NaCl.
* os_dep.c (GC_get_main_stack_base): Ignore
USE_GET_STACKBASE_FOR_MAIN macro for NaCl.
* os_dep.c (GC_get_stack_base): Return GC_UNIMPLEMENTED for NaCl.
* os_dep.c (GC_remap): Use mmap (instead of mprotect) for NaCl.
* pthread_start.c (GC_inner_start_routine): Don't invoke
pthread_cleanup_push/pop for NaCl.
* pthread_stop_world.c (GC_nacl_num_gc_threads,
GC_nacl_thread_idx, GC_nacl_park_threads_now,
GC_nacl_thread_parker, GC_nacl_gc_thread_self,
GC_nacl_thread_parked, GC_nacl_thread_used,
GC_nacl_thread_parking_inited, GC_nacl_thread_alloc_lock): New
variable (fo NaCl only).
* pthread_stop_world.c (GC_remove_allowed_signals,
suspend_handler_mask, GC_stop_count, GC_world_is_stopped,
GC_retry_signals, SIG_THR_RESTART, GC_suspend_ack_sem,
GC_restart_ack_sem, GC_suspend_handler_inner, GC_suspend_handler,
GC_restart_handler): Don't define for NaCl.
* pthread_support.c (GC_get_nprocs): Likewise.
* include/private/gc_priv.h (SIG_SUSPEND): Likewise.
* include/private/gcconfig.h (LINUX): Likewise.
* pthread_stop_world.c (GC_push_all_stacks): Push register storage
for NaCl.
* pthread_stop_world.c (GC_suspend_all, GC_stop_world,
GC_start_world): Implement for NaCl.
* pthread_stop_world.c (GC_stop_world): Don't define unused "i"
local variable for OpenBSD (and NaCl).
* pthread_stop_world.c (NACL_STORE_REGS): New macro definition for
NaCl.
* pthread_stop_world.c (nacl_pre_syscall_hook,
__nacl_suspend_thread_if_needed, nacl_post_syscall_hook,
GC_nacl_initialize_gc_thread, GC_nacl_shutdown_gc_thread): New
function (for NaCl only).
* pthread_stop_world.c (GC_stop_init): Empty for NaCl.
* pthread_support.c (pthread_cancel, pthread_sigmask): Don't
redirect for NaCl.
* include/gc_pthread_redirects.h (pthread_cancel,
pthread_sigmask): Likewise.
* pthread_support.c (GC_nacl_initialize_gc_thread,
GC_nacl_shutdown_gc_thread): New internal prototype (NaCl only).
* pthread_support.c (GC_new_thread, GC_delete_thread): Initialize
and shutdown thread for NaCl.
* pthread_support.c (GC_thr_init): Call sysconf for NaCl.
* pthread_support.c (GC_pthread_exit): Call GC_thread_exit_proc
for NaCl.
* include/gc.h: Don't include features.h for NaCl.
* include/gc_pthread_redirects.h (GC_PTHREAD_CONST): New macro.
* include/gc_pthread_redirects.h (GC_pthread_create): Use
GC_PTHREAD_CONST instead of const.
* win32_threads.c (GC_pthread_create): Likewise.
* pthread_support.c (GC_pthread_create_t, GC_pthread_create,
pthread_create): Likewise.
* include/private/gcconfig.h (NACL): Recognize NaCl.
* include/private/gcconfig.h (GC_LINUX_THREADS): Valid for NaCl.
* include/private/pthread_stop_world.h (thread_stop_info): Add
reg_storage member; define NACL_GC_REG_STORAGE_SIZE macro (for
NaCl only).
* include/private/pthread_support.h (GC_nacl_gc_thread_self):
Declare internal variable (for NaCl only).
* mach_dep.c (GC_with_callee_saves_pushed): Fix FE_ALL_EXCEPT
macro.
* mark.c (GC_mark_some): Prefix and suffix "asm" and "volatile"
keywords with double underscore.
* os_dep.c (catch_exception_raise, catch_exception_raise_state,
catch_exception_raise_state_identity): Add GC_API_OSCALL to
function definition.
* os_dep.c (catch_exception_raise_state,
catch_exception_raise_state_identity): Move definition to be
before GC_ports.
* os_dep.c (catch_exception_raise): Declare to have the symbol
defined before GC_ports.
* os_dep.c (GC_ports): Store references to catch_exception_raise,
catch_exception_raise_state, catch_exception_raise_state_identity
(to prevent stripping these symbols as dead).
* os_dep.c (catch_exception_raise, catch_exception_raise_state,
catch_exception_raise_state_identity): Mark these symbols as
"referenced dynamically" via an assembler directive (unless
NO_DESC_CATCH_EXCEPTION_RAISE).
* include/private/gc_priv.h (GC_API_OSCALL): New macro (defined
similar to GC_API but as if GC_DLL is always defined).
* os_dep.c: Don't include signal.h for GC_write_fault_handler on
Win32.
* os_dep.c (SIG_OK): Don't return true unless SIGSEGV or SIGBUS on
FreeBSD.
* os_dep.c (CODE_OK): Use SEGV_ACCERR on FreeBSD (define
SEGV_ACCERR for older FreeBSD releases).
* dyn_load.c (GC_register_map_entries,
GC_register_dynamic_libraries_dl_iterate_phdr): Calculate
DATASTART only once if DATASTART_IS_FUNC.
* dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr):
Calculate DATAEND only once if DATAEND_IS_FUNC.
* dyn_load.c: Add comment to some endif; realign some code.
* dyn_load.c (GC_init_dyld): Don't use
_dyld_bind_fully_image_containing_address if
NO_DYLD_BIND_FULLY_IMAGE defined; add FIXME.
* include/private/gcconfig.h (GC_data_start, GC_find_limit):
Declare if used by DATASTART/DATAEND, respectively.
* include/private/gcconfig.h (DATASTART_IS_FUNC, DATAEND_IS_FUNC):
Define if DATASTART/DATAEND is a function, respectively.
* include/private/gcconfig.h (GETPAGESIZE, NO_PTHREAD_TRYLOCK,
NO_DYLD_BIND_FULLY_IMAGE): Define for Darwin/arm as well; include
unistd.h.
* os_dep.c (GC_setpagesize, GC_task_self, PROTECT, UNPROTECT):
Reorder to remove redundant ifdef for Win32.
* os_dep.c: Add comment to some endif.
* os_dep.c: Include pthread.h (for Linux even if single-threaded)
if USE_GET_STACKBASE_FOR_MAIN; also include it for Darwin.
* os_dep.c (STACKBOTTOM): Redefine for Darwin (unless prohibited
for some reason).
* os_dep.c (GC_get_main_stack_base): Allow
USE_GET_STACKBASE_FOR_MAIN for Linux even if single-threaded; add
assertion for the returned result.
* os_dep.c (GC_get_stack_base): Define for Darwin if
multi-threaded.
* os_dep.c (SIG_OK, CODE_OK): Add comment (for FreeBSD).
* os_dep.c (ID_STOP, ID_RESUME): Define only if threads.
* os_dep.c (catch_exception_raise): Remove redundant parentheses;
refine the documentation.
* NT_MAKEFILE: Define _CRT_SECURE_NO_DEPRECATE for C++ files as
well.
* NT_STATIC_THREADS_MAKEFILE: Likewise.
* doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Refine.
* include/gc.h (GC_INIT): Document.
* include/private/gc_priv.h (GC_MACH_HEADER, GC_MACH_SECTION,
GC_GETSECTBYNAME): Define depending only on the word size (i.e.,
define these macros also for ARM).
* tests/test.c (check_heap_stats): Print main thread stack bottom
as well (only if verbose mode is on).
* mach_dep.c (GC_with_callee_saves_pushed): Fix and improve code
introduced by the previous patch (if GETCONTEXT_FPU_EXCMASK_BUG
and X86_64).
* darwin_stop_world.c (GC_FindTopOfStack): Prefix and suffix
"volatile" keyword with double underscore.
* mach_dep.c (GETCONTEXT_FPU_EXCMASK_BUG): Recognize new macro and
include fenv.h if defined (unless NO_GETCONTEXT or HAVE_PUSH_REGS).
* mach_dep.c (GC_with_callee_saves_pushed): Restore FPU exception
mask corrupted by getcontext if GETCONTEXT_FPU_EXCMASK_BUG.
* include/private/gcconfig.h (GETCONTEXT_FPU_EXCMASK_BUG): Define
for Linux/amd64 (since its GLibc getcontext currently has the bug).
* allchblk.c (GC_use_entire_heap): Change type to int (as declared
in gc.h); set the default value depending on new GC_USE_ENTIRE_HEAP
macro.
* misc.c (GC_init): Test GC_USE_ENTIRE_HEAP environment variable to
alter the default value of GC_use_entire_heap.
* doc/README.environment (GC_USE_ENTIRE_HEAP): Document.
* doc/README.macros (GC_USE_ENTIRE_HEAP): Likewise.
* include/private/gcconfig.h (PARALLEL_MARK): Do not make it cause
MPROTECT_VDB undefining.
* include/private/gcconfig.h (DYNAMIC_LOADING): Fix filename in
the comment.
* include/private/gc_priv.h (_GC_arrays): Move the conditional
macro definitions (shortcuts for GC_arrays members) into the
structure body.
* darwin_stop_world.c (GC_mach_handler_thread,
GC_use_mach_handler_thread,
GC_darwin_register_mach_handler_thread): Define only if
MPROTECT_VDB.
* darwin_stop_world.c (GC_suspend_thread_list): Use
GC_mach_handler_thread and GC_use_mach_handler_thread only if
MPROTECT_VDB.
* darwin_stop_world.c (GC_stop_world): Reset GC_mach_threads_count
only if defined (i.e. unless GC_NO_THREADS_DISCOVERY).
* misc.c (GC_init): Fix comment for GWW_VDB.
* os_dep.c (DARWIN_EXC_STATE, DARWIN_EXC_STATE_COUNT,
DARWIN_EXC_STATE_T, DARWIN_EXC_STATE_DAR): New macros.
* os_dep.c (catch_exception_raise): Use DARWIN_EXC_STATE,
DARWIN_EXC_STATE_COUNT, DARWIN_EXC_STATE_T, DARWIN_EXC_STATE_DAR.
* pthread_support.c (GC_thr_init): Define "dummy" local variable
only unless GC_DARWIN_THREADS.
* include/private/gcconfig.h (MPROTECT_VDB): Define for Darwin
even in the single-threaded mode; define for iPhone/iPad.
* include/private/gcconfig.h (IA64): Remove unnecessary "ifdef"
around "undef".
* include/private/gcconfig.h (HEURISTIC1): Remove unused for
Cygwin.
* include/private/gcconfig.h (STACKBOTTOM): Use fixed address for
Darwin/arm (instead of HEURISTIC1).
* misc.c (GC_write): Replace multiple "ifdef/endif" with "elif"
(for ECOS and NOSYS).
* os_dep.c (GC_get_main_stack_base): Likewise.
* os_dep.c (GC_get_main_stack_base): Check
USE_GET_STACKBASE_FOR_MAIN macro before checking STACKBOTTOM one;
remove "dummy" variable (use result one instead).
* doc/README.macros (SN_TARGET_PS3): Document.
* extra/threadlibs.c (main): Don't output "-lpthread" (and "-ldl")
for Android.
* include/private/pthread_support.h: Fix comment for "endif".
* misc.c (GC_allocate_ml): Define global variable if SN_TARGET_PS3.
* misc.c (GC_init): Initialize GC_allocate_ml if SN_TARGET_PS3.
* os_dep.c (SIGSEGV): Define to dummy zero if SN_TARGET_PS3.
* os_dep.c (GC_unix_mmap_get_mem): Don't define if SN_TARGET_PS3.
* os_dep.c (GC_default_push_other_roots,
GC_push_thread_structures): Define for SN_TARGET_PS3.
* include/private/gc_locks.h (GC_allocate_ml, LOCK, UNLOCK): Define
for SN_TARGET_PS3.
* include/private/gcconfig.h (SN_TARGET_PS3): Recognize new macro
(Sony PS/3 target).
* include/private/gcconfig.h (THREADS): Define unconditionally if
SN_TARGET_PS3.
* include/private/gcconfig.h (GET_MEM): Define for SN_TARGET_PS3.
* alloc.c (GC_collect_or_expand): Replace NIL with NULL in message.
* dbg_mlc.c (GC_debug_malloc, GC_debug_malloc_ignore_off_page,
GC_debug_malloc_atomic_ignore_off_page,
GC_debug_generic_malloc_inner,
GC_generic_malloc_inner_ignore_off_page, GC_debug_malloc_stubborn,
GC_debug_malloc_atomic, GC_debug_malloc_uncollectable,
GC_debug_malloc_atomic_uncollectable): Likewise.
* gcj_mlc.c (GC_debug_gcj_malloc): Likewise.
* dbg_mlc.c (GC_check_annotated_obj): Replace NIL with NULL in a
comment.
* dyn_load.c (GC_FirstDLOpenedLinkMap): Likewise.
* mark_rts.c (GC_roots_present): Likewise.
* doc/README: Likewise.
* include/private/gc_hdrs.h (IS_FORWARDING_ADDR_OR_NIL): Likewise.
* include/private/gc_priv.h (_GC_arrays): Likewise.
* configure.ac: Use AC_CHECK_LIB() to check for pthread instead of
just blindly linking to -lpthread, as Android includes pthread
support within libc and does not provide a separate libpthread.
* dyn_load.c (GC_register_dynamic_libraries): Skip current link map
entry if l_addr is NULL (Android/bionic only).
* pthread_stop_world.c (android_thread_kill): New internal function
(Android only).
* pthread_stop_world.c (GC_suspend_all, GC_start_world): Call
android_thread_kill (based on tkill) instead of pthread_kill on
Android (since pthread_kill cannot be used safely on the platform).
* pthread_support.c (GC_new_thread): Store thread Id (obtained from
gettid) for use by android_thread_kill (Android only).
* include/private/pthread_support.h (GC_Thread_Rep): Add kernel_id
structure member (Android only).
* include/private/gcconfig.h: Recognize __x86_64 macro as a synonym
of __x86_64__ (Darwin); define __environ macro (Android on M68K).
* allchblk.c (GC_freehblk): Print extended error message (done via
GC_printf() before aborting with a short message) only if
GC_print_stats.
* dyn_load.c (GC_register_dynamic_libraries): Likewise.
* os_dep.c (GC_get_maps, GC_register_data_segments, GC_remap,
PROTECT, GC_write_fault_handler, GC_mprotect_thread): Likewise.
* pthread_stop_world.c (GC_start_world): Likewise.
* win32_threads.c (GC_register_my_thread_inner): Likewise.
* os_dep.c (GC_get_main_stack_base, GC_register_data_segments,
GC_dirty_init): Remove redundant print of an error message before
aborting with the same message.
* os_dep.c (GC_register_data_segments): Remove format specifier
from the string passed to GC_err_puts(); use ABORT instead of EXIT
(if invalid executable type).
* os_dep.c (GC_remap): Adjust printf format specifier (for long
type).
* os_dep.c (GC_dirty_init): Print a message about SIG_IGN detected
(for SIGSEGV/BUS) only if GC_print_stats.
* os_dep.c (catch_exception_raise): Join 2 adjacent GC_err_printf
calls.
* tests/test.c (main): Print the relevant message if GWW_VDB.
* include/private/gcconfig.h: Don't define MPROTECT_VDB for Win32
on x64 if compiled by GCC.
* tests/staticrootstest.c: Include string.h for memset() prototype.
* tests/thread_leak_test.c (main): Fix printf() format specifiers.
* CMakeLists.txt: Check enable_parallel_mark on Darwin.
* configure.ac: Likewise.
* darwin_stop_world.c (DARWIN_SUSPEND_GC_THREADS,
DARWIN_QUERY_TASK_THREADS): Rename to GC_NO_THREADS_DISCOVERY and
GC_DISCOVER_TASK_THREADS, respectively.
* os_dep.c (DARWIN_SUSPEND_GC_THREADS): Likewise.
* pthread_support.c (DARWIN_SUSPEND_GC_THREADS): Likewise.
* darwin_stop_world.c (DARWIN_QUERY_TASK_THREADS): Don't define
(and remove FIXME).
* darwin_stop_world.c (GC_use_threads_discovery): Add GC_API;
comment; remove FIXME.
* win32_threads.c (GC_NO_DLLMAIN): Rename to
GC_NO_THREADS_DISCOVERY.
* tests/test.c (GC_NO_DLLMAIN): Likewise.
* doc/README.macros (GC_NO_DLLMAIN): Likewise.
* doc/README.win32 (GC_NO_DLLMAIN): Likewise.
* doc/README.macros (GC_NO_THREADS_DISCOVERY): Update the comment.
* win32_threads.c (GC_win32_dll_threads): Define as macro to true
if GC_DISCOVER_TASK_THREADS (and not GC_NO_THREADS_DISCOVERY);
update the comment.
* win32_threads.c (GC_use_DllMain): Rename to
GC_use_threads_discovery; do not set GC_win32_dll_threads if
GC_DISCOVER_TASK_THREADS.
* win32_threads.c (GC_started_thread_while_stopped,
GC_lookup_thread_inner, UNPROTECT_THREAD, GC_lookup_pthread,
GC_thr_init, GC_pthread_create, DllMain): Rewrite some expressions
which use GC_win32_dll_threads to minimize the possibility of
an "unreachable code" compiler warning when GC_win32_dll_threads
is defined as a macro.
* win32_threads.c (GC_unregister_my_thread): Don't call
GC_delete_thread() if GC_win32_dll_threads and THREAD_LOCAL_ALLOC
(since can't happen); use "t" local variable only if not
GC_win32_dll_threads.
* doc/README.macros (GC_DISCOVER_TASK_THREADS): Document.
* include/gc.h (GC_use_DllMain): Rename to
GC_use_threads_discovery but keep old name as a macro definition.
* include/gc.h (GC_use_threads_discovery): Declare also for
Darwin; update the comment.
* tests/test.c (main): Call GC_use_threads_discovery for Darwin
(to test the mode if possible).
* darwin_stop_world.c (DARWIN_SUSPEND_GC_THREADS,
DARWIN_QUERY_TASK_THREADS): New macro recognized.
* darwin_stop_world.c (GC_query_task_threads): add STATIC;
initialize to false; define as macro if DARWIN_SUSPEND_GC_THREADS
or DARWIN_QUERY_TASK_THREADS; remove FIXME.
* darwin_stop_world.c (GC_use_threads_discovery): New function
(for setting GC_query_task_threads value).
* darwin_stop_world.c (GC_mach_handler_thread,
GC_use_mach_handler_thread, GC_mach_thread, GC_MAX_MACH_THREADS,
GC_mach_threads, GC_mach_threads_count, GC_suspend_thread_list,
GC_darwin_register_mach_handler_thread): Define only if not
DARWIN_SUSPEND_GC_THREADS.
* darwin_stop_world.c (GC_stop_world, GC_start_world): Exclude
the code for GC_query_task_threads case from compilation unless
DARWIN_SUSPEND_GC_THREADS.
* os_dep.c (GC_darwin_register_mach_handler_thread): Declared only
if Darwin threads and not DARWIN_SUSPEND_GC_THREADS.
* os_dep.c (GC_mprotect_thread): Call
GC_darwin_register_mach_handler_thread only if THREADS and not
DARWIN_SUSPEND_GC_THREADS.
* pthread_support.c (marker_mach_threads): Don't define if
DARWIN_SUSPEND_GC_THREADS.
* pthread_support.c (GC_mark_thread): Don't fill in
marker_mach_threads if DARWIN_SUSPEND_GC_THREADS.
* include/private/gc_locks.h (GC_need_to_lock): Always declare for
THREADS case.
* darwin_stop_world.c (GC_query_task_threads): Don't define to
false for DARWIN_DONT_PARSE_STACK case; unconditionally initialize
the variable to false (for now).
* darwin_stop_world.c (GC_push_all_stacks): Call task_threads()
only if not DARWIN_DONT_PARSE_STACK.
* darwin_stop_world.c (GC_stop_world, GC_start_world): Use the
approach based on task_threads() only if GC_query_task_threads
else use GC_threads table.
* darwin_stop_world.c (GC_mach_threads): Remove static qualifier.
* darwin_stop_world.c (GC_stop_init): Remove (as we do not need to
really clear GC_mach_threads[]).
* darwin_stop_world.c (GC_stop_world): Reset GC_mach_threads_count
(instead of calling GC_stop_init).
* include/private/pthread_support.h (GC_stop_init): Remove proto.
* pthread_support.c (GC_stop_init): Add proto (unless Darwin).
* pthread_support.c (GC_thr_init): Don't call GC_stop_init() if
GC_DARWIN_THREADS.
* darwin_stop_world.c (GC_stack_range_for): New static function
(move the code from GC_push_all_stacks).
* darwin_stop_world.c (GC_push_all_stacks): Call
GC_stack_range_for(); rename kern_return local variable to
kern_result.
* darwin_stop_world.c (GC_is_mach_marker): Change argument type
from mach_port_t to thread_act_t.
* pthread_support.c (GC_is_mach_marker): Likewise.
* darwin_stop_world.c (GC_push_all_stacks): Fix "my_task" local
variable initialization (always call current_task()).
* pthread_support.c (GC_thr_init, GC_register_my_thread_inner):
Don't set thread's stop_info.stack_ptr value for Darwin.
* include/private/darwin_stop_world.h (thread_stop_info): Update
the comment for stack_ptr.
* darwin_stop_world.c (GC_push_all_stacks): Rename "r", "me" local
variables to "kern_return" and "my_thread" ones, respectively;
call mach_port_deallocate() unconditionally.
* darwin_stop_world.c (GC_stop_world): Don't call mach_thread_self
if DEBUG_THREADS.
* darwin_stop_world.c (GC_mach_thread): Move from
darwin_stop_world.h.
* include/private/darwin_stop_world.h (GC_mach_thread): Remove.
* win32_threads.c (GC_start_world): Define "thread_id" local
variable only if GC_ASSERTIONS; decide whether to resume a thread
based on its "suspended" field value; assert that suspended thread
stack_base is non-zero and the thread is not our one.
* darwin_stop_world.c (GC_thread_resume): New inline function
(move code from GC_thread_resume).
* darwin_stop_world.c (GC_start_world): Check result of
task_threads(); call GC_thread_resume().
* os_dep.c (GC_malloc_heap_l, GC_is_malloc_heap_base): Define
only if not CYGWIN32.
* os_dep.c (GC_is_heap_base): Call GC_is_malloc_heap_base() only
if not CYGWIN32.
* darwin_stop_world.c (FindTopOfStack): Change return type to
ptr_t (from long); make GC_INNER; add GC_ prefix.
* darwin_stop_world.c (GC_push_all_stacks): Add thread_blocked
local variable (initialized from the corresponding GC_thread
field unless GC_query_task_threads); add assertion that our
thread is not blocked; prefix FindTopOfStack with GC_ and remove
no longer needed cast to ptr_t of the result; handle thread
blocked case (and remove FIXME); use GC_push_all_stack_sections
unless GC_query_task_threads (and remove FIXME).
* pthread_support.c (GC_FindTopOfStack): Declare (if needed).
* pthread_support.c (GC_do_blocking_inner): Call
GC_save_regs_in_stack (if needed) before acquiring the lock.
* win32_threads.c (GC_do_blocking_inner): Likewise.
* pthread_support.c (GC_do_blocking_inner): Set/clear topOfStack
field of GC_thread (Darwin only).
* include/private/pthread_support.h (GC_thread): Add topOfStack
field for Darwin (unless DARWIN_DONT_PARSE_STACK).
* finalize.c (GC_check_finalizer_nested): Change return type to
char pointer (instead of int pointer); use explicit cast for
GC_finalizer_nested assignment.
* pthread_support.c (GC_check_finalizer_nested): Likewise.
* win32_threads.c (GC_check_finalizer_nested): Likewise.
* finalize.c (GC_finalizer_nested): Change type to unsigned char.
* finalize.c (GC_notify_or_invoke_finalizers): Change type of
"pnested" local variable to char pointer.
* pthread_support.c (GC_do_blocking_inner,
GC_call_with_gc_active): Use explicit cast for "thread_blocked"
field assignment.
* win32_threads.c (GC_lookup_pthread): Use explicit cast for
"suspended" field assignment.
* win32_threads.c (GC_Thread_Rep): Use short type for
finalizer_skipped; use char type for finalizer_nested and flags
fields and reorder some fields (to minimize GC_Thread_Rep
structure size).
* include/private/pthread_support.h (GC_Thread_Rep): Likewise.
* win32_threads.c (GC_Thread_Rep): Use char type for suspended
field (instead of GC_bool).
* include/private/pthread_support.h (GC_Thread_Rep): Use char type
for thread_blocked field (instead of short).
* darwin_stop_world.c (GC_query_task_threads): New variable (or
macro).
* darwin_stop_world.c (GC_push_all_stacks): Use
GC_query_task_threads (to choose between algorithms based on
kernel task_threads and based on GC_threads table); update FIXME;
remove commented out GC_push_one statements.
* pthread_support.c (GC_thr_init, GC_do_blocking_inner,
GC_call_with_gc_active, GC_register_my_thread_inner): Initialize
stack_ptr field for all platforms.
* pthread_support.c (GC_call_with_gc_active): Initialize
saved_stack_ptr field for all platforms.
* include/private/darwin_stop_world.h (thread_stop_info): Add
stack_ptr field; change type of already_suspended from int to
GC_bool.
* darwin_stop_world.c (GC_MAX_MACH_THREADS): New macro.
* darwin_stop_world.c (GC_mach_threads, GC_stop_init): Use
GC_MAX_MACH_THREADS instead of THREAD_TABLE_SZ.
* darwin_stop_world.c (GC_mach_threads): Add FIXME.
* darwin_stop_world.c (GC_stop_init, GC_suspend_thread_list,
GC_stop_world): Use FALSE and TRUE for already_suspended field and
"changed", "found" variables.
* darwin_stop_world.c (GC_is_mach_marker): New prototype (only if
PARALLEL_MARK).
* darwin_stop_world.c (GC_suspend_thread_list): Change return type
to GC_bool; change type of "changed", "found" to GC_bool; make
"my_thread" as an argument (instead of acquiring/deallocating it
locally); do not add my_thread, GC_mach_handler_thread and marker
threads to GC_mach_threads table; check for overflow of
GC_mach_threads table; increase GC_mach_threads_count if "found"
is true and info.suspend_count is non-zero.
* darwin_stop_world.c (GC_suspend_thread_list, GC_start_world):
Adjust "thread" format specifiers for GC_printf(); search thread
in "old_list" starting from the previous found one.
* darwin_stop_world.c (GC_stop_world): Rename "changes" to
"changed" local variable; remove "result" variable; adjust
GC_printf debugging message.
* darwin_stop_world.c (GC_start_world): Do not check for
my_thread and GC_use_mach_handler_thread (since they are not added
to GC_mach_threads table); call thread_info() only if
DEBUG_THREADS or GC_ASSERTIONS.
* pthread_support.c (marker_mach_threads): New static variable (if
Darwin).
* pthread_support.c (GC_is_mach_marker): New function (if Darwin).
* pthread_support.c (GC_mark_thread): Fill in marker_mach_threads
table (if Darwin).
* alloc.c (GC_parallel): Define only if THREADS.
* misc.c (GC_get_parallel): Likewise.
* include/gc.h (GC_parallel, GC_get_parallel,
GC_get_suspend_signal, GC_allow_register_threads,
GC_register_my_thread, GC_unregister_my_thread): Define only if
GC_THREADS.
* include/gc.h (GC_get_heap_size): Fix a typo in a comment.
* configure.ac: Use `AC_C_INLINE'.
* include/private/gc_priv.h (GC_INLINE): Use "inline" keyword
(determined by configure AC_C_INLINE) if HAVE_CONFIG_H is defined.
* dyn_load.c (DL_ITERATE_PHDR_STRONG): New macro (define for
FreeBSD).
* dyn_load.c (GC_register_main_static_data): Move the definition
above GC_register_dynamic_libraries_dl_iterate_phdr one (FreeBSD
case); unconditionally return FALSE if DL_ITERATE_PHDR_STRONG.
* dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): Test
GC_register_main_static_data() result (instead of direct testing
of dl_iterate_phdr (to prevent a compiler warning).
* os_dep.c (CODE_OK): Test si_code also for the value of 2
(FreeBSD case; required for FreeBSD v7+).
* os_dep.c (CODE_OK): Properly use parentheses (HPUX case).
* include/private/gcconfig.h (DATASTART): Cast etext argument in
GC_FreeBSDGetDataStart() call; remove unnecessary "&" (FreeBSD
case).
* include/private/specific.h (quick_thread_id): Define thru
GC_approx_sp(); define as a macro.
* include/private/specific.h (getspecific): Use GC_INLINE instead
of __inline__ (to work around Sun CC which does not recognize
inline keyword surrounded with underscores).
* darwin_stop_world.c (FindTopOfStack): Simplify condition
expressions.
* darwin_stop_world.c (GC_push_all_stacks): Merge two variants
of this function (DARWIN_DONT_PARSE_STACK).
* darwin_stop_world.c (GC_push_all_stacks): Add a check for our
thread is found (same as in pthread_stop_world.c).
* darwin_stop_world.c (GC_push_all_stacks): Print the number of
scanned threads if verbose (same as in pthread_stop_world.c).
* darwin_stop_world.c (GC_push_all_stacks): Reset
thread_state_count value before every thread_get_state call;
refine the comment for thread_state_count.
* darwin_stop_world.c (GC_push_all_stacks): Ignore rsp, rip/eip,
rflags, cs, fs, gs, ss, ds, es, __pc registers; uncomment ebp
register pushing.
* darwin_stop_world.c (GC_push_all_stacks): Set outCount to
GC_MACH_THREAD_STATE_COUNT (instead of THREAD_STATE_MAX).
* darwin_stop_world.c (GC_push_all_stacks): Remove FIXME and WARN
for i386.
* doc/README.macros (DARWIN_DONT_PARSE_STACK): Fix a typo.
* darwin_stop_world.c (GC_use_mach_handler_thread): Change type
to GC_bool.
* darwin_stop_world.c (GC_suspend_thread_list, GC_start_world):
Simplify the expressions involving GC_use_mach_handler_thread.
* darwin_stop_world.c (GC_darwin_register_mach_handler_thread):
Initialize GC_use_mach_handler_thread to TRUE (instead of 1).
* include/gc_pthread_redirects.h (GC_pthread_sigmask, GC_dlopen,
pthread_sigmask, dlopen): Don't define for Win32 pthreads (and
don't include signal.h and dlfcn.h).
* dyn_load.c (GC_register_dynlib_callback): Add FIXME.
* include/private/gcconfig.h: Add support for FreeBSD on ppc64.
* os_dep.c (PROTECT, UNPROTECT): Correct VM_PROT_EXEC to
VM_PROT_EXECUTE.
* os_dep.c (os2_alloc): Don't set PAG_EXECUTE unless
pages_executable is on.
* os_dep.c (os2_alloc): Add FIXME (for recursion).
* os_dep.c (UNPROTECT): Abort with a more informative message if
pages_executable is on ("mprotect" case).
* os_dep.c (PROTECT, UNPROTECT): Set VM_PROT_EXEC if
pages_executable is on (Darwin case).
* pthread_support.c (GC_init_real_syms): Abort with an informative
message if libgc is linked after libpthread.
* dyn_load.c (GC_register_dynlib_callback): Adjust "start" pointer
for 64-bit targets.
* pthread_support.c (start_mark_threads): Expand PTHREAD_CREATE
macro.
* pthread_support.c (start_mark_threads): Call INIT_REAL_SYMS()
since REAL(pthread_create) is used.
* pthread_support.c (PTHREAD_CREATE): Remove unused.
* extra/threadlibs.c (main): Remove --wrap for "read" (since not
wrapped anymore).
* doc/README.linux (GC_USE_LD_WRAP): Likewise.
* os_dep.c (__wrap_read): Likewise.
* include/gc_pthread_redirects.h: Test GC_PTHREADS and GC_H at the
beginning of the file.
* include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE): New
macro (defined only for Linux and Solaris).
* include/gc_pthread_redirects.h (GC_pthread_cancel,
GC_pthread_exit): Declare new API function (only if
GC_PTHREAD_EXIT_ATTRIBUTE).
* include/gc_pthread_redirects.h (pthread_cancel, pthread_exit):
Redirect (if GC_PTHREAD_EXIT_ATTRIBUTE).
* include/private/pthread_support.h (DISABLED_GC): New macro.
* pthread_support.c (pthread_cancel, pthread_exit): Restore
original definition or declare "real" function (if needed and
GC_PTHREAD_EXIT_ATTRIBUTE).
* pthread_support.c (GC_pthread_cancel_t, GC_pthread_exit_t):
Declare new types if needed.
* pthread_support.c (GC_pthread_cancel, GC_pthread_exit): New
function definition (only if GC_PTHREAD_EXIT_ATTRIBUTE).
* pthread_support.c (GC_init_real_syms): Initialize pointers to
the "real" pthread_cancel and pthread_exit (only if
GC_PTHREAD_EXIT_ATTRIBUTE).
* pthread_support.c (GC_unregister_my_thread): Enable collections
if DISABLED_GC was set (only if GC_PTHREAD_EXIT_ATTRIBUTE).
* pthread_support.c (pthread_cancel, pthread_exit): New wrapped
function definition (only if GC_PTHREAD_EXIT_ATTRIBUTE defined).
* pthread_support.c (GC_start_routine): Refine the comment.
* extra/threadlibs.c (main): Adjust --wrap (add "read",
"pthread_exit", "pthread_cancel" but remove "sleep").
* doc/README.linux (GC_USE_LD_WRAP): Likewise.
* include/gc.h (GC_MALLOC_STUBBORN): Remove trailing ';' in the
macro definition.
* include/gc.h (GC_reachable_here): Likewise.
* include/gc.h (GC_reachable_here): Prefix and postfix "volatile"
with double '_'.
* pthread_start.c: New file.
* CMakeLists.txt (SRC): Add pthread_start.c.
* Makefile.am (libgc_la_SOURCES): Likewise.
* Makefile.direct (CSRCS): Likewise.
* Makefile.direct (OBJS): Add pthread_start.obj.
* extra/gc.c: Add a comment; include pthread_start.c.
* pthread_support.c (start_info): Move the struct definition down
closer to its usage.
* pthread_support.c (GC_thread_exit_proc): Replace STATIC with
GC_INNER.
* pthread_support.c (GC_inner_start_routine): Move to the
definition to pthread_start.c; leave only the prototype; remove
STATIC.
* pthread_support.c (GC_start_rtn_prepare_thread): New function
(contains parts of the original GC_inner_start_routine).
* configure.ac (NO_EXECUTE_PERMISSION): Add comment.
* doc/README.macros (NO_EXECUTE_PERMISSION): Update the
documentation.
* include/gc.h (GC_set_pages_executable, GC_get_pages_executable):
New API function declaration.
* os_dep.c (OPT_PROT_EXEC): Remove (superseded by
pages_executable).
* os_dep.c (pages_executable): New static variable.
* os_dep.c (IGNORE_PAGES_EXECUTABLE): New macro (used by
GC_get_pages_executable only).
* os_dep.c (GC_unix_mmap_get_mem, GC_remap, PROTECT, UNPROTECT):
Replace OPT_PROT_EXEC with pages_executable.
* os_dep.c (GC_unix_mmap_get_mem, GC_remap, GC_win32_get_mem,
GC_wince_get_mem, UNPROTECT): Undefine IGNORE_PAGES_EXECUTABLE.
* os_dep.c (GC_win32_get_mem, GC_wince_get_mem, GC_remap, PROTECT,
UNPROTECT): Use PAGE_EXECUTE_... only if pages_executable is on.
* os_dep.c (GC_set_pages_executable, GC_get_pages_executable): New
API function definition.
* tests/test.c (check_heap_stats): Increase max_heap_sz by 20% for
64-bit CPUs (to prevent "Unexpected heap growth" failure on Win64,
at least).
* tests/test.c (check_heap_stats): Increase max_heap_sz by 25% for
32-bit CPUs (to prevent "Unexpected heap growth" failure).
* gc_dlopen.c (dlopen): Prototype REAL_DLFUNC if GC_USE_LD_WRAP.
* pthread_support.c (pthread_create, pthread_join, pthread_detach,
pthread_sigmask): Likewise.
* gc_dlopen.c (dlopen): Remove cast (redundant since the prototype
is added).
* gc_dlopen.c (GC_dlopen): Fix return type.
* pthread_support.c (GC_init_real_syms): Don't define
LIBPTHREAD_NAME, LIBPTHREAD_NAME_LEN, len, namebuf and
libpthread_name if RTLD_NEXT.
* gc_dlopen.c (disable_gc_for_dlopen): Update the comment.
* gc_dlopen.c (dlopen): Likewise.
* include/gc.h (GC_enable_incremental): Refine the comment.
* include/gc.h (DECLSPEC_NORETURN): Define macro as empty if
missing (only for Win32).
* include/gc.h (GC_ExitThread): Use DECLSPEC_NORETURN.
* win32_threads.c (GC_ExitThread): Likewise.
* include/gc.h (GC_endthreadex): Add a comment.
* include/cord.h: Fix typos.
* Makefile.am (EXTRA_DIST): Add "CMakeLists.txt" and
"tests/CMakeLists.txt".
* doc/doc.am (dist_pkgdata_DATA): Add "doc/README.cmake".
* mach_dep.c (NO_GETCONTEXT): Also define if AVR32.
* include/private/gcconfig.h (AVR32): New macro (also define the
supplementary macros for the target).
* include/private/thread_local_alloc (USE_COMPILER_TLS): Don't
define for AVR32.
* tests/leak_test.c (main): Explicitly define as returning int
(to prevent a spurious test failure on some Linux/alpha targets).
* tests/thread_leak_test.c (main): Likewise.
* tests/thread_leak_test.c: Initialize GC_find_leak in the main
thread (before GC_INIT) only.
* tests/leak_test.c (main): Use GC_set_find_leak() instead of
accessing GC_find_leak directly.
* tests/thread_leak_test.c (main): Likewise.
* include/gc.h (GC_find_leak, GC_finalize_on_demand,
GC_java_finalization, GC_dont_expand, GC_no_dls,
GC_dont_precollect): Simplify the comment (remove the information
about data races since the value is boolean).
* os_dep.c (GC_get_stack_base, GC_get_main_stack_base): New
Solaris-specific implementation (based on thr_stksegment).
* os_dep.c (stackbase_main_self, stackbase_main_ss_sp): New static
variable used by the Solaris-specific GC_get_stack_base().
* pthread_support.c (GC_mark_thread_local_free_lists,
GC_check_tls): Mark (and check) only for live threads (in case of
GC_destroy_thread_local() is called already but GC_delete_thread()
is not yet).
* win32_threads.c (GC_mark_thread_local_free_lists, GC_check_tls):
Likewise.
* NT_MAKEFILE: Remove the comment about DLL and Win32S.
* NT_STATIC_THREADS_MAKEFILE: Likewise.
* NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
* NT_MAKEFILE: Add ".SUFFIXES" directive (to handle gc_cpp.cc
properly on VS 2005+).
* NT_MAKEFILE: Update GC log file name in comments.
* NT_STATIC_THREADS_MAKEFILE: Likewise.
* NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
* NT_X64_THREADS_MAKEFILE: Likewise.
* doc/README.win32: Likewise.
* NT_MAKEFILE: Remove ":full" for "-debug" option (since no
longer supported by VS).
* NT_STATIC_THREADS_MAKEFILE: Likewise.
* NT_MAKEFILE: Commented out copying of gc_cpp.cc to gc_cpp.cpp.
* NT_STATIC_THREADS_MAKEFILE: Likewise.
* NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
* NT_X64_THREADS_MAKEFILE: Likewise.
* NT_STATIC_THREADS_MAKEFILE: Add -D PARALLEL_MARK option.
* NT_STATIC_THREADS_MAKEFILE: Increase stack size for gctest.exe.
* NT_X64_STATIC_THREADS_MAKEFILE: Remove "-stack" option (use the
default stack size limit).
* NT_X64_THREADS_MAKEFILE: Rename "gc64_dll.dll" to "gc64.dll".
* win32_threads.c (GC_get_next_stack): Always define (since it is
also used for Cygwin now).
* alloc.c (GC_maybe_gc): Move GC_notify_full_gc() call upper to
be just before GC_clear_marks() call.
* include/gc_mark.h (GC_start_callback_proc): Refine the comment.
* Makefile.am (check_LTLIBRARIES): Initialize to empty.
* tests/tests.am (TESTS, check_PROGRAMS): Add staticrootstest.
* tests/tests.am (staticrootstest_SOURCES, staticrootstest_LDADD,
libstaticrootslib_la_SOURCES, libstaticrootslib_la_LIBADD,
libstaticrootslib_la_LDFLAGS, libstaticrootslib_la_DEPENDENCIES):
Define.
* tests/tests.am (check_LTLIBRARIES): Add libstaticrootslib.la.
* tests/staticrootstest.c: New file.
* tests/staticrootslib.c: Likewise.
* dyn_load.c (GC_get_next_stack, GC_cond_add_roots): Define for
Cygwin as well as other win32 targets.
* dyn_load.c (GC_wnt): Define to constant true.
* dyn_load.c (GC_register_dynamic_libraries): Define for Cygwin as
well as other win32 targets.
* mark_rts.c (rt_hash, GC_roots_present, add_roots_to_index):
Don't define for Cygwin, as on other win32.
* mark_rts.c (GC_add_roots_inner, GC_clear_roots): Handle on
Cygwin as for other win32 targets.
* mark_rts.c (GC_rebuild_root_index): Don't declare on Cygwin, as
other win32.
* mark_rts.c (GC_remove_tmp_roots): Do declare on Cygwin as on
other win32.
* mark_rts.c (GC_remove_roots, GC_remove_roots_inner): Don't
declare on Cygwin as on other win32.
* mark_rts.c (GC_is_tmp_root): Do declare on Cygwin when
!NO_DEBUGGING, as on other win32 targets.
* mark_rts.c (GC_cond_register_dynamic_libraries): Handle on
Cygwin as for other win32 targets.
* os_dep.c (GC_setpagesize): Handle on Cygwin as on other win32.
* os_dep.c (GC_get_main_stack_base): Don't declare on Cygwin, as
other win32.
* os_dep.c (GC_sysinfo): Declare on Cygwin, as other win32.
* os_dep.c (GC_win32_get_mem): Declare on Cygwin, as on other
Win32, but call GC_unix_get_mem instead of GlobalAlloc.
* os_dep.c (GC_win32_free_heap): Declare on Cygwin (as empty).
* ptr_chck.c (GC_is_visible): Register dynamic libraries on Cygwin
as on other win32 platforms.
* win32_threads.c (GC_get_next_stack): Define on Cygwin as well as
for dynamic loading targets.
* include/private/gc_priv.h (GC_INNER): Don't try to use
visibility on Cygwin which does not support it.
* include/private/gc_priv.h (struct roots): Don't declare r_next
member on Cygwin as on other windows hosts.
* include/private/gc_priv.h (LOG_RT_SIZE, RT_SIZE): Don't define
likewise.
* include/private/gc_priv.h (struct _GC_arrays): Do declare
_heap_bases[] member and don't declare _root_index likewise.
* include/private/gc_priv.h (GC_heap_bases): Do define likewise.
* include/private/gc_priv.h (_SYSTEM_INFO): Do forward-declare
likewise.
* include/private/gc_priv.h (GC_sysinfo): Do declare extern
likewise.
* include/private/gcconfig.h (GC_win32_get_mem, GET_MEM): Do
prototype on Cygwin as other win32 platforms.
* os_dep.c (GC_get_main_stack_base): Use pthread_getattr_np() and
pthread_attr_getstack() instead of GC_get_stack_base() (and check
returned stackaddr for NULL); output a warning on failure.
* alloc.c (GC_start_call_back): Replace the definition type to
GC_start_callback_proc.
* alloc.c (GC_set_start_callback, GC_get_start_callback): New
setter/getter function.
* alloc.c (GC_try_to_collect_inner): Call GC_notify_full_gc()
unconditionally (because GC_try_to_collect_inner always does full
GC).
* include/gc_mark.h (GC_start_callback_proc): New type.
* include/gc_mark.h (GC_set_start_callback,
GC_get_start_callback): New API function declaration.
* doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Document.
* os_dep.c (GC_get_main_stack_base): Recognize
USE_GET_STACKBASE_FOR_MAIN (only if THREADS and LINUX_STACKBOTTOM)
and use GC_get_stack_base() in this case.
* os_dep.c (GC_get_stack_base): Add LOCK/UNLOCK() (since
GC_find_limit_with_bound() should be called with the lock held).
* backgraph.c (FOR_EACH_PRED): Fix a typo.
* alloc.c (GC_set_stop_func, GC_get_stop_func): Add
DCL_LOCK_STATE.
* finalize.c (GC_notify_or_invoke_finalizers): Likewise.
* gc_dlopen.c (disable_gc_for_dlopen): Likewise.
* gcj_mlc.c (maybe_finalize, GC_debug_gcj_malloc): Likewise.
* mark.c (GC_print_trace): Likewise.
* misc.c (GC_set_warn_proc, GC_get_warn_proc, GC_enable,
GC_disable, GC_new_free_list, GC_new_kind, GC_new_proc,
GC_set_oom_fn, GC_get_oom_fn, GC_set_finalizer_notifier,
GC_get_finalizer_notifier): Likewise.
* os_dep.c (GC_get_stack_base, GC_print_callers): Likewise.
* pthread_support.c (GC_is_thread_tsd_valid,
GC_wait_for_gc_completion, GC_init_parallel, GC_do_blocking_inner,
GC_call_with_gc_active, GC_unregister_my_thread, pthread_join,
pthread_detach, GC_register_my_thread, GC_inner_start_routine,
pthread_create): Likewise.
* reclaim.c (GC_print_all_errors): Likewise.
* win32_threads.c (GC_is_thread_tsd_valid, GC_register_my_thread,
GC_unregister_my_thread, GC_do_blocking_inner,
GC_call_with_gc_active, GC_lookup_pthread, GC_pthread_join,
GC_pthread_start_inner, GC_thread_exit_proc, GC_pthread_detach,
GC_init_parallel): Likewise.
* doc/README.darwin: Update.
* CMakeLists.txt: Adjust INCLUDE_DIRECTORIES and SRC (to make it
usable on Mac OS X).
* doc/README.cmake: Update.
* CMakeLists.txt: New file (adding CMake support).
* tests/CMakeLists.txt: Likewise.
* doc/README.cmake: Likewise.
* configure.ac (darwin): Don't define HAS_PPC_THREAD_STATE...
macros.
* include/private/gc_priv.h (THREAD_FLD): Recognize
__DARWIN_UNIX03 instead of HAS_PPC_THREAD_STATE... macros.
* pthread_support.c: Include <sys/param.h> and <sys/sysctl.h> for
OpenBSD.
* pthread_support.c (get_ncpu): Define also for Darwin, NetBSD and
OpenBSD.
* pthread_support.c (GC_thr_init): Use get_ncpu() for Darwin,
NetBSD and OpenBSD.
* mallocx.c (GC_generic_malloc_many, GC_malloc_many): Define even
if THREADS is undefined.
* include/gc.h (GC_malloc_many): Update the comment.
* include/gc_cpp.h (GC_PLACEMENT_DELETE): Define for Embarcadero
(formerly known as Borland) C++ compiler v6.21+.
* include/gc_cpp.h (GC_NO_OPERATOR_NEW_ARRAY): Define for ancient
VC++ compilers.
* win32_threads.c (GC_register_my_thread_inner,
GC_pthread_start_inner): Undo the previous commit changes for
the thread flags and DETACHED state (since the state is only
tested in GC_thread_exit_proc).
* include/gc.h (GC_unregister_my_thread): Fix a typo; update the
comment.
* pthread_support.c (GC_delete_thread): Allow to delete the main
thread (don't call GC_INTERNAL_FREE for it); update the comment.
* win32_threads.c (GC_delete_thread): Likewise.
* pthread_support.c (GC_unregister_my_thread): Add an assertion
for FINISHED flag is unset.
* tests/test.c (check_heap_stats): Test the main thread
unregistering (only if THREADS).
* win32_threads.c (GC_register_my_thread_inner): Set flags to
DETACHED (only if GC_PTHREADS).
* win32_threads.c (GC_unregister_my_thread): Add FIXME (for
GC_wait_for_gc_completion).
* win32_threads.c (GC_pthread_start_inner): Clear flags detached
state if needed; set pthread_id and flags while holding the lock.
* include/private/gc_priv.h (SIG_SUSPEND): Don't define for
OpenBSD and Darwin.
* include/gc.h: Recognize _M_X64 (as an alias for _AMD64_).
* test.c (main, WinMain): Consistently don't invoke
GC_enable_incremental() if MAKE_BACKGRAPH is defined, but
do invoke it even if parallel marking is enabled.
* tests/test.c (reverse_test): Comment out a check for MSWIN32
(when determining BIG value) assuming outdated win32S.
* tests/test.c (reverse_test): Rename to reverse_test_inner;
change the declaration (to be of GC_fn_type); call itself thru
GC_call_with_gc_active() if the argument is zero.
* tests/test.c (reverse_test): New function added calling
reverse_test_inner thru GC_do_blocking (to test GC_do_blocking and
GC_call_with_gc_active).
* doc/README.macros (IGNORE_DYNAMIC_LOADING, PLATFORM_ANDROID):
Document.
* dyn_load.c: Don't include <elf.h> if PLATFORM_ANDROID.
* dyn_load.c: Include bionic <linker.h> (instead of <link.h>) if
PLATFORM_ANDROID.
* include/private/gcconfig.h (LINUX): Define also if
PLATFORM_ANDROID (for the windows-based toolkit).
* include/private/gcconfig.h (SEARCH_FOR_DATA_START): Explicitly
define for Android/x86 platform.
* include/private/gcconfig.h (IGNORE_DYNAMIC_LOADING): Recognize
new macro (undefine DYNAMIC_LOADING in this case).
* include/private/gcconfig.h (CANCEL_SAFE): Don't define if
PLATFORM_ANDROID.
* include/private/gcconfig.h (IF_CANCEL): Fix definition for the
explicitly defined CANCEL_SAFE.
* allchblk.c (GC_allochblk_nth): Don't call GC_remove_protection()
if GC_DISABLE_INCREMENTAL.
* reclaim.c (GC_reclaim_generic): Likewise.
* checksums.c (GC_page_was_ever_dirty): Add prototype.
* include/private/gc_locks.h (GC_mark_lock_holder): Don't declare
unless PARALLEL_MARK.
* include/private/gc_priv.h (GC_dirty_maintained,
GC_page_was_dirty, GC_remove_protection, GC_dirty_init): Don't
declare if GC_DISABLE_INCREMENTAL.
* include/private/gc_priv.h (GC_print_finalization_stats): Don't
declare if SMALL_CONFIG.
* include/private/gcconfig.h (CHECKSUMS): Explicitly undefine if
GC_DISABLE_INCREMENTAL (since nothing to check).
* include/private/gcconfig.h (DEFAULT_VDB): Don't define if
GC_DISABLE_INCREMENTAL.
* os_dep.c (GC_dirty_maintained): Likewise.
* mark.c (GC_initiate_gc): Don't call GC_read_dirty() if
GC_DISABLE_INCREMENTAL.
* os_dep.c (GC_gww_page_was_ever_dirty, GC_page_was_ever_dirty):
Uncomment; define only if CHECKSUMS.
* darwin_stop_world.c (GC_push_all_stacks): Fix a bug (call
GC_push_all_stack() instead of GC_push_all_stack_frames()).
* include/private/gc_priv.h (GC_push_all_stack_frames,
GC_push_all_register_frames): Rename to
GC_push_all_stack_sections and GC_push_all_register_sections,
respectively.
* mark_rts.c (GC_push_all_stack_frames,
GC_push_all_register_frames, GC_push_all_stack_part_eager_frames,
GC_push_current_stack): Likewise.
* pthread_stop_world.c (GC_push_all_stacks): Likewise.
* win32_threads.c (GC_push_stack_for): Likewise.
* misc.c (GC_call_with_gc_active): Rename "frame" local variable
to "stacksect".
* pthread_support.c (GC_call_with_gc_active): Likewise.
* win32_threads.c (GC_call_with_gc_active): Likewise.
* pthread_support.c (GC_call_with_gc_active): Update FIXME for
Darwin.
* win32_threads.c (GC_Thread_Rep): Update the comment for
traced_stack_sect.
* darwin_stop_world.c (GC_push_all_stacks): Rename
activation_frame to traced_stack_sect.
* include/private/gc_priv.h (GC_push_all_stack_frames,
GC_push_all_register_frames): Likewise.
* include/private/pthread_support.h (GC_Thread_Rep): Likewise.
* mark_rts.c (GC_push_all_register_frames,
GC_push_all_stack_frames, GC_push_all_stack_part_eager_frames,
GC_push_current_stack): Likewise.
* pthread_stop_world.c (GC_push_all_stacks): Likewise.
* pthread_support.c (GC_call_with_gc_active): Likewise.
* win32_threads.c (GC_Thread_Rep, GC_call_with_gc_active,
GC_push_stack_for): Likewise.
* include/private/gc_priv.h (GC_activation_frame_s): Rename to
GC_traced_stack_sect_s.
* include/private/gc_priv.h (GC_activation_frame): Rename to
GC_traced_stack_sect.
* misc.c (GC_activation_frame, GC_call_with_gc_active): Likewise.
* doc/README.macros (UNICODE): Document.
* doc/README.macros (GC_READ_ENV_FILE): Document (new macro).
* include/private/gc_priv.h (GETENV): Recognize GC_READ_ENV_FILE;
declare and use GC_envfile_getenv().
* misc.c (GC_envfile_content, GC_envfile_length): New static
variable (only if GC_READ_ENV_FILE).
* misc.c (GC_ENVFILE_MAXLEN): New macro (used in GC_envfile_init).
* misc.c (GC_envfile_init, GC_envfile_getenv): New function (only
if GC_READ_ENV_FILE).
* misc.c (GC_init): Call GC_envfile_init() (before using GETENV)
if GC_READ_ENV_FILE.
* misc.c (GC_init): Move GC_setpagesize() and GC_init_win32()
calls to be just before GC_envfile_init() one (since the latter
uses GET_MEM).
* misc.c (GC_abort): use ExitProcess() (instead of DebugBreak) for
WinCE if NO_DEBUGGING; add a comment for DebugBreak() (for WinCE).
* mark_rts.c (GC_add_roots_inner): Remove redundant trailing '\n'
from the ABORT message.
* misc.c (GC_init): Likewise.
* os_dep.c (GC_get_main_stack_base, GC_register_data_segments):
Likewise.
* pthread_stop_world.c (GC_push_all_stacks): Likewise.
* pthread_support.c (GC_init_real_syms, start_mark_threads):
Likewise.
* win32_threads.c (GC_get_next_stack): Don't define for Cygwin
(since unused for now).
* dyn_load.c (HAVE_REGISTER_MAIN_STATIC_DATA): Don't define unless
GC_register_main_static_data() is defined.
* dyn_load.c (GC_register_dynamic_libraries): Define only if used
(if DYNAMIC_LOADING or PCR or Win32/CE).
* dyn_load.c (GC_register_main_static_data): Define the default
one only if DYNAMIC_LOADING.
* include/private/gc_priv.h (GC_register_dynamic_libraries):
Declare only if used (to prevent compiler warning).
* mark_rts.c (GC_approx_sp): Add a comment (for GCC).
== [7.2alpha4] 2009-12-01 ==
* configure.ac (AC_CONFIG_COMMANDS): Quote srcdir value.
* include/gc.h (GC_get_suspend_signal): New function declaration.
* misc.c (GC_get_suspend_signal): New API function (only if
THREADS).
* alloc.c (min_bytes_allocd): Multiply GC_free_space_divisor by
two if GC_incremental (instead of TRUE_INCREMENTAL).
* sparc_mach_dep.S (GC_push_regs): Remove the reference.
* os_dep.c (SIZE_T, PULONG_PTR): Remove.
* os_dep.c (ULONG_PTR): Replace with GC_ULONG_PTR (defined as GC
"word"); add the comment.
* os_dep.c (GetWriteWatch_type, detect_GetWriteWatch,
GC_gww_read_dirty): Prefix ULONG_PTR with "GC_".
* win32_threads.c (THREAD_TABLE_SZ): Change back to a power-of-two
const value (for speed).
* win32_threads.c (THREAD_TABLE_INDEX): New macro.
* win32_threads.c (GC_new_thread, GC_lookup_thread_inner,
GC_delete_gc_thread, GC_delete_thread, GC_lookup_pthread): Use
THREAD_TABLE_INDEX instead of THREAD_TABLE_SZ.
* win32_threads.c (PTHREAD_MAP_HASH): Rename to PTHREAD_MAP_INDEX.
* win32_threads.c (THREAD_TABLE_SZ): Make the const value prime.
* backgraph.c: Remove apostrophe char from "#error".
* doc/README.macros (GC_DISABLE_INCREMENTAL): Document.
* include/private/gcconfig.h (GC_DISABLE_INCREMENTAL): Recognize
new macro; implicitly define it if SMALL_CONFIG.
* alloc.c (GC_incremental, GC_timeout_stop_func): Check for
GC_DISABLE_INCREMENTAL instead of SMALL_CONFIG.
* include/private/gc_priv.h (GC_incremental, TRUE_INCREMENTAL,
GC_push_conditional): Likewise.
* mark.c (GC_push_next_marked_dirty, GC_push_selected,
GC_push_conditional, GC_block_was_dirty): Likewise.
* misc.c (GC_enable_incremental): Likewise.
* misc.c (GC_init): Likewise.
* dyn_load.c (WIN32_LEAN_AND_MEAN): Guard with ifndef.
* misc.c (WIN32_LEAN_AND_MEAN): Likewise.
* os_dep.c (WIN32_LEAN_AND_MEAN): Likewise.
* allchblk.c (GC_allochblk_nth): Fix a minor typo (don't/doesn't)
in a comment.
* backgraph.c: Likewise.
* dyn_load.c (GC_register_dynamic_libraries): Likewise.
* extra/threadlibs.c (main): Likewise.
* pthread_support.c (pthread_join): Likewise.
* tests/test.c (main): Likewise.
* mach_dep.c (GC_push_regs): Remove STATIC (just to catch
a duplicate symbol definition linker error).
* misc.c (GC_clear_stack_inner): Likewise.
* sparc_mach_dep.S (GC_push_regs): Comment out the reference.
* include/private/gc_priv.h (GC_write_disabled): New variable
declaration (only if GC_ASSERTIONS and Win32 threads).
* misc.c (GC_write): Add assertion for GC_write_disabled value is
not on (only if THREADS).
* win32_threads.c (GC_write_disabled): New variable (only if
GC_ASSERTIONS and not Cygwin).
* win32_threads.c (GC_stop_world): Set and clear GC_write_disabled
(while holding GC_write_cs).
* win32_threads.c (GC_please_stop): If DllMain-based thread
registration is not compiled in then define GC_please_stop as
a non-volatile variable for assertion only.
* win32_threads.c (GC_stop_world): Set and clear only if defined.
* win32_threads.c (GC_stop_world): Add the comment for GC_printf()
usage (while holding GC_write_cs).
* win32_threads.c (GC_delete_gc_thread): Likewise.
* os_dep.c (GC_remove_protection): Likewise.
* pthread_support.c (GC_inner_start_routine): Join 3 sequential
GC_printf() calls into a single one (for DEBUG_THREADS).
* include/private/gc_priv.h (GC_total_stacksize): New variable
declaration (only if THREADS).
* alloc.c (GC_total_stacksize): New variable (only if THREADS).
* alloc.c (min_bytes_allocd): Calculate stack_size using
GC_stackbottom only in the single-threaded case; otherwise use
GC_total_stacksize; print GC_total_stacksize value if
DEBUG_THREADS.
* darwin_stop_world.c (GC_push_all_stacks): Use "%p" printf type
specifier for lo/hi values (instead of "%lx").
* darwin_stop_world.c (GC_push_all_stacks): Use
GC_push_all_stack_frames() instead of GC_push_all_stack().
* darwin_stop_world.c (GC_push_all_stacks): Recalculate
GC_total_stacksize value.
* pthread_stop_world.c (GC_push_all_stacks): Likewise.
* win32_threads.c (GC_push_all_stacks): Likewise.
* win32_threads.c (GC_push_stack_for): Pass "me" argument; return
stack size; don't check for non-zero value of thread->stack_base.
* win32_threads.c (GC_push_all_stacks): Don't call
GC_push_stack_for() and don't check for "t->id == me" if
thread->stack_base is zero.
* dyn_load.c (GC_dump_meminfo): Prefix "%lx" printf type specifier
with "0x".
* os_dep.c (PROTECT): Likewise.
* win32_threads.c (GC_mark_thread_local_free_lists): Cast p->id to
int (to match printf type specifier).
* tests/test.c (check_heap_stats): Take into account the unmapped
memory size when checking for "Unexpected heap growth"; remove
FIXME.
* alloc.c: Revert last change.
* include/private/gcconfig.h (STACKBOTTOM): Add a presence check
for eCos/NOSYS.
* misc.c (GC_write): Comment out _Jv_diag_write() call (since no
longer defined in GCJ).
* os_dep.c (brk): Rename to ecos_gc_brk.
* alloc.c (min_bytes_allocd): Use GC_stackbottom value to compute
stack_size even if THREADS.
* doc/README.macros (DEBUG_THREADS): Document.
* pthread_support.c (DEBUG_THREADS): Remove the commented out
definition.
* win32_threads.c (DEBUG_WIN32_THREADS): Remove duplicate
definition.
* win32_threads.c: Include errno.h (except for WinCE).
* win32_threads.c (GC_win32_start_inner): Copy "start" and "param"
to local variables, and free "arg" parameter before "start"
invocation.
* win32_threads.c (GC_beginthreadex): Set errno to EAGAIN on error
(instead of calling SetLastError(ERROR_NOT_ENOUGH_MEMORY)).
* win32_threads.c (GC_beginthreadex): Return 0 on error (instead
of -1).
* darwin_stop_world.c (GC_darwin_register_mach_handler_thread):
Use GC_INNER for the function definition.
* include/private/darwin_stop_world.h
(GC_darwin_register_mach_handler_thread): Remove the prototype.
* os_dep.c (GC_darwin_register_mach_handler_thread): Use GC_INNER
for the function prototype.
* include/private/gc_priv.h (NDEBUG): Explicitly define if
NO_DEBUGGING and not GC_ASSERTIONS (before the standard headers
inclusion).
* include/private/gcconfig.h: Move DebugBreak() workaround (for
x86mingw32ce toolchain) to gc_priv.h (after windows.h inclusion).
* allchblk.c (GC_unmap_old, GC_merge_unmapped, GC_allochblk,
GC_freehblk): Use GC_INNER for the function definition.
* alloc.c (GC_never_stop_func, GC_should_collect,
GC_try_to_collect_inner, GC_collect_a_little_inner,
GC_set_fl_marks, GC_add_to_our_memory, GC_add_to_heap,
GC_expand_hp_inner, GC_collect_or_expand, GC_allocobj): Likewise.
* backgraph.c (GC_build_back_graph, GC_traverse_back_graph):
Likewise.
* blacklst.c (GC_default_print_heap_obj_proc, GC_bl_init,
GC_promote_black_lists, GC_unpromote_black_lists,
GC_add_to_black_list_normal, GC_add_to_black_list_stack,
GC_is_black_listed): Likewise.
* darwin_stop_world.c (GC_push_all_stacks, GC_push_all_stacks,
GC_stop_init, GC_stop_world, GC_start_world): Likewise.
* dbg_mlc.c (GC_has_other_debug_info, GC_store_back_pointer,
GC_marked_for_finalization, GC_generate_random_backtrace_no_gc,
GC_store_debug_info, GC_start_debugging,
GC_debug_generic_malloc_inner,
GC_debug_generic_malloc_inner_ignore_off_page,
GC_debug_malloc_uncollectable, GC_debug_free_inner): Likewise.
* dyn_load.c (GC_register_dynamic_libraries,
GC_register_main_static_data, GC_init_dyld): Likewise.
* finalize.c (GC_push_finalizer_structures, GC_finalize,
GC_notify_or_invoke_finalizers, GC_print_finalization_stats):
Likewise.
* gcj_mlc.c (GC_core_gcj_malloc): Likewise.
* headers.c (GC_find_header, GC_header_cache_miss,
GC_scratch_alloc, GC_init_headers, GC_install_header,
GC_install_counts, GC_remove_header, GC_remove_counts,
GC_next_used_block, GC_prev_block): Likewise.
* mach_dep.c (GC_with_callee_saves_pushed): Likewise.
* malloc.c (GC_collect_or_expand, GC_alloc_large,
GC_generic_malloc_inner, GC_generic_malloc_inner_ignore_off_page,
GC_core_malloc_atomic, GC_core_malloc, GC_free_inner): Likewise.
* mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
* mark.c (GC_collection_in_progress, GC_clear_hdr_marks,
GC_set_hdr_marks, GC_set_mark_bit, GC_clear_mark_bit,
GC_clear_marks, GC_initiate_gc, GC_mark_some,
GC_mark_stack_empty, GC_invalidate_mark_state,
GC_signal_mark_stack_overflow, GC_mark_from, GC_help_marker,
GC_mark_init, GC_push_all, GC_push_conditional,
GC_mark_and_push_stack, GC_push_all_eager, GC_push_all_stack):
Likewise.
* mark_rts.c (GC_is_static_root, GC_roots_present, GC_approx_sp,
GC_exclude_static_roots_inner, GC_push_all_register_frames,
GC_push_all_stack_frames, GC_cond_register_dynamic_libraries,
GC_push_roots): Likewise.
* misc.c (GC_extend_size_map, GC_clear_stack, GC_err_write):
Likewise.
* new_hblk.c (GC_build_fl, GC_new_hblk): Likewise.
* obj_map.c (GC_register_displacement_inner, GC_add_map_entry,
GC_initialize_offsets): Likewise.
* os_dep.c (GC_get_maps, GC_parse_map_entry, GC_text_mapping,
GC_init_linux_data_start, GC_init_netbsd_elf, GC_setpagesize,
GC_set_and_save_fault_handler, GC_setup_temporary_fault_handler,
GC_reset_fault_handler, GC_get_register_stack_base, GC_init_win32,
GC_add_current_malloc_heap, GC_is_heap_base, GC_unmap, GC_remap,
GC_unmap_gap, GC_push_all_stacks, GC_gww_dirty_init,
GC_dirty_init, GC_read_dirty, GC_page_was_dirty,
GC_page_was_ever_dirty, GC_remove_protection,
GC_write_fault_handler, GC_mprotect_stop, GC_mprotect_resume,
GC_save_callers, GC_print_callers): Likewise.
* pthread_stop_world.c (GC_push_all_stacks, GC_stop_world,
GC_start_world, GC_stop_init): Likewise.
* pthread_support.c (GC_mark_thread_local_free_lists,
GC_lookup_thread, GC_reset_finalizer_nested,
GC_check_finalizer_nested, GC_segment_is_thread_stack,
GC_greatest_stack_base_below, GC_thr_init, GC_init_parallel,
GC_do_blocking_inner, GC_lock, GC_acquire_mark_lock,
GC_release_mark_lock, GC_wait_for_reclaim, GC_notify_all_builder,
GC_wait_marker, GC_notify_all_marker): Likewise.
* reclaim.c (GC_print_all_errors, GC_block_empty,
GC_reclaim_generic, GC_start_reclaim, GC_continue_reclaim,
GC_reclaim_all): Likewise.
* thread_local_alloc.c (GC_init_thread_local,
GC_destroy_thread_local, GC_mark_thread_local_fls_for): Likewise.
* win32_threads.c (GC_reset_finalizer_nested,
GC_check_finalizer_nested, GC_do_blocking_inner, GC_stop_world,
GC_start_world, GC_push_all_stacks, GC_get_next_stack,
GC_acquire_mark_lock, GC_release_mark_lock, GC_wait_for_reclaim,
GC_notify_all_builder, GC_wait_marker, GC_notify_all_marker,
GC_thr_init, GC_init_parallel, GC_lock,
GC_mark_thread_local_free_lists): Likewise.
* alloc.c (GC_add_current_malloc_heap, GC_build_back_graph,
GC_traverse_back_graph): Use GC_INNER for the function prototype.
* darwin_stop_world.c (GC_mprotect_stop, GC_mprotect_resume):
Likewise.
* dbg_mlc.c (GC_default_print_heap_obj_proc): Likewise.
* dyn_load.c (GC_parse_map_entry, GC_get_maps,
GC_segment_is_thread_stack, GC_roots_present, GC_is_heap_base,
GC_get_next_stack): Likewise.
* finalize.c (GC_reset_finalizer_nested,
GC_check_finalizer_nested): Likewise.
* gcj_mlc.c (GC_start_debugging): Likewise.
* include/private/dbg_mlc.h (GC_save_callers, GC_print_callers,
GC_has_other_debug_info, GC_store_debug_info): Likewise.
* include/private/gc_hdrs.h (GC_header_cache_miss): Likewise.
* include/private/gc_locks.h (GC_lock): Likewise.
* include/private/gc_pmark.h (GC_signal_mark_stack_overflow,
GC_mark_from): Likewise.
* include/private/pthread_support.h (GC_lookup_thread,
GC_stop_init): Likewise.
* include/private/thread_local_alloc.h (GC_init_thread_local,
GC_destroy_thread_local, GC_mark_thread_local_fls_for): Likewise.
* malloc.c (GC_extend_size_map, GC_text_mapping): Likewise.
* mark.c (GC_page_was_ever_dirty): Likewise.
* mark_rts.c (GC_mark_thread_local_free_lists): Likewise.
* misc.c (GC_register_main_static_data, GC_init_win32,
GC_setpagesize, GC_init_linux_data_start,
GC_set_and_save_fault_handler, GC_init_dyld, GC_init_netbsd_elf,
GC_do_blocking_inner): Likewise.
* os_dep.c (GC_greatest_stack_base_below): Likewise.
* win32_threads.c (GC_write_fault_handler, GC_gww_dirty_init):
Likewise.
* include/private/gc_priv.h: Likewise.
* include/private/gc_priv.h (GC_INNER): Update the comment.
* doc/README.macros (GC_DLL): Update.
* alloc.c (GC_collection_in_progress): Move the prototype to
gc_priv.h.
* gc_dlopen.c (GC_collection_in_progress): Likewise.
* pthread_support.c (GC_collection_in_progress): Likewise.
* misc.c (GC_init_parallel): Likewise.
* pthread_support.c (GC_init_parallel): Likewise.
* win32_threads.c (GC_init_parallel): Likewise.
* darwin_stop_world.c (GC_thr_init): Likewise.
* misc.c (GC_thr_init): Likewise.
* pthread_stop_world.c (GC_thr_init): Likewise.
* pthread_support.c (GC_thr_init): Likewise.
* blacklst.c (GC_clear_bl, GC_copy_bl,
GC_number_stack_black_listed): Make STATIC.
* dbg_mlc.c (GC_print_obj, GC_make_closure,
GC_debug_invoke_finalizer): Likewise.
* malloc.c (GC_alloc_large_and_clear): Likewise.
* mark.c (GC_push_selected, GC_push_marked1, GC_push_marked2,
GC_push_marked4, GC_push_marked, GC_push_next_marked,
GC_push_next_marked_dirty, GC_push_next_marked_uncollectable):
Likewise.
* misc.c (GC_clear_stack_inner): Likewise.
* os_dep.c (GC_repeat_read, GC_default_push_other_roots): Likewise.
* darwin_stop_world.c (FindTopOfStack): Make static; define only
if not DARWIN_DONT_PARSE_STACK.
* dbg_mlc.c (GC_debug_free_inner): Define only if DBG_HDRS_ALL.
* dyn_load.c (GC_repeat_read): Remove unused prototype.
* include/private/gc_pmark.h (GC_find_start): Likewise.
* misc.c (GC_read, GC_register_finalizer_no_order): Likewise.
* dyn_load.c (GC_segment_is_thread_stack): Add prototype (only if
THREADS).
* dyn_load.c (GC_register_main_static_data): Define only if
DYNAMIC_LOADING.
* finalize.c (GC_enqueue_all_finalizers): Remove unnecessary tail
"return" statement.
* gc_dlopen.c (GC_SOLARIS_THREADS): Don't recognize (since implies
GC_PTHREADS).
* include/gc.h: Fix a typo.
* include/gc_inline.h (GC_ASSERT): Define (if not defined) since
the header is public.
* include/gc_inline.h (GC_generic_malloc_many): New public
function declaration.
* mallocx.c (GC_generic_malloc_many): Make public.
* include/private/gc_priv.h (GC_INNER): Use visibility attribute
(if available).
* include/private/gc_priv.h (GC_EXTERN): Define using GC_INNER.
* include/private/gc_priv.h: Include atomic_ops.h if THREADS and
MPROTECT_VDB.
* os_dep.c: Don't include atomic_ops.h
* win32_threads.c: Likewise.
* include/private/gc_priv.h (GC_push_selected, GC_push_regs,
GC_push_marked, GC_number_stack_black_listed,
GC_alloc_large_and_clear, GC_reclaim_or_delete_all,
GC_generic_malloc_many, GC_make_closure,
GC_debug_invoke_finalizer, GC_print_obj, GC_page_was_ever_dirty):
Remove the prototype.
* mark.c (GC_page_was_ever_dirty): Add prototype (only if
PROC_VDB).
* include/private/gc_priv.h (GC_push_next_marked_dirty,
GC_push_next_marked, GC_push_next_marked_uncollectable): Move
the prototype to mark.c.
* include/private/gc_priv.h (GC_is_static_root): Declare only if
not THREADS.
* include/private/gc_priv.h (GC_free_inner): Declare only if
THREADS.
* include/private/gc_priv.h (GC_debug_free_inner): Declare only if
THREADS and DBG_HDRS_ALL.
* include/private/gc_priv.h (GC_markers): Declare GC_markers only
if PARALLEL_MARK.
* include/private/gc_priv.h (GC_register_main_static_data): Move
the prototype to misc.c.
* mach_dep.c (GC_push_regs): Make STATIC; define only along with
HAVE_PUSH_REGS definition.
* mach_dep.c (GC_clear_stack_inner): Replace K&R-style function
definition with the ANSI C one.
* mark.c (GC_started_thread_while_stopped): Declared only if not
GNU C.
* win32_threads.c (GC_started_thread_while_stopped): Don't define
if GNU C.
* mark.c (GC_mark_from): Avoid unbalanced brackets in
#if-#else-#endif blocks.
* mark_rts.c (GC_is_static_root): Define only if not THREADS.
* os_dep.c (GC_get_stack_base): Make public (for OpenBSD).
* os_dep.c (GC_page_was_ever_dirty): Comment out the function
except for PROC_VDB.
* tests/test.c (main): Don't reference GC_print_obj,
GC_make_closure, GC_debug_invoke_finalizer,
GC_page_was_ever_dirty, GC_is_fresh (in GC_noop).
* thread_local_alloc.c: Don't include "gc_inline.h".
* win32_threads.c (GC_write_fault_handler): Declare only if
MPROTECT_VDB.
* allchblk.c (DEBUG): Remove macro (since unused).
* allchblk.c: Include private/gc_priv.h before other includes and
definitions.
* alloc.c: Likewise.
* gc_dlopen.c: Likewise.
* headers.c: Likewise.
* mallocx.c: Likewise.
* mark_rts.c: Likewise.
* new_hblk.c: Likewise.
* reclaim.c: Likewise.
* mark.c: Include private/gc_pmark.h before other includes.
* misc.c: Likewise.
* dyn_load.c (_GNU_SOURCE): Move the definition to gc_priv.h.
* pthread_support.c (_USING_POSIX4A_DRAFT10): Likewise.
* pthread_support.c (_POSIX4A_DRAFT10_SOURCE): Remove (since
already defined in gc_config_macros.h).
* dyn_load.c (GC_init_dyld): Remove parameter cast for
_dyld_register_func_for_add_image() and
_dyld_register_func_for_remove_image(); add the comment about
possible warnings; add FIXME for the deprecated
_dyld_bind_fully_image_containing_address().
* include/private/gc_priv.h: Include gc.h before the standard
headers inclusion.
* tests/test.c: Likewise.
* include/private/gcconfig.h (DebugBreak): Update the comment.
* typd_mlc.c (ED_INITIAL_SIZE): Remove ';'.
* configure.ac (openbsd): Define GC_OPENBSD_THREADS.
* configure.ac: Add AM_CONDITIONAL(OPENBSD_THREADS).
* configure.ac: Add sparc-openbsd case.
* doc/README.macros (GC_NETBSD_THREADS, GC_OPENBSD_THREADS):
Document.
* tests/test.c (main): Handle OpenBSD case.
* include/private/pthread_stop_world.h: Likewise.
* extra/threadlibs.c (main): Replace K&R-style function definition
with the ANSI C one.
* extra/threadlibs.c (main): Handle GC_OPENBSD_THREADS case.
* dyn_load.c (OPENBSD): Recognize (similar to NETBSD).
* include/gc_config_macros.h (GC_SOLARIS_THREADS): Recognize;
define it for OpenBSD.
* include/gc_pthread_redirects.h (GC_pthread_sigmask,
pthread_sigmask): Don't declare and redefine for OpenBSD.
* include/private/gcconfig.h: Handle OpenBSD (on arm, sh, i386,
amd64, powerpc).
* mach_dep.c (NO_GETCONTEXT): Likewise.
* include/private/pthread_stop_world.h (thread_stop_info): Don't
define last_stop_count field if OpenBSD.
* misc.c (GC_init_dyld): Add declaration (if NetBSD).
* misc.c (GC_init): Don't call GC_init_netbsd_elf() for OpenBSD.
* os_dep.c (GC_init_netbsd_elf): Don't define for OpenBSD.
* os_dep.c (old_segv_act, GC_jmp_buf_openbsd): New static variable
(only if OpenBSD).
* os_dep.c (GC_fault_handler_openbsd, GC_find_limit_openbsd,
GC_skip_hole_openbsd): New static function (only if OpenBSD).
* os_dep.c (GC_get_stack_base, GC_get_main_stack_base,
GC_register_data_segments): Define specially for OpenBSD case.
* os_dep.c (GC_fault_handler_lock): Initialize to
AO_TS_INITIALIZER (instead of 0).
* pthread_support.c (GC_allocate_lock): Likewise.
* pthread_stop_world.c (NSIG, GC_print_sig_mask,
GC_remove_allowed_signals, suspend_handler_mask, GC_stop_count,
GC_world_is_stopped, GC_retry_signals, SIG_THR_RESTART,
GC_suspend_ack_sem, GC_suspend_handler_inner, GC_suspend_handler,
GC_restart_handler): Don't define and use if OpenBSD.
* pthread_stop_world.c (GC_suspend_all, GC_stop_world,
GC_start_world): Handle OpenBSD case.
* pthread_stop_world.c (GC_stop_init): Define as empty if OpenBSD.
* pthread_support.c (pthread_sigmask): Don't undefine the macro and
don't define the wrapper function if OpenBSD.
* pthread_support.c (GC_thr_init): Handle OpenBSD case.
* dyn_load.c: Move the inclusion of private/gc_priv.h below
definition of a feature macro (_GNU_SOURCE).
* include/gc.h (REVEAL_POINTER): Remove redundant parentheses.
* include/gc.h (GC_HIDE_POINTER, GC_REVEAL_POINTER): New macros
(only if GC_I_HIDE_POINTERS).
* backgraph.c (GET_OH_BG_PTR): Prefix REVEAL_POINTER() with "GC_".
* dbg_mlc.c (GC_get_back_ptr_info): Likewise.
* finalize.c (GC_grow_table, GC_dump_finalization, GC_finalize,
GC_enqueue_all_finalizers): Likewise.
* backgraph.c (SET_OH_BG_PTR): Prefix HIDE_POINTER() with "GC_".
* finalize.c (GC_general_register_disappearing_link,
GC_unregister_disappearing_link, GC_register_finalizer_inner,
GC_finalize): Likewise.
* include/private/dbg_mlc.h (HIDE_BACK_PTR): Likewise.
* include/private/dbg_mlc.h (GC_I_HIDE_POINTERS): Define instead
of I_HIDE_POINTERS.
* include/private/gc_priv.h (GC_I_HIDE_POINTERS): Likewise.
* include/gc.h (_GC_H): Strip leading underscore.
* include/gc_backptr.h (_GC_H): Likewise.
* include/gc_gcj.h (_GC_H): Likewise.
* include/gc_mark.h (_GC_H): Likewise.
* include/gc_typed.h (_GC_TYPED_H, _GC_H): Likewise.
* include/javaxfc.h (_GC_H): Likewise.
* include/new_gc_alloc.h (__GC_SPECIALIZE): Likewise.
* include/private/dbg_mlc.h (_GC_H): Likewise.
* include/private/gc_priv.h (_GC_H): Likewise.
* gc_cpp.cc: Include "gc_cpp.h" instead of <gc_cpp.h>.
* include/private/gc_priv.h (GC_INNER): New macro (for GC-scope
variable definitions).
* include/private/gc_priv.h (GC_EXTERN): Update the comment.
* allchblk.c (GC_unmap_threshold): Define as GC_INNER.
* alloc.c (GC_incremental, GC_world_stopped, GC_n_heap_sects,
GC_n_memory, GC_fail_count): Likewise.
* blacklst.c (GC_black_list_spacing, GC_print_heap_obj): Likewise.
* gcj_mlc.c (GC_gcj_malloc_initialized, GC_gcjobjfreelist): Likewise.
* mach_dep.c (GC_save_regs_ret_val): Likewise.
* mark.c (GC_n_mark_procs, GC_obj_kinds, GC_n_kinds,
GC_mark_stack, GC_mark_stack_limit, GC_mark_stack_size,
GC_mark_stack_top, GC_mark_state, GC_mark_stack_too_small,
GC_mark_no, GC_markers): Likewise.
* mark_rts.c (GC_root_size, GC_push_typed_structures): Likewise.
* misc.c (GC_allocate_ml, GC_debugging_started, GC_check_heap,
GC_print_all_smashed, GC_print_back_height, GC_dump_regularly,
GC_backtraces, GC_force_unmap_on_gcollect,
GC_large_alloc_warn_interval, GC_is_initialized, GC_write_cs,
GC_current_warn_proc, GC_blocked_sp, GC_activation_frame): Likewise.
* os_dep.c (GC_page_size, GC_dont_query_stack_min,
GC_no_win32_dlls, GC_wnt, GC_sysinfo, GC_push_other_roots,
GC_dirty_maintained, GC_fault_handler_lock): Likewise.
* pthread_support.c (GC_allocate_ml, GC_lock_holder,
GC_need_to_lock, GC_thr_initialized, GC_threads,
GC_in_thread_creation, GC_collecting, GC_allocate_lock,
GC_mark_lock_holder): Likewise.
* reclaim.c (GC_bytes_found, GC_fl_builder_count, GC_have_errors):
Likewise.
* win32_threads.c (GC_allocate_ml, GC_lock_holder,
GC_need_to_lock, GC_mark_lock_holder, GC_collecting): Likewise.
* extra/gc.c (GC_INNER, GC_EXTERN): Define as STATIC.
* mach_dep.c (GC_with_callee_saves_pushed): Remove redundant {}.
* include/private/gc_priv.h (GC_bytes_allocd, GC_objfreelist,
GC_aobjfreelist): Replace GC_EXTERN to extern for SEPARATE_GLOBALS
case (since they are not defined inside GC at present).
* include/private/gc_priv.h (GC_objects_are_marked): Remove the
declaration (since made static).
* mark.c (GC_objects_are_marked): Define as STATIC.
* win32_threads.c (GC_thr_initialized, GC_in_thread_creation):
Likewise.
* mark.c (GC_N_KINDS_INITIAL_VALUE): New macro (defined and used
to initialize GC_n_kinds).
* win32_threads.c (start_mark_threads): Adjust the comment.
* alloc.c (GC_notify_full_gc): Use GC_INLINE for a tiny static
function.
* backgraph.c (pop_in_progress, GC_apply_to_each_object): Likewise.
* mark_rts.c (add_roots_to_index): Likewise.
* extra/gc.c: New file.
* Makefile.am (EXTRA_DIST): Add "extra/gc.c".
* misc.c (GC_log): Remove the declaration; move the definition (to
the place where it is used); make STATIC.
* misc.c (GC_init): Use GC_err_printf() instead of GC_log_printf()
to print open log failure.
* misc.c (GC_write): Don't abort on open log failure if the GC is
compiled with GC_PRINT_VERBOSE_STATS (useful for WinCE).
* include/private/gcconfig.h (USE_MMAP): Guard with ifndef.
* allchblk.c (GC_fail_count, GC_large_alloc_warn_interval): Move
the variable declaration to gc_priv.h.
* alloc.c (GC_bytes_found, GC_unmap_threshold,
GC_force_unmap_on_gcollect): Likewise.
* dyn_load.c (GC_no_win32_dlls, GC_wnt): Likewise.
* finalize.c (GC_fail_count): Likewise.
* include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
GC_collecting, GC_mark_lock_holder, GC_need_to_lock): Likewise.
* include/private/gc_pmark.h (GC_n_mark_procs, GC_mark_stack_size,
GC_mark_stack_limit, GC_mark_stack_top, GC_mark_stack,
GC_mark_stack_too_small, GC_mark_state): Likewise.
* include/private/pthread_support.h (GC_threads,
GC_thr_initialized, GC_in_thread_creation): Likewise.
* mallocx.c (GC_bytes_found): Likewise.
* mark_rts.c (GC_save_regs_ret_val, GC_world_stopped): Likewise.
* misc.c (GC_unmap_threshold): Likewise.
* os_dep.c (GC_unmap_threshold): Likewise.
* pthread_support.c (GC_markers): Likewise.
* thread_local_alloc.c (GC_gcjobjfreelist,
GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
* win32_threads.c (GC_fault_handler_lock, GC_write_cs,
GC_dont_query_stack_min, GC_markers, GC_wnt): Likewise.
* include/private/gc_priv.h (GC_EXTERN): New macro (used mostly as
a tag for now); defined after "gcconfig.h" inclusion.
* include/private/gc_priv.h: Use GC_EXTERN instead of "extern"
keyword for most global variables.
* alloc.c (GC_copyright): Add the comment about the symbol
visibility.
* finalize.c (GC_fo_entries): Likewise.
* include/private/gc_priv.h (GC_print_stats): Likewise.
* misc.c (GC_quiet): Likewise.
* mallocx.c (GC_bytes_allocd_tmp): Make the volatile variable
STATIC.
* pthread_support.c (GC_threads): Add explicit zero initializer
(to make the variable definition differ from the declaration).
* backgraph.c (GC_quiet): Remove the declaration (not needed
anymore since gc_priv.h is always included).
* checksums.c (GC_quiet): Likewise.
* gcj_mlc.c (GC_quiet): Likewise.
* headers.c (GC_hdr_cache_hits, GC_hdr_cache_misses): Add the
comment.
* include/private/gc_hdrs.h (GC_hdr_cache_hits,
GC_hdr_cache_misses): Likewise.
* mark.c (GC_first_nonempty): Make the volatile variable STATIC.
* pthread_stop_world.c (GC_stop_count, GC_world_is_stopped):
Likewise.
* win32_threads.c (GC_please_stop, GC_max_thread_index,
GC_mark_mutex_waitcnt): Likewise.
* pthread_support.c (GC_USE_LD_WRAP): Fix a typo (swapped 'L' and
'D') in the name.
* gc_dlopen.c (GC_MUST_RESTORE_REDEFINED_DLOPEN): Define if dlopen
redirection is turned off; turn it on later when dlopen real
symbol is no longer needed (according to the comment and the same
as in dyn_load.c).
* gc_dlopen.c (WRAP_FUNC, REAL_FUNC): Rename to WRAP_DLFUNC and
REAL_DLFUNC, respectively (to have unique names since the
definitions may differ from that of the similar ones in
pthread_support.c).
* mark.c (source): Undefine the macro when no longer needed.
* os_dep.c (handler): Rename the type to GC_fault_handler_t (to
have the unique name across the project).
* os_dep.c (STAT_BUF_SIZE, STAT_READ); Guard with ifndef; add the
comment.
* pthread_support.c (STAT_BUF_SIZE, STAT_READ): Likewise.
* os_dep.c (sbrk): Undo sbrk() redirection (for ECOS) when no
longer needed.
* pthread_stop_world.c (pthread_sigmask): Undefine before using
in GC_print_sig_mask() (only if DEBUG_THREADS); add the comment.
* win32_threads.c (dlopen, _beginthread): Don't undefine (since
neither redirected nor used here).
* win32_threads.c (GC_Thread_Rep): Rename "table_management" to
"tm" for short; remove "tm_" prefix.
* win32_threads.c (in_use, next): Don't define the macros; use
tm.in_use and tm.next fields, respectively (to ease debugging).
* win32_threads.c (HASH): Rename to PTHREAD_MAP_HASH (to have
unique name across the project).
* include/private/gc_priv.h (I_HIDE_POINTERS): Define before gc.h
inclusion.
* include/private/gc_pmark.h (I_HIDE_POINTERS): Define if gc.h is
not included yet.
* finalize.c (I_HIDE_POINTERS): Don't define.
* include/private/dbg_mlc.h (I_HIDE_POINTERS): Likewise.
* misc.c (I_HIDE_POINTERS): Likewise.
* include/private/dbg_mlc.h (HIDE_POINTER, REVEAL_POINTER,
GC_hidden_pointer): Don't define if HIDE_POINTER is undefined.
* include/private/gc_pmark.h: Remove the comment about gc_priv.h
inclusion order.
* dyn_load.c: Include gc_priv.h before using configuration
information (MACOS).
* dyn_load.c (GC_must_restore_redefined_dlopen): Rename to
GC_MUST_RESTORE_REDEFINED_DLOPEN.
* backgraph.c (SET_OH_BG_PTR): Place outermost parenthesis
properly.
* darwin_stop_world.c: Replace "if DEBUG_THREADS" with
"ifdef DEBUG_THREADS".
* pthread_stop_world.c: Likewise.
* pthread_support.c: Likewise.
* include/gc_inline.h: Guard with GC_INLINE_H.
* alloc.c (GC_copyright): Define as const.
* alloc.c (GC_collect_at_heapsize): Replace "static" with "STATIC"
(since the name starts with "GC_" prefix).
* dbg_mlc.c (GC_describe_type_fns): Likewise.
* dyn_load.c (GC_FirstDLOpenedLinkMap,
GC_register_dynlib_callback, GC_dyld_sections,
GC_dyld_name_for_hdr, GC_dyld_image_add, GC_dyld_image_remove):
Likewise.
* malloc.c (GC_libpthread_start, GC_libpthread_end,
GC_libld_start, GC_libld_end): Likewise.
* mark_rts.c (GC_remove_root_at_pos, GC_rebuild_root_index):
Likewise.
* os_dep.c (GC_gww_read_dirty, GC_gww_page_was_dirty,
GC_gww_page_was_ever_dirty, GC_mprotect_thread_notify,
GC_mprotect_thread_reply, GC_mprotect_thread, GC_darwin_sigbus,
GC_forward_exception): Likewise.
* pthread_support.c (GC_syms_initialized): Likewise.
* typd_mlc.c (GC_push_typed_structures_proc): Likewise.
* win32_threads.c (GC_win32_dll_threads,
GC_register_my_thread_inner, GC_lookup_pthread, GC_get_stack_min,
GC_waitForSingleObjectInfinite): Likewise.
* darwin_stop_world.c (GC_use_mach_handler_thread,
GC_use_mach_handler_thread, GC_mach_threads_count): Replace
"static" with "STATIC" and add zero initializer.
* os_dep.c (GC_task_self, GC_ports, GC_mprotect_state,
GC_sigbus_count): Likewise.
* headers.c (free_hdr): Replace "static" with GC_INLINE.
* misc.c (GC_tmp): Rename static variable to fwrite_gc_res.
* os_dep.c (memory): Rename static variable to ecos_gc_memory.
* os_dep.c (async_set_pht_entry_from_index): Make static (for
MPROTECT_VDB case).
* pthread_support.c (GC_real_pthread_create,
GC_real_pthread_sigmask, GC_real_pthread_join,
GC_real_pthread_detach, GC_init_real_syms): Use REAL_FUNC() macro
for static GC_real_XXX symbols.
* win32_threads.c (GC_may_be_in_stack): Remove "GC_" prefix.
* alloc.c (GC_finish_collection): Replace getenv() with GETENV().
* dyn_load.c (GC_init_dyld): Likewise.
* os_dep.c (GC_print_callers): Likewise.
* dyn_load.c (GC_dyld_name_for_hdr): Cast _dyld_get_image_name()
result (since it's always of "struct mach_header" type).
* dyn_load.c (GC_init_dyld): Cast GC_dyld_image_add and
GC_dyld_image_remove (to always have the first argument of
"struct mach_header" pointer type).
* configure.ac: Add threads support for OpenBSD case (threads may
not work correctly for it).
* acinclude.m4: Rename to m4/gc_set_version.m4.
* m4/libtool.m4: Delete the file.
* m4/lt~obsolete.m4: Likewise.
* m4/ltoptions.m4: Likewise.
* m4/ltsugar.m4: Likewise.
* m4/ltversion.m4: Likewise.
* include/private/gcconfig.h: Define DebugBreak() as _exit(-1) for
x86mingw32ce toolchain to workaround the incorrect DebugBreak()
declaration in winbase.h (the workaround would turn into a no-op
when DebugBreak() will be defined as a macro in the toolchain).
* include/private/gcconfig.h: Recognize __i386__ if WinCE (for
x86mingw32ce toolchain).
* include/private/gcconfig.h (NO_GETENV): Don't define for CeGCC
toolchain (or if already defined).
* include/private/gcconfig.h (NO_GETENV_WIN32): New macro (always
defined for WinCE or if NO_GETENV is defined).
* misc.c (GC_CreateLogFile): Use NO_GETENV_WIN32 macro instead of
NO_GETENV one.
* configure.ac: Add AC_CONFIG_MACRO_DIR([m4]).
* Makefile.am: Add "ACLOCAL_AMFLAGS = -I m4".
* libtool.m4: Remove.
* m4/libtool.m4: New file (generated).
* m4/lt~obsolete.m4: Likewise.
* m4/ltoptions.m4: Likewise.
* m4/ltsugar.m4: Likewise.
* m4/ltversion.m4: Likewise.
* include/gc.h (GC_UNDERSCORE_STDCALL): Recognize new macro;
prefix GC_CreateThread and GC_ExitThread with '_' if defined.
* doc/README.macros (GC_UNDERSCORE_STDCALL): Document.
* alloc.c (GC_collect_or_expand): Add "retry" argument; add the
comments; don't use "default" stop_func on a retry if
GC_dont_expand.
* alloc.c (GC_allocobj): Pass "retry" argument to
GC_collect_or_expand().
* malloc.c (GC_alloc_large): Likewise.
* include/private/gc_priv.h (GC_collect_or_expand): Move the
declaration to malloc.c; add "retry" argument.
* alloc.c (GC_start_call_back): Move the variable definition from
misc.c.
* include/private/gc_priv.h (GC_start_call_back): Remove the
declaration.
* alloc.c (GC_notify_full_gc): Remove unnecessary cast of 0.
* alloc.c (GC_try_to_collect_inner): Also call stop_func at the
beginning of the function.
* include/gc.h (GC_try_to_collect): Refine the comment about
stop_func.
* alloc.c (GC_default_stop_func, GC_try_to_collect_general,
GC_gcollect): Add the comment.
* alloc.c (GC_try_to_collect_general): Move the assertion on
stop_func != 0 to GC_try_to_collect().
* alloc.c (GC_try_to_collect_general): If stop_func == 0 then use
GC_default_stop_func instead (holding the lock).
* alloc.c (GC_gcollect): Pass 0 as stop_func instead of
GC_default_stop_func (to prevent data races).
* Makefile.direct: Move "define arguments" documentation to
doc/README.macros; add reference to doc/README.macros.
* Makefile.dj: Change the documentation reference to
doc/README.macros.
* README.QUICK: Likewise.
* configure.ac: Likewise.
* allchblk.c: Remove unnecessary "-D" from the comment.
* doc/README.macros: Likewise.
* README.environment: Likewise.
* include/gc.h: Likewise.
* include/gc_inline.h: Likewise.
* include/private/gcconfig.h: Likewise.
* README.QUICK: Fix a typo.
* misc.c (GC_CreateLogFile): Use FILE_ATTRIBUTE_NORMAL for
CreateFile(); don't immediately flush every write if very verbose.
* doc/README.win32: Replace ".exe.log" to ".gc.log".
* doc/README.win64: Likewise.
* doc/README.win64: Fix a typo.
* misc.c (GC_CreateLogFile): Strip executable file extension for
the log file; use ".gc.log" extension (instead of ".log").
* include/gc_config_macros.h: Avoid the redefinition of
GC_xxx_THREADS macros.
* alloc.c (GC_try_to_collect_general): Change the type of "result"
local variable to GC_bool.
* include/gc_config_macros.h: Use old behavior for FreeBSD and
NetBSD platform detection code (check that other GC_xxx_THREADS
are undefined); add FIXME.
* include/gc_config_macros.h: Rearrange the platform detection
code (GC_WIN32_PTHREADS implies GC_WIN32_THREADS; define
GC_THREADS first if GC_XXX_THREADS already set; define proper
GC_XXX_THREADS if GC_THREADS; define GC_PTHREADS in a single
place; define _REENTRANT if posix threads except for Win32).
* alloc.c (GC_try_to_collect_general): New function (move the code
from GC_try_to_collect, pass force_unmap argument).
* alloc.c (GC_try_to_collect, GC_gcollect): Call
GC_try_to_collect_general().
* alloc.c (GC_gcollect_and_unmap): New public function.
* include/gc.h (GC_gcollect_and_unmap): New function declaration.
* tests/test.c (window_proc): Call GC_gcollect_and_unmap() on
WM_HIBERNATE event (instead of GC_set_force_unmap_on_gcollect()
and GC_gcollect()).
* include/gc.h (GC_allow_register_threads, GC_register_my_thread,
GC_unregister_my_thread, GC_malloc_many): Refine the comment.
* include/gc.h (GC_malloc_many, GC_NEXT): Declare unconditionally
(that is, don't depend on GC_THREADS macro).
* include/gc.h: Don't check for __CYGWIN32__ and __CYGWIN__ along
with a check for GC_PTHREADS (since the former implies the
latter).
* include/gc.h (GC_SOLARIS_THREADS): Don't check for.
* include/gc.h (GC_MIN, GC_MAX): Don't define.
* mallocx.c (GC_malloc_many): Add comment to #endif.
* configure.ac: Drop the subdir-objects Automake option, since
it's incompatible with picking source files from libatomic_ops.
* allchblk.c (GC_fail_count, GC_large_alloc_warn_interval): Add
"extern" keyword to a global variable declaration (some compilers
require it).
* alloc.c (GC_bytes_found, GC_unmap_threshold,
GC_force_unmap_on_gcollect): Likewise.
* dyn_load.c (GC_no_win32_dlls, GC_wnt): Likewise.
* finalize.c (GC_fail_count): Likewise.
* include/private/gc_hdrs.h (GC_hdr_cache_hits,
GC_hdr_cache_misses): Likewise.
* mallocx.c (GC_bytes_found): Likewise.
* mark_rts.c (GC_save_regs_ret_val, GC_world_stopped): Likewise.
* misc.c (GC_unmap_threshold): Likewise.
* os_dep.c (GC_unmap_threshold, GC_old_allocator): Likewise.
* pthread_support.c (GC_markers): Likewise.
* thread_local_alloc.c (GC_gcjobjfreelist,
GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
* win32_threads.c (GC_fault_handler_lock, GC_write_cs,
GC_dont_query_stack_min, GC_markers, GC_wnt): Likewise.
* tests/huge_test.c: Define GC_IGNORE_WARN (if not defined) to
suppress misleading GC "Out of Memory!" warning printed on every
GC_MALLOC(LONG_MAX) call.
* tests/huge_test.c: Include "gc.h" instead of <gc.h>.
* tests/huge_test.c (main): Replace K&R-style function definition
with the ANSI C one.
* dyn_load.c (GC_register_dynamic_libraries): Always use
lpMaximumApplicationAddress value for WinCE (even for old
versions).
* os_dep.c (VER_PLATFORM_WIN32_CE): Define if not in winbase.h.
* os_dep.c (GC_dont_query_stack_min): New global variable (only if
WinCE and THREADS).
* os_dep.c (GC_setpagesize): Adjust lpMaximumApplicationAddress
for WinCE (prior to version 6) if not _WIN32_WCE_EMULATION; set
GC_dont_query_stack_min for older WinCE (prior to version 5).
* win32_threads.c (GC_dont_query_stack_min): Declare.
* win32_threads.c (GC_get_stack_min): Rename the macro to
GC_wince_evaluate_stack_min for WinCE; update the comment.
* win32_threads.c (GC_push_stack_for, GC_get_next_stack): Use
GC_wince_evaluate_stack_min() instead of GC_get_stack_min() for
WinCE and don't update thread's last_stack_min value (only if
GC_dont_query_stack_min).
* win32_threads.c (GC_push_stack_for): Skip assertion for WinCE if
GC_dont_query_stack_min (since the evaluated stack_min value may
be incorrect if the stack is bigger than 64 KiB).
* gc_dlopen.c (GC_dlopen): Add function redirector (only if
GC_USE_LD_WRAP).
* include/gc.h: Include "gc_pthread_redirects.h" even if
GC_USE_LD_WRAP or GC_NO_THREAD_REDIRECTS.
* include/gc_pthread_redirects.h (GC_PTHREAD_REDIRECTS_H): Don't
define and check for (since included only from gc.h).
* include/gc_pthread_redirects.h: Declare "GC_" symbols even if
GC_USE_LD_WRAP or GC_NO_THREAD_REDIRECTS.
* include/gc_pthread_redirects.h: Include signal.h only to get
sigset_t definition.
* Makefile.direct: Document GC_REGISTER_MEM_PRIVATE.
* mark_rts.c (GC_is_tmp_root): Define also for WinCE unless
NO_DEBUGGING (that is, replace _WIN32_WCE_EMULATION with MSWINCE).
* os_dep.c (GC_sysinfo): Remove explicit global variable
initialization to "{0}" (revert back the previous change) since it
might produce a warning.
* allchblk.c (GC_large_alloc_warn_interval): Move declaration from
gc_priv.h.
* allchblk.c (GC_large_alloc_warn_suppressed): Move definition
from misc.c; define as STATIC.
* include/private/gc_priv.h (GC_large_alloc_warn_interval,
GC_large_alloc_warn_suppressed): Remove declaration.
* alloc.c (GC_bytes_found): Add "defined in" comment.
* mallocx.c (GC_bytes_found): Likewise.
* misc.c (GC_unmap_threshold): Likewise.
* os_dep.c (GC_old_allocator): Likewise.
* pthread_support.c (GC_markers): Likewise.
* thread_local_alloc.c (GC_gcjobjfreelist,
GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
* win32_threads.c (GC_markers): Likewise.
* alloc.c (GC_start_time): Explicitly initialize to 0 or NULL (to
be distinctive from a variable declaration).
* backgraph.c (GC_max_height, GC_deepest_obj): Likewise.
* blacklst.c (GC_old_normal_bl, GC_incomplete_normal_bl,
GC_old_stack_bl, GC_incomplete_stack_bl): Likewise.
* checksums.c (GC_faulted, GC_n_dirty_errors,
GC_n_faulted_dirty_errors, GC_n_changed_errors, GC_n_clean,
GC_n_dirty, GC_bytes_in_used_blocks): Likewise.
* dbg_mlc.c (GC_smashed): Likewise.
* finalize.c (GC_old_dl_entries): Likewise.
* gcj_mlc.c (GC_gcj_kind, GC_gcj_debug_kind, GC_gcjobjfreelist,
GC_gcjdebugobjfreelist): Likewise.
* mach_dep.c (GC_save_regs_ret_val): Likewise.
* mark.c (GC_n_rescuing_pages, GC_mark_stack, GC_mark_stack_limit,
GC_mark_stack_top): Likewise.
* misc.c (GC_min_sp, GC_high_water, GC_bytes_allocd_at_reset):
Likewise.
* os_dep.c (GC_data_start, GC_page_size, GC_sysinfo,
GC_old_segv_handler, GC_old_bus_handler,
GC_old_bus_handler_used_si, GC_old_segv_handler_used_si,
GC_proc_buf, GC_proc_fd, GC_vd_base): Likewise.
* pthread_stop_world.c (GC_stop_count, GC_stopping_pid): Likewise.
* reclaim.c (GC_leaked): Likewise.
* typd_mlc.c (GC_explicit_kind, GC_array_kind, GC_ext_descriptors,
GC_typed_mark_proc_index, GC_array_mark_proc_index,
GC_eobjfreelist, GC_arobjfreelist): Likewise.
* win32_threads.c (GC_pthread_map_cache, GC_marker_cv,
GC_marker_Id): Likewise.
* dbg_mlc.c (GC_smashed, GC_n_smashed): Define as STATIC.
* gcj_mlc.c (GC_gcjdebugobjfreelist): Likewise.
* os_dep.c (GC_vd_base): Likewise.
* pthread_support.c (GC_mark_threads): Likewise.
* reclaim.c (GC_leaked): Likewise.
* typd_mlc.c (GC_bm_table): Likewise.
* mark_rts.c (GC_save_regs_ret_val): Change declaration type to
that of definition; add "defined in" comment.
* mark_rts.c (GC_push_current_stack): Remove unnecessary cast for
GC_save_regs_ret_val.
* misc.c (GC_check_heap, GC_print_all_smashed,
GC_start_call_back): Remove unnecessary cast (of 0).
* misc.c (GC_LARGE_ALLOC_WARN_INTERVAL): New tuning macro.
* misc.c (GC_large_alloc_warn_interval): Initialize to
GC_LARGE_ALLOC_WARN_INTERVAL value.
* misc.c (GC_tmp): Change to "static".
* os_dep.c (GC_mprotect_state): Define as static.
* pthread_support.c (dummy_thread_local): Prefix with "GC_".
* win32_threads.c (WinMain): Remove FIXME for WinCE.
* os_dep.c (PROTECT, UNPROTECT): Use distinct ABORT messages.
* configure.ac: Rewrite the tests for external or internal
libatomic_ops.
* configure.ac: In particular, drop the symbolic links. Add option
--with-libatomic-ops for forced selection.
* Makefile.am: Adjust the path of source files from libatomic_ops
to not use the links.
* Makefile.am (libgc_la_LIBADD): Add $(ATOMIC_OPS_LIBS). This will
be empty if we use the bundled AO sources.
* Makefile.am: Strip version suffix for libatomic_ops directory.
* build_atomic_ops.sh: Likewise.
* build_atomic_ops.sh.cygwin: Likewise.
* configure_atomic_ops.sh: Likewise.
* Makefile.direct: Remove AO_VERSION definition; strip version
suffix for libatomic_ops directory.
* NT_STATIC_THREADS_MAKEFILE: Likewise.
* NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
* NT_X64_THREADS_MAKEFILE: Likewise.
* gc.mak: Likewise.
* libatomic_ops: Rename from "libatomic_ops-1.2".
* alloc.c (GC_version): Add "const" keyword.
* alloc.c (GC_get_version): New public function.
* include/gc.h (GC_get_version): New function declaration; update
the comment for the GC version.
* include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
GC_collecting, GC_mark_lock_holder, GC_need_to_lock): Use "extern"
(for the global variable declaration) again.
* include/private/gc_pmark.h (GC_n_mark_procs, GC_mark_stack_size,
GC_mark_stack_limit, GC_mark_stack_top, GC_mark_stack,
GC_mark_stack_too_small, GC_mark_state): Likewise.
* include/private/gcconfig.h (GC_register_stackbottom): Likewise.
* include/private/pthread_support.h (GC_threads,
GC_thr_initialized, GC_in_thread_creation): Likewise.
* include/private/gc_priv.h: Likewise.
* real_malloc.c: Include private/config.h if HAVE_CONFIG_H.
* allchblk.c (GC_hblkfreelist): Define as STATIC.
* blacklst.c (GC_total_stack_black_listed): Likewise.
* include/private/gc_priv.h (GC_hblkfreelist, GC_stopped_mark,
GC_total_stack_black_listed, GC_push_stubborn_structures): Remove
declaration.
* mark_rts.c (GC_stopped_mark): Add declaration (only if
THREAD_LOCAL_ALLOC).
* allchblk.c (GC_fail_count): Move the declaration out of
GC_allochblk_nth(); remove "extern".
* alloc.c (IF_THREADS): Remove unused macro.
* alloc.c (GC_world_stopped): Define only if THREAD_LOCAL_ALLOC.
* alloc.c (GC_stopped_mark): Set GC_world_stopped value only if
THREAD_LOCAL_ALLOC.
* alloc.c (GC_bytes_found, GC_collection_in_progress,
GC_check_tls, GC_unmap_threshold, GC_force_unmap_on_gcollect):
Remove K&R-style "extern" for the declaration.
* dbg_mlc.c (GC_free_inner): Likewise.
* dyn_load.c (GC_repeat_read, GC_roots_present, GC_is_heap_base,
GC_get_next_stack, GC_no_win32_dlls, GC_wnt): Likewise.
* finalize.c (GC_fail_count): Likewise.
* include/private/gc_hdrs.h (GC_hdr_cache_hits,
GC_hdr_cache_misses): Likewise.
* include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
GC_lock, GC_collecting, GC_mark_lock_holder, GC_need_to_lock):
Likewise.
* include/private/gc_pmark.h (GC_mark_procs, GC_n_mark_procs,
GC_mark_stack_size, GC_mark_stack_limit, GC_mark_stack_top,
GC_mark_stack, GC_mark_stack_too_small, GC_mark_state): Likewise.
* include/private/gc_priv.h (GC_current_warn_proc, GC_obj_kinds,
GC_n_kinds, GC_fo_entries, GC_n_heap_sects, GC_n_memory,
GC_page_size, GC_sysinfo, GC_black_list_spacing,
GC_objects_are_marked, GC_incremental, GC_dirty_maintained,
GC_root_size, GC_debugging_started, GC_large_alloc_warn_interval,
GC_large_alloc_warn_suppressed, GC_blocked_sp,
GC_activation_frame, GC_push_other_roots,
GC_push_finalizer_structures, GC_push_thread_structures,
GC_push_typed_structures, GC_start_call_back, GC_is_initialized,
GC_check_heap, GC_print_all_smashed, GC_print_all_errors,
GC_print_heap_obj, GC_have_errors, GC_print_stats,
GC_dump_regularly, GC_backtraces, GC_print_back_height,
GC_debug_generic_malloc_inner,
GC_debug_generic_malloc_inner_ignore_off_page,
GC_fl_builder_count, GC_mark_no, GC_help_marker,
GC_setup_temporary_fault_handler, GC_reset_fault_handler): Likewise.
* include/private/gcconfig.h (GC_SysVGetDataStart,
GC_FreeBSDGetDataStart, GC_register_stackbottom,
GC_MacTemporaryNewPtr, GC_amiga_get_mem): Likewise.
* include/private/pthread_support.h (GC_threads,
GC_thr_initialized, GC_in_thread_creation): Likewise.
* malloc.c (GC_text_mapping): Likewise.
* mallocx.c (GC_bytes_found): Likewise.
* mark.c (GC_check_dirty, GC_started_thread_while_stopped): Likewise.
* mark_rts.c (GC_save_regs_ret_val): Likewise.
* misc.c (GC_clear_stack_inner, GC_init_parallel, GC_init_win32,
GC_setpagesize, GC_init_linux_data_start,
GC_set_and_save_fault_handler, GC_unmap_threshold): Likewise.
* os_dep.c (GC_unmap_threshold, GC_push_all_stacks,
GC_darwin_register_mach_handler_thread): Likewise.
* pthread_support.c (GC_markers, GC_collection_in_progress):
Likewise.
* tests/test.c (GC_amiga_free_all_mem): Likewise.
* thread_local_alloc.c (GC_gcjobjfreelist,
GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
* win32_threads.c (GC_write_fault_handler, GC_gww_dirty_init,
GC_fault_handler_lock, GC_write_cs, GC_markers): Likewise.
* misc.c (GC_read, GC_register_finalizer_no_order, GC_init_dyld):
Move the declaration out of GC_init(); remove "extern".
* os_dep.c (GC_abort): Add the comment; add workaround to suppress
compiler "unreachable code" warnings for ABORT callers (where
ABORT is followed by a dummy return statement).
* os_dep.c (GC_old_allocator): Move the declaration out of
GC_default_push_other_roots(); remove "extern".
* darwin_stop_world.c (GC_mprotect_stop, GC_mprotect_resume):
Move the declaration out of GC_stop_world() and GC_start_world()
(only if MPROTECT_VDB); remove "extern".
* win32_threads.c (GC_get_stack_min, GC_push_stack_for,
GC_get_next_stack): Recognize _WIN32_WCE_EMULATION macro (used for
WinCE emulation and for custom WinCE 6 devices); add the comment.
* win32_threads.c (GC_get_stack_min): Cast pointer to word instead
of DWORD.
* win32_threads.c (GC_get_next_stack): Don't use and maintain the
latest known stack_min value for WinCE (if GC_get_stack_min is
defined as a macro); update the comments.
* win32_threads.c (GC_wnt): Don't declare for WinCE.
* Makefile.direct: Document EMPTY_GETENV_RESULTS.
* gcj_mlc.c (GC_clear_stack): Remove declaration.
* malloc.c (GC_clear_stack): Likewise.
* mallocx.c (GC_clear_stack): Likewise.
* typd_mlc.c (GC_clear_stack): Likewise.
* gcj_mlc.c (GENERAL_MALLOC, GENERAL_MALLOC_IOP): Rename to
GENERAL_MALLOC_INNER and GENERAL_MALLOC_INNER_IOP, respectively;
remove "lb" unnecessary cast to word.
* include/private/gc_priv.h (GC_clear_stack): Add declaration.
* include/private/gc_priv.h (GENERAL_MALLOC, GENERAL_MALLOC_IOP):
Move common declaration from typd_mlc.c and malloc.c; remove
unnecessary result and "lb" parameter casts.
* include/private/thread_local_alloc.h: Guard against duplicate
header file inclusion.
* os_dep.c (USE_MUNMAP): Replace "-->" with an error directive for
the case when USE_MMAP is not defined.
* pthread_support.c (GC_is_thread_tsd_valid): New internal
function (only if GC_ASSERTIONS and THREAD_LOCAL_ALLOC); move the
code from thread-local GC_malloc(); add FIXME for the condition.
* win32_threads.c (GC_is_thread_tsd_valid): Likewise.
* thread_local_alloc.c (GC_gcjobjfreelist): Change the type (to
match that of its definition).
* thread_local_alloc.c (GC_destroy_thread_local): Add a cast for
GC_gcjobjfreelist.
* thread_local_alloc.c (GC_lookup_thread, GC_lookup_thread_inner):
Remove unused declaration; don't include pthread.h.
* thread_local_alloc.c (GC_is_thread_tsd_valid): New declaration
(only if GC_ASSERTIONS).
* thread_local_alloc.c (GC_malloc): Use GC_is_thread_tsd_valid()
instead of GC_lookup_thread().
* win32_threads.c (GC_lookup_thread_inner): Define as STATIC.
* win32_threads.c (UNPROTECT): Rename to UNPROTECT_THREAD (to have
id different from that in os_dep.c).
* allchblk.c (GC_enough_large_bytes_left): Replace "inline static"
with GC_INLINE.
* include/private/gc_priv.h (fixed_getenv): Likewise.
* alloc.c (GC_max, GC_min): Replace "static INLINE" with
GC_INLINE.
* mark_rts.c (rt_hash): Likewise.
* win32_threads.c (GC_get_max_thread_index): Likewise.
* include/private/gc_priv.h (INLINE): Prefix with "GC_"; include
"static"; define for Sun CC; define for VC++ (and other
compilers).
* pthread_support.c: Don't define __inline__ for non-GNU compilers
(not needed anymore).
* NT_THREADS_MAKEFILE: Remove file (since it duplicates gc.mak).
* Makefile.in: Remove reference to NT_THREADS_MAKEFILE.
* Makefile.am: Likewise.
* Makefile.dj: Likewise.
* Makefile.direct: Likewise.
* doc/README.win32: Add reference to gc.mak.
* NT_X64_THREADS_MAKEFILE: Likewise.
* Makefile.direct: Remove references to acinclude.m4, libtool.m4.
* autogen.sh: Update.
* Makefile.am: Don't add libtool.m4 to EXTRA_DIST.
* acinclude.m4: Fix underquoting of GC_SET_VERSION.
* README.QUICK: Update information for Makefile.
* Makefile.am: Do not distribute the substituted bdw-gc.pc.
* configure.ac: Add AM conditional analog to KEEP_BACK_PTRS.
* tests/tests.am: Use it here to conditionally enable tracetest
when possible.
* dyn_load.c (GC_wnt): Update the comment.
* dyn_load.c (GC_register_dynamic_libraries): Add the comment for
_WIN32_WCE_EMULATION; recognize GC_REGISTER_MEM_PRIVATE (new
macro); call GC_is_heap_base() only if check for Type succeeded.
* mark_rts.c (GC_is_tmp_root): Don't define unless NO_DEBUGGING;
update the comment.
* include/private/gc_priv.h (GC_is_tmp_root): Remove declaration.
* include/private/gcconfig.h (CANCEL_SAFE, IF_CANCEL): new macros.
* include/private/gc_priv.h (DISABLE_CANCEL, RESTORE_CANCEL,
ASSERT_CANCEL_DISABLED): New macros.
* alloc.c (GC_maybe_gc): Assert cancellation disabled.
(GC_collect_a_little_inner,GC_try_to_collect, GC_collect_or_expand):
Disable cancellation.
(GC_add_to_our_memory): Check for overflow.
* misc.c (GC_cancel_disable_count): declare.
(GC_init, GC_write): Disable cancellation.
(GC_init): Remove redundant GC_is_initialized test.
* os_dep.c (GC_repeat_read): Assert cancellation disabled.
(GC_get_stack_base): Disable cancellation.
* pthread_stop_world.c (GC_suspend_handler_inner): Disable
cancellation.
* pthread_support.c (GC_mark_thread): Permanently disable
cancellation.
(GC_wait_for_gc_completion, GC_wait_builder, GC_wait_marker):
Assert cancellation disabled.
(fork handling): Disable cancellation, fix comment.
(GC_pthread_create): Disable cancellation.
(GC_unregister_my_thread): Disable cancellation.
* Makefile.direct: Document NO_CANCEL_SAFE.
* Makefile: Remove outdated file (Makefile.direct should be used
instead).
* include/gc.h (GC_use_DllMain): Refine the comment.
* configure.ac: Add documentation to AC_DEFINE for GC_THREADS and
EMPTY_GETENV_RESULTS.
* configure.ac: Fix a typo.
* Makefile.am: Likewise.
* checksums.c (GC_checksum, GC_update_check_page): Remove
"register" keyword in local variable declarations (for the code
used only for debugging or which is not time-critical).
* dbg_mlc.c (GC_has_other_debug_info, GC_store_debug_info,
GC_store_debug_info_inner, GC_check_annotated_obj, GC_print_obj,
GC_print_smashed_obj, GC_debug_end_stubborn_change,
GC_debug_invoke_finalizer): Likewise.
* dyn_load.c (GC_register_dynamic_libraries): Likewise.
* mallocx.c (GC_realloc): Likewise.
* mark_rts.c (GC_print_static_roots, GC_is_static_root,
GC_clear_roots): Likewise.
* misc.c (GC_write): Likewise.
* os_dep.c (GC_print_callers): Likewise.
* dyn_load.c (GC_register_dynamic_libraries): Rename "i" local
variable to "j" for the nested loop (just not to hide the similar
variable in the outer one).
* mark_rts.c (GC_print_static_roots): Output an error message
using GC_err_printf() (instead of GC_printf()).
* configure.ac: Move include flag from ${INCLUDE} ...
* Makefile.am: ... to AM_CPPFLAGS and also add the build directory.
* configure.ac: Call AM_CONFIG_HEADER([include/private/config.h]).
* configure.ac: Add documentation to all AC_DEFINE either directly
or using AH_TEMPLATE.
* win32_threads.c (GC_waitForSingleObjectInfinite): New static
function (only if GC_WINMAIN_REDIRECT).
* win32_threads.c (WinMain): Call GC_waitForSingleObjectInfinite()
thru GC_do_blocking() instead of calling WaitForSingleObject()
directly.
* pthread_support.c (start_mark_threads): Refine printed message.
* win32_threads.c (GC_thr_init): Likewise.
* Makefile.direct (GC_WINMAIN_REDIRECT): Add the comment for.
* Makefile.direct (NO_GETENV): Update the comment.
* include/gc.h (GC_WINMAIN_WINCE_LPTSTR): Remove macro.
* include/gc.h (GC_WinMain): Remove declaration.
* include/gc.h (WinMain): Define (as GC_WinMain) if and only if
GC_WINMAIN_REDIRECT.
* tests/test.c (GC_COND_INIT): Define as GC_INIT() also in case of
WinCE target unless GC_WINMAIN_REDIRECT is defined.
* tests/test.c (WINMAIN_LPTSTR): New macro.
* tests/test.c (WinMain): Use WINMAIN_LPTSTR instead of LP[W]STR
and GC_WINMAIN_WINCE_LPTSTR.
* win32_threads.c (start_mark_threads): Add the comment for
MARK_THREAD_STACK_SIZE.
* win32_threads.c: Recognize new GC_WINMAIN_REDIRECT macro.
* win32_threads.c (WINMAIN_LPTSTR, WINMAIN_THREAD_STACK_SIZE): New
macro (only if GC_WINMAIN_REDIRECT).
* win32_threads.c: Undefine WinMain macro if GC_WINMAIN_REDIRECT.
* win32_threads.c (GC_WinMain): Add prototype (only if
GC_WINMAIN_REDIRECT).
* win32_threads.c (main_thread_args, WinMain): Rename
GC_WINMAIN_WINCE_LPTSTR to WINMAIN_LPTSTR.
* win32_threads.c (WinMain): Call GC_INIT() instead of GC_init();
use WINMAIN_THREAD_STACK_SIZE.
* win32_threads.c (WinMain): Call GC_deinit() and
DeleteCriticalSection() only if WinCE; add FIXME.
* os_dep.c (GC_get_main_stack_base): add assertion for mem_base
value returned by GC_get_stack_base().
* Makefile.direct (MUNMAP_THRESHOLD, GC_FORCE_UNMAP_ON_GCOLLECT):
Add the comment for.
* alloc.c (GC_unmap_threshold, GC_force_unmap_on_gcollect):
Declare external variable (only if USE_MUNMAP).
* alloc.c (GC_try_to_collect): Temporarily set GC_unmap_threshold
value to 1 if GC_force_unmap_on_gcollect and restore it before
unlocking (only if USE_MUNMAP).
* doc/README.environment (GC_FORCE_UNMAP_ON_GCOLLECT): Add
information for.
* include/gc.h (GC_set_force_unmap_on_gcollect,
GC_get_force_unmap_on_gcollect): New public function prototype.
* include/gc.h (GC_FORCE_UNMAP_ON_GCOLLECT): New macro is
recognized.
* misc.c (GC_FORCE_UNMAP_ON_GCOLLECT): Likewise.
* include/gc.h (GC_INIT_CONF_FORCE_UNMAP_ON_GCOLLECT): New
internal macro (used by GC_INIT only).
* misc.c (GC_force_unmap_on_gcollect): New global variable.
* misc.c (GC_init): Recognize new "GC_FORCE_UNMAP_ON_GCOLLECT"
environment variable (and set GC_force_unmap_on_gcollect).
* misc.c (GC_set_force_unmap_on_gcollect,
GC_get_force_unmap_on_gcollect): New public function.
* tests/test.c (window_proc): Call GC_set_force_unmap_on_gcollect
to force the mode on if WM_HIBERNATE; restore the mode after
GC_gcollect().
* Makefile.direct (LARGE_CONFIG): Update information.
* include/gc.h (GC_stop_func): Refine the comment.
* configure.ac: Use EMPTY_GETENV_RESULTS instead of NO_GETENV for
Win32 (workaround for Wine bug).
* allchblk.c (GC_freehblk): Adjust local variables indentation.
* mallocx.c (GC_generic_malloc_many): Likewise.
* typd_mlc.c (GC_malloc_explicitly_typed_ignore_off_page,
GC_calloc_explicitly_typed): Likewise.
* typd_mlc.c (GC_make_array_descriptor): Remove unnecessary
brackets.
* configure.ac: Replace GC_WIN32_THREADS with GC_THREADS.
* configure.ac: Process enable_parallel_mark option for Cygwin and
Win32; define THREAD_LOCAL_ALLOC for Win32.
* include/private/gc_priv.h: Define AO_ASSUME_WINDOWS98 if
PARALLEL_MARK (required for VC++ x86).
* dbg_mlc.c (GC_generate_random_backtrace): Call
GC_try_to_collect(GC_never_stop_func) instead of GC_gcollect();
if GC is disabled then print error message and return.
* include/gc.h (GC_try_to_collect): Refine the comment.
* include/private/gc_priv.h (GC_never_stop_func): Fix return type;
refine the comment.
* add_gc_prefix.c: Move the file to the new "extra" directory.
* AmigaOS.c: Likewise.
* gcname.c: Likewise.
* if_mach.c: Likewise.
* if_not_there.c: Likewise.
* MacOS.c: Likewise.
* msvc_dbg.c: Likewise.
* setjmp_t.c: Likewise.
* threadlibs.c: Likewise.
* EMX_MAKEFILE: Prepend setjmp_t.c with "extra" directory.
* Makefile: Prepend AmigaOS.c, MacOS.c, add_gc_prefix.c, gcname.c,
if_mach.c, if_not_there.c, msvc_dbg.c, setjmp_t.c, threadlibs.c
with "extra" directory.
* Makefile.am: Likewise.
* Makefile.direct: Likewise.
* Makefile.dj: Likewise.
* Makefile.in: Likewise.
* NT_MAKEFILE: Prepend msvc_dbg.obj with "extra" directory.
* NT_STATIC_THREADS_MAKEFILE: Likewise.
* NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
* NT_X64_THREADS_MAKEFILE: Likewise.
* NT_THREADS_MAKEFILE: Prepend msvc_dbg.c with "extra" directory.
* gc.mak: Likewise.
* PCR-Makefile: Prepend if_mach.c, if_not_there.c with "extra"
directory.
* SMakefile.amiga: Prepend AmigaOS.c, setjmp_t.c with "extra"
directory.
* doc/simple_example.html: Update for threadlibs.c.
* os_dep.c: Prepend included AmigaOS.c with "extra" directory.
* include/gc.h (GC_do_blocking, GC_call_with_gc_active): New
function prototype.
* include/private/gc_priv.h (STOP_WORLD): Replace a no-op (for the
single-threaded case) with an assertion check for the state to be
not a "do-blocking" one.
* include/private/gc_priv.h (blocking_data): Move the structure
definition from pthread_support.c; change "fn" return type to void
pointer.
* include/private/gc_priv.h (GC_activation_frame_s): New structure
type.
* include/private/gc_priv.h (GC_push_all_stack_frames): New
function declaration (only if THREADS).
* include/private/gc_priv.h (GC_world_stopped): Don't declare
unless THREADS.
* include/private/gc_priv.h (GC_blocked_sp,
GC_activation_frame_s): New declaration (only if not THREADS).
* include/private/gc_priv.h (GC_push_all_register_frames): New
function declaration (only for IA-64).
* include/private/gc_priv.h (NURSERY, GC_push_proc): Remove
obsolete (unused) symbols.
* include/private/gc_priv.h (GC_push_all_stack_partially_eager):
Remove declaration (since it is static now).
* mark_rts.c (GC_push_all_stack_partially_eager): Move from mark.c
(for code locality) and make STATIC.
* mark_rts.c (GC_push_all_register_frames): New function (only for
IA-64).
* mark_rts.c (GC_push_all_stack_frames): New function (only if
THREADS).
* mark_rts.c (GC_add_trace_entry): New function prototype (used by
GC_push_all_stack_partially_eager(), only if TRACE_BUF).
* mark_rts.c (GC_push_all_stack_part_eager_frames): New function.
* mar_rts.c (GC_save_regs_ret_val): Move the declaration out of a
function body (only for IA-64).
* mark_rts.c (GC_push_current_stack): Call
GC_push_all_stack_part_eager_frames() instead of
GC_push_all_stack_partially_eager().
* mark_rts.c (GC_push_current_stack): Call
GC_push_all_register_frames() instead of GC_push_all_eager() for
IA-64 backing store.
* misc.c (GC_do_blocking_inner): Declare function (if THREADS
only).
* misc.c (GC_blocked_sp, GC_blocked_register_sp,
GC_activation_frame): New global variables (only if not THREADS).
* misc.c (GC_call_with_gc_active, GC_do_blocking_inner): New API
function (only if not THREADS).
* misc.c (GC_do_blocking): Move the function from
pthread_support.c.
* include/private/pthread_support.h (GC_Thread_Rep): Add
"activation_frame" field.
* pthread_stop_world.c (GC_push_all_stacks): Call
GC_push_all_stack_frames() and GC_push_all_register_frames instead
of GC_push_all_stack() and/or GC_push_all_eager(); don't check for
STACK_GROWS_UP here.
* pthread_support.c (GC_do_blocking_inner): Remove "static"; store
"fn" result back to "client_data" field.
* pthread_support.c (GC_call_with_gc_active): New API function.
* win32_threads.c (GC_call_with_gc_active): Likewise.
* win32_threads.c (GC_Thread_Rep): Add "thread_blocked_sp" and
"activation_frame" fields.
* win32_threads.c (GC_new_thread): Add assertion checking for
thread_blocked_sp is NULL.
* win32_threads.c (GC_do_blocking_inner): New function.
* win32_threads.c (GC_stop_world): Don't suspend a thread if its
thread_blocked_sp is non-NULL.
* win32_threads.c (GC_push_stack_for): Use thread
"activation_frame" (if non-NULL); use "thread_blocked_sp" if
non-NULL (instead of calling GetThreadContext()); "UNPROTECT" the
thread before modifying its last_stack_min; call
GC_push_all_stack_frames() instead of GC_push_all_stack(); update
the comments.
* alloc.c (GC_default_stop_func): New static variable (initialized
to GC_never_stop_func).
* alloc.c (GC_set_stop_func, GC_get_stop_func): New function.
* alloc.c (GC_timeout_stop_func): Define as GC_default_stop_func
(instead of GC_never_stop_func) if SMALL_CONFIG (or NO_CLOCK),
else call GC_default_stop_func() before getting "current_time".
* alloc.c (GC_maybe_gc): Expand GC_gcollect_inner() macro (for
FIXME comment).
* alloc.c (GC_maybe_gc, GC_collect_a_little_inner): add FIXME for
replacing GC_never_stop_func with GC_default_stop_func (if
possible).
* alloc.c (GC_gcollect): Use GC_default_stop_func.
* alloc.c (GC_collect_or_expand): Use GC_default_stop_func
(instead of GC_never_stop_func) unless it is trigged due to out of
memory; don't increment GC_fail_count and don't output warning
(before trying to collect again) in case the collection has been
interrupted (by GC_default_stop_func) and the heap expansion has
failed too.
* include/gc.h (GC_set_stop_func, GC_get_stop_func): New function
prototypes.
* os_dep.c (GC_get_stack_base): Add FIXME; add assertion for
GC_get_writable_length() result.
* configure.ac: Don't use -lpthread -ldl for Cygwin.
* NT_THREADS_MAKEFILE: Make it back equal to gc.mak.
* include/private/gcconfig.h (GWW_VDB): Undefine if
USE_GLOBAL_ALLOC (since incompatible).
* os_dep.c (GetWriteWatch_alloc_flag): Define as 0 unless GWW_VDB
is defined.
* os_dep.c (GC_unmap_threshold): Declare (for use in
GC_init_win32) if USE_MUNMAP.
* os_dep.c (GC_init_win32): Turn off memory unmapping if
GlobalAlloc() is used.
* os_dep.c (GC_win32_get_mem): Define and use new
VIRTUAL_ALLOC_PAD macro; don't waste an extra memory page unless
MPROTECT_VDB is in use.
* Makefile: Replace "version.h" with "include/gc_version.h".
* include/gc_version.h: Likewise.
* alloc.c (GC_collect_or_expand): Output heap size in WARN()
(before returning FALSE) for convenience.
* allchblk.c (GC_allochblk_nth): Use GC_PRIdPTR in WARN() format
string.
* pthread_support.c (start_mark_threads, GC_thr_init): Likewise.
* win32_threads.c (GC_delete_thread): Likewise.
* include/private/gc_priv.h (GC_PRIdPTR): New macro.
* pthread_stop_world.c (GC_suspend_handler_inner): Remove
unnecessary cast for WARN argument.
* pthread_support.c (start_mark_threads): if pthread_create()
failed then don't try to create other marker threads and (after
printing a warning) adjust GC_markers and GC_parallel values; log
GC_markers value (possibly adjusted) after that.
* win32_threads.c (start_mark_threads): if pthread_create() is
failed then don't try to create other marker threads and (after
printing a warning) adjust GC_markers and GC_parallel values.
* win32_threads.c (mark_mutex_event, builder_cv, mark_cv): Move
the definition upper (to be visible in start_mark_threads()).
* win32_threads.c (start_mark_threads): if CreateThread() or
_beginthreadex() is failed then don't try to create other marker
threads and (after printing a warning) adjust GC_markers,
GC_parallel values, and destroy the event objects (either only
some for the uncreated threads if DONT_USE_SIGNALANDWAIT or all if
not a single thread is created).
* win32_threads.c (GC_thr_init): Log GC_markers value (possibly
adjusted) after start_mark_threads() call.
* Makefile.am: Back remove "GC_" prefix for PTHREADS,
DARWIN_THREADS, WIN32_THREADS (for configure.ac).
* include/private/gc_priv.h: Change include of config.h to
private/config.h.
* include/private/gc_pmark.h: Likewise.
* gc_cpp.cc: Likewise.
* tests/test.c: Likewise.
* tests/test_cpp.cc: Include private/config.h (if HAVE_CONFIG_H);
undefine GC_BUILD.
* finalize.c (GC_general_register_disappearing_link): Return
GC_SUCCESS, GC_DUPLICATE, GC_NO_MEMORY (instead of 0, 1 and 2,
respectively).
* include/gc.h (GC_NO_MEMORY): New macro (defined as 2).
* include/gc.h (GC_register_disappearing_link,
GC_general_register_disappearing_link): Update the comment.
* typd_mlc.c (GC_calloc_explicitly_typed): Use GC_NO_MEMORY macro.
* finalize.c (GC_general_register_disappearing_link,
GC_register_finalizer_inner): Recalculate the hash table index
after GC_oom_fn succeeded (since the table may grow while not
holding the lock) and check again that the entry is still not in
the table (free the unused entry otherwise unless DBG_HDRS_ALL).
* finalize.c (GC_register_finalizer_inner): Initialize "hhdr"
local variable (to prevent a compiler warning).
* finalize.c (GC_register_finalizer_inner): Don't modify the data
pointed by "ocd" and "ofn" in GC_register_finalizer_inner() failed
(due to out of memory).
* alloc.c (GC_set_fl_marks, GC_clear_fl_marks): Transform loop to
suppress compiler "variable might be uninitialized" warnings.
* Makefile.direct (DONT_USE_SIGNALANDWAIT): Add the comment for.
* win32_threads.c (DONT_USE_SIGNALANDWAIT): Always define for
WinCE.
* win32_threads.c (THREAD_HANDLE): Cast Id (of DWORD type) to
HANDLE thru word type (to avoid a compiler warning) for WinCE.
* win32_threads.c (GC_marker_cv, GC_marker_Id): New static array
(only if DONT_USE_SIGNALANDWAIT).
* win32_threads.c (start_mark_threads): Initialize GC_marker_Id
and GC_marker_cv for each helper thread (only if
DONT_USE_SIGNALANDWAIT).
* win32_threads.c (GC_mark_mutex_state): New static variable (only
if DONT_USE_SIGNALANDWAIT).
* win32_threads.c (GC_mark_mutex_waitcnt,
signalObjectAndWait_func): Don't define if DONT_USE_SIGNALANDWAIT.
* win32_threads.c (GC_acquire_mark_lock, GC_release_mark_lock):
Use InterlockedExchange() over GC_mark_mutex_state (instead of
AO_fetch_and_add()) if DONT_USE_SIGNALANDWAIT.
* win32_threads.c (GC_wait_marker, GC_notify_all_marker):
Implement wait/broadcast primitives using Win32 multiple events
(one for each marker thread) if DONT_USE_SIGNALANDWAIT (instead of
using Win32 SignalObjectAndWait).
* win32_threads.c (GC_thr_init): Don't declare hK32 local
variable, don't check for GC_wnt, and don't initialize
signalObjectAndWait_func if DONT_USE_SIGNALANDWAIT.
* alloc.c (GC_finish_collection): Call GC_print_finalization_stats
if GC_print_stats (after getting "done_time").
* finalize.c (GC_old_dl_entries): New static variable (only if not
SMALL_CONFIG).
* finalize.c (GC_finalize): Save current GC_dl_entries value (only
if not SMALL_CONFIG).
* finalize.c (GC_print_finalization_stats): Define if and only if
not SMALL_CONFIG; use GC_old_dl_entries value; use GC_log_printf()
instead of GC_printf(); use "%lu" (instead of "%u") print format
specifier; use unsigned long type for "ready" counter (for LP64
targets).
* misc.c (GC_dump): No longer call GC_print_finalization_stats()
here (since it is called from GC_finish_collection()).
* misc.c (STACKBASE): Remove unused macro undef (for NOSYS and
ECOS).
* alloc.c (GC_expand_hp): Replace GC_init_inner() call with
GC_init() one.
* malloc.c (GC_alloc_large, GC_generic_malloc_inner): Likewise.
* mallocx.c (GC_generic_malloc_many): Likewise.
* misc.c (GC_enable_incremental): Likewise.
* alloc.c (GC_expand_hp): Update the comment.
* mark.c (GC_obj_kinds): Likewise.
* win32_threads.c (GC_allow_register_threads): Likewise.
* private/gc_priv.h (GC_init_inner): Remove function declaration.
* misc.c (GC_init_inner): Replace with public GC_init().
* gcj_mlc.c (GC_gcj_fake_mark_proc): New static function.
* gcj_mlc.c (GC_init_gcj_malloc): If mp is 0 then supply
GC_gcj_fake_mark_proc (aborting with the appropriate message)
instead.
* os_dep.c (GC_wince_get_mem): If VirtualAlloc() returns NULL (due
to out of memory) then don't increment GC_n_heap_bases and don't
call VirtualAlloc() again (with MEM_COMMIT).
* os_dep.c (GC_remap): Abort with a more informatory message if
VirtualAlloc() fails due to out of memory; update FIXME.
* Makefile: Fix typo for msvc_dbg.c.
* Makefile.direct: Likewise.
* Makefile.am: Prefix PTHREADS, DARWIN_THREADS, WIN32_THREADS with
"GC_".
* Makefile.dj: Don't reference remove files (nursery.c,
gc_nursery.h, gc_copy_descr.h).
* NT_MAKEFILE: Don't define __STDC__ macro (no longer used).
* NT_STATIC_THREADS_MAKEFILE: Likewise.
* NT_THREADS_MAKEFILE: Likewise.
* NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
* NT_X64_THREADS_MAKEFILE: Likewise.
* gc.mak: Likewise.
* NT_MAKEFILE: Remove unnecessary -DGC_BUILD (since it is always
defined in the source files).
* NT_THREADS_MAKEFILE: Likewise.
* NT_X64_THREADS_MAKEFILE: Likewise.
* gc.mak: Likewise.
* NT_X64_THREADS_MAKEFILE: Fix typo for -DGC_NOT_DLL.
* NT_STATIC_THREADS_MAKEFILE: Replace GC_WIN32_THREADS with
GC_THREADS.
* NT_THREADS_MAKEFILE: Likewise.
* NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
* NT_X64_THREADS_MAKEFILE: Likewise.
* gc.mak: Likewise.
* NT_MAKEFILE: Define _CRT_SECURE_NO_DEPRECATE to suppress the
compiler warnings.
* NT_STATIC_THREADS_MAKEFILE: Likewise.
* NT_X64_STATIC_THREADS_MAKEFILE: Place -D_CRT_SECURE_NO_DEPRECATE
before "$*.C" (and "$*.CPP").
* NT_X64_THREADS_MAKEFILE: Likewise.
* doc/README.solaris2: Replace GC_SOLARIS_THREADS with GC_THREADS.
* doc/README.win32: Replace GC_WIN32_THREADS with GC_THREADS.
* doc/README.win64: Add info about mingw-w64; add note for VC++
warnings suppression.
* os_dep.c (GC_forward_exception): Fix logic in several places.
(OSX-specific)
* include/private/gc_priv.h (MAX_HEAP_SECTS): Guard with ifndef.
* Makefile.direct: Copy missing information for -DSHORT_DBG_HDRS
from Makefile.
* Makefile: Remove the information about "define arguments" (which
is incomplete and outdated compared to that in Makefile.direct);
add help reference to Makefile.direct.
* Makefile.dj: Likewise.
* alloc.c (world_stopped_total_time, world_stopped_total_divisor):
Replace "STATIC" with "static" in the definition (since the
symbols aren't prefixed with "GC_").
* win32_threads.c (marker_sp, marker_bsp, marker_last_stack_min,
start_mark_threads, mark_mutex, builder_cv, mark_cv,
mark_mutex_event, signalObjectAndWait_func, main_thread_start):
Likewise.
* pthread_support.c (GC_wait_builder): Define as STATIC.
* win32_threads.c (GC_wait_builder): Likewise.
* misc.c (GC_get_heap_size_inner, GC_get_free_bytes_inner): New
API function.
* include/gc_pmark.h (GC_get_heap_size_inner,
GC_get_free_bytes_inner): New function declaration.
* include/gc.h: Recognize __CEGCC__ (as a synonym for _WIN32_WCE).
* include/gc_config_macros.h: Likewise.
* include/gc.h (GC_MAXIMUM_HEAP_SIZE): Recognize new macro.
* include/gc.h (GC_INIT_CONF_MAXIMUM_HEAP_SIZE): New macro (for
internal use).
* include/gc_config_macros.h: Always include stddef.h if GCC.
* include/gc_config_macros.h (GC_API): Define for CeGCC in the
same way as for MinGW.
* include/gc_config_macros.h (GC_API): Group the definition for
all cases together (check for GC_DLL only once).
* include/gc_pthread_redirects.h: Group non-Darwin code together.
* tests/test.c: Recognize GC_PRINT_VERBOSE_STATS (only if GC_DLL).
* Makefile.direct (GC_PTHREADS_PARAMARK, GC_IGNORE_GCJ_INFO,
GC_PRINT_VERBOSE_STATS, GC_DONT_EXPAND, GC_INITIAL_HEAP_SIZE,
GC_FREE_SPACE_DIVISOR, GC_TIME_LIMIT, GC_FULL_FREQ): Add the
comment for.
* misc.c (GC_init_inner): Recognize GC_PRINT_VERBOSE_STATS (new
macro).
* dyn_load.c (GC_wnt): Change definition to TRUE for WinCE; add
FIXME and the comment for WinCE.
* gcj_mlc.c (GC_init_gcj_malloc): Recognize GC_IGNORE_GCJ_INFO
(new macro).
* include/gc.h (GC_HAVE_BUILTIN_BACKTRACE): Don't define for VC++
WinCE (since backtrace() is unimplemented).
* include/private/gc_priv.h (GC_n_heap_bases): Remove declaration
(since static).
* os_dep.c (GC_n_heap_bases): Define as STATIC; move the
definition to be above GC_is_heap_base().
* include/private/gcconfig.h: Don't define NOSYS for WinCE on ARM
(both for MinGW and CeGCC toolchains).
* include/private/gcconfig.h: Recognize __CEGCC__ and
__MINGW32CE__ (as synonyms for __WIN32_WCE).
* include/private/gcconfig.h: If SH4 then don't set config
parameters for SH.
* include/private/thread_local_alloc.h (GC_key_create): Don't
abort on failures, just return -1 in these cases (this also
prevents compilation error for targets where ABORT is defined
indirectly as an inline assembler sequence).
* mark.c (WRAP_MARK_SOME): Also define for WinCE; add FIXME for
the GCC-based cross-compiler.
* mark.c (ext_ex_regn, mark_ex_handler): Don't define unless
WRAP_MARK_SOME is defined; define also for WinCE case; don't
check for _WIN64 (since WRAP_MARK_SOME is undefined for it).
* mark.c (GC_mark_some): Use __try/__except also for WinCE; update
the comment.
* misc.c: Include signal.h after gc_pmark.h included; check for
MSWINCE instead of _WIN32_WCE.
* misc.c (GC_init_inner): Remove duplicate GC_setpagesize() call.
* misc.c: Don't include <crtdbg.h> for WinCE targets.
* misc.c (GC_write): Define _MAX_PATH if undefined (workaround for
CeGCC toolchain).
* misc.c (GC_write): Use OutputDebugStringW() instead of
_CrtDbgReport() for WinCE targets.
* os_dep.c (GC_least_described_address): Define as STATIC.
* os_dep.c (GC_register_data_segments): Fix code indentation.
* os_dep.c (GC_wince_get_mem): Initialize "result" local variable
(to prevent a compiler warning).
* os_dep.c (GC_dirty_init): Add comment for WinCE target.
* tests/test.c: Don't include winbase.h directly if GCC for WinCE,
include assert.h instead.
* tests/test.c (tiny_reverse_test): Define and use
TINY_REVERSE_UPPER_VALUE macro (4 if VERY_SMALL_CONFIG else 10);
useful for WinCE.
* win32_threads.c (GC_Thread_Rep): Don't declare "handle" field
for WinCE (since thread Id is used as a "real" thread handle).
* win32_threads.c (THREAD_HANDLE): New macro.
* win32_threads.c (GC_register_my_thread_inner): Don't recognize
DONT_IMPORT_GETCURTHREAD anymore; don't record thread handle on
WinCE.
* Makefile.direct (DONT_IMPORT_GETCURTHREAD): Remove comment for.
* win32_threads.c (UNPROTECT, GC_fault_handler_lock): Don't check
for MSWINCE.
* win32_threads.c (GC_delete_gc_thread, GC_delete_thread): Don't
close thread handle on WinCE (since it's a thread Id).
* win32_threads.c (GC_suspend): Don't check for MSWINCE in the
MPROTECT-related code (for the case if MPROTECT_VDB would be
implemented for WinCE).
* win32_threads.c (GC_suspend, GC_start_world, GC_push_stack_for):
Use THREAD_HANDLE(t) to obtain thread handle.
* win32_threads.c (GC_PTHREADS_PARAMARK): New macro recognized;
implicitly define GC_PTHREADS_PARAMARK if GC_PTHREADS; include
pthread.h; define NUMERIC_THREAD_ID(id) if undefined yet; replace
GC_PTHREADS with GC_PTHREADS_PARAMARK where appropriate (for the
parallel mark support).
* win32_threads.c (start_mark_threads): Use int type for "i" local
variable (instead of "unsigned") to prevent a compiler warning.
* win32_threads.c (start_mark_threads): Don't check CreateThread()
result for -1; call CloseHandle() for the handle created by
CreateThread() (on WinCE); don't use errno (since errno.h is
missing on some targets like WinCE) when printing warning on a
marker thread creation failure.
* win32_threads.c (signalObjectAndWait_func): Define for WinCE.
* win32_threads.c (GC_wait_marker): Remove unnecessary assertion
for non-zero signalObjectAndWait_func (to make the code compilable
for WinCE).
* win32_threads.c (GC_thr_init): Allow PARALLEL_MARK for WinCE;
use GC_sysinfo to get processors count if WinCE; don't check for
SignalObjectAndWait() if WinCE; replace GC_PTHREADS with
GC_PTHREADS_PARAMARK.
* win32_threads.c (GC_thr_init): Recognize GC_MIN_MARKERS new
macro (useful for testing parallel marking on WinCE).
* win32_threads.c (GC_win32_start, main_thread_start): Define as
STATIC.
* win32_threads.c: Don't define main_thread_args,
main_thread_start(), WinMain() for WinCE if GC_DLL.
* win32_threads.c (WINCE_MAIN_STACK_SIZE): Remove useless macro
(since the stack size parameter is ignored on WinCE).
* win32_threads.c (main_thread_start): Remove forward declaration;
place its definition before WinMain() one.
* win32_threads.c (WinMain): Abort if GC_CreateThread() or
WaitForSingleObject() failed (for the main thread).
* allchblk.c (MUNMAP_THRESHOLD): Move macro definition out of
a function.
* allchblk.c (GC_unmap_threshold): New global variable definition
(initialized to MUNMAP_THRESHOLD).
* allchblk.c (GC_unmap_old): Use GC_unmap_threshold instead of
MUNMAP_THRESHOLD; skip unmapping if GC_unmap_threshold is 0.
* doc/README.environment (GC_UNMAP_THRESHOLD): Add information.
* misc.c (GC_unmap_threshold): New variable declaration.
* misc.c (GC_init_inner): Recognize "GC_UNMAP_THRESHOLD"
environment variable to set GC_unmap_threshold value (only if
USE_MUNMAP).
* dbg_mlc.c (OFN_UNSET): New macro (to detect
GC_register_finalizer() failures).
* dbg_mlc.c (store_old): Add a check for register_finalizer()
failure caused by an out-of-memory event (leave *ofn and *ocd
unmodified in that case).
* dbg_mlc.c (GC_debug_register_finalizer,
GC_debug_register_finalizer_no_order,
GC_debug_register_finalizer_unreachable,
GC_debug_register_finalizer_ignore_self): Initialize my_old_fn
to OFN_UNSET; clear *ocd and *ofn for non-heap objects (the same
as in GC_register_finalizer_inner()).
* Makefile.direct (GC_DLL): Add the comment for.
* doc/README.macros: Fix a typo.
* doc/README.macros (_DLL, GC_DLL, GC_NOT_DLL): Update info.
* doc/README.macros (__STDC__): Remove info.
* dbg_mlc.c (GC_get_back_ptr_info, GC_generate_random_heap_address,
GC_generate_random_valid_address, GC_print_backtrace,
GC_generate_random_backtrace, GC_register_describe_type_fn): Add
GC_API and GC_CALL to function definition.
* malloc.c (GC_generic_malloc): Likewise.
* mallocx.c (GC_incr_bytes_allocd, GC_incr_bytes_freed): Likewise.
* mark.c (GC_mark_and_push): Likewise.
* misc.c (GC_new_free_list_inner, GC_new_free_list,
GC_new_kind_inner, GC_new_kind, GC_new_proc_inner, GC_new_proc):
Likewise.
* include/gc_backptr.h (GC_get_back_ptr_info,
GC_generate_random_heap_address, GC_generate_random_valid_address,
GC_generate_random_backtrace, GC_print_backtrace): Add GC_API and
GC_CALL to function prototype.
* include/gc_mark.h (GC_mark_and_push, GC_new_free_list,
GC_new_free_list_inner, GC_new_kind, GC_new_kind_inner,
GC_new_proc, GC_new_proc_inner, GC_generic_malloc,
GC_register_describe_type_fn): Likewise.
* include/new_gc_alloc.h (GC_incr_bytes_allocd, GC_incr_mem_freed,
GC_generic_malloc_words_small): Likewise.
* gc_cpp.cc: Include "config.h" (if HAVE_CONFIG_H defined).
* include/private/gc_pmark.h: Likewise.
* include/private/gc_priv.h: Likewise.
* tests/test.c: Likewise.
* gc_cpp.cc: Define GC_BUILD.
* include/private/gc_pmark.h: Likewise.
* include/private/gc_priv.h: Likewise.
* gc_dlopen.c (WRAP_FUNC, REAL_FUNC): New macro.
* gc_dlopen.c (dlopen): Add GC_API to the wrapper function
definition.
* pthread_support.c (GC_pthread_create, GC_pthread_sigmask,
GC_pthread_join, GC_pthread_detach, pthread_sigmask, pthread_join,
pthread_detach, pthread_create): Likewise.
* win32_threads.c (GC_pthread_join, GC_pthread_create,
GC_pthread_sigmask, GC_pthread_detach): Likewise.
* gc_dlopen.c (dlopen): Use WRAP_FUNC and REAL_FUNC macros.
* include/gc_backptr.h: Include "gc.h".
* include/gc_backptr.h: Use extern "C" for the exported functions.
* include/gc_mark.h: Likewise.
* include/gc_config_macros.h (GC_THREADS): Define the macro if any
GC_XXX_THREADS is defined.
* include/gc_config_macros.h (_PTHREADS, _POSIX4A_DRAFT10_SOURCE):
Move the definitions below the place where GC_NETBSD_THREADS and
GC_DGUX386_THREADS are defined.
* include/gc_config_macros.h (GC_DLL): Don't define (even if _DLL
is defined) for GCC.
* include/gc_config_macros.h (GC_API): Define for Cygwin (in the
same way as for VC++); define for GCC v4+ (other than already
recognized MinGW/Cygwin) as a "default" visibility attribute if
GC_DLL is defined.
* include/gc_config_macros.h (GC_ATTR_MALLOC, GC_ATTR_ALLOC_SIZE):
New macro.
* include/gc.h (GC_malloc, GC_malloc_atomic, GC_strdup,
GC_malloc_uncollectable, GC_malloc_stubborn, GC_memalign,
GC_malloc_atomic_uncollectable, GC_malloc_ignore_off_page,
GC_malloc_atomic_ignore_off_page, GC_debug_malloc,
GC_debug_malloc_atomic, GC_debug_strdup,
GC_debug_malloc_uncollectable, GC_debug_malloc_stubborn,
GC_debug_malloc_ignore_off_page,
GC_debug_malloc_atomic_ignore_off_page,
GC_debug_malloc_replacement): Add GC_ATTR_MALLOC attribute.
* include/gc_gcj.h (GC_gcj_malloc, GC_debug_gcj_malloc,
GC_gcj_malloc_ignore_off_page): Likewise.
* include/gc.h (GC_malloc, GC_malloc_atomic,
GC_malloc_uncollectable, GC_malloc_stubborn,
GC_malloc_atomic_uncollectable, GC_malloc_ignore_off_page,
GC_malloc_atomic_ignore_off_page, GC_debug_malloc,
GC_debug_malloc_atomic, GC_debug_malloc_uncollectable,
GC_debug_malloc_stubborn, GC_debug_malloc_ignore_off_page,
GC_debug_malloc_atomic_ignore_off_page,
GC_debug_malloc_replacement: Add GC_ATTR_ALLOC_SIZE attribute
(for the first argument).
* include/gc_gcj.h (GC_gcj_malloc, GC_debug_gcj_malloc,
GC_gcj_malloc_ignore_off_page): Likewise.
* include/gc.h (GC_memalign, GC_realloc, GC_debug_realloc,
GC_debug_realloc_replacement): Add GC_ATTR_ALLOC_SIZE attribute
(for the second argument).
* include/gc.h (GC_malloc, GC_malloc_atomic, GC_strdup,
GC_malloc_uncollectable, GC_malloc_stubborn, GC_memalign,
GC_malloc_atomic_uncollectable, GC_free, GC_base, GC_size,
GC_realloc, GC_expand_hp, GC_set_max_heap_size,
GC_exclude_static_roots, GC_add_roots, GC_remove_roots,
GC_register_displacement, GC_debug_register_displacement,
GC_try_to_collect, GC_malloc_ignore_off_page,
GC_malloc_atomic_ignore_off_page, GC_debug_malloc,
GC_debug_malloc_atomic, GC_debug_strdup,
GC_debug_malloc_uncollectable, GC_debug_malloc_stubborn,
GC_debug_malloc_ignore_off_page,
GC_debug_malloc_atomic_ignore_off_page, GC_debug_free,
GC_debug_realloc, GC_debug_malloc_replacement,
GC_debug_realloc_replacement, GC_finalization_proc,
GC_register_finalizer, GC_debug_register_finalizer,
GC_register_finalizer_ignore_self,
GC_debug_register_finalizer_ignore_self,
GC_register_finalizer_no_order,
GC_debug_register_finalizer_no_order,
GC_register_finalizer_unreachable,
GC_debug_register_finalizer_unreachable,
GC_register_disappearing_link,
GC_general_register_disappearing_link,
GC_unregister_disappearing_link, GC_noop1, GC_warn_proc,
GC_set_warn_proc, GC_ignore_warn_proc, GC_fn_type,
GC_call_with_alloc_lock, GC_stack_base_func,
GC_call_with_stack_base, GC_same_obj, GC_pre_incr, GC_post_incr,
GC_is_visible, GC_is_valid_displacement, GC_same_obj_print_proc,
GC_is_valid_displacement_print_proc, GC_is_visible_print_proc,
GC_malloc_many, GC_CreateThread, GC_beginthreadex,
GC_endthreadex): Comment out (or remove if single and meaningless)
function argument names (to avoid identifiers out of the name
space).
* include/gc_gcj.h (GC_init_gcj_malloc, GC_gcj_malloc,
GC_debug_gcj_malloc, GC_gcj_malloc_ignore_off_page): Likewise.
* include/gc.h (GC_try_to_collect): Update the comment.
* include/gc.h (GC_size, GC_register_my_thread): Add const
qualifier for the argument referent.
* misc.c (GC_size): Likewise.
* pthread_support.c (GC_register_my_thread_inner,
GC_register_my_thread): Likewise.
* win32_threads.c (GC_register_my_thread_inner,
GC_register_my_thread): Likewise.
* include/gc.h (GC_INIT_CONF_ROOTS): New macro for internal use
(define instead of GC_INIT() for Cygwin and AIX).
* include/gc.h (GC_DONT_EXPAND, GC_MAX_RETRIES,
GC_FREE_SPACE_DIVISOR, GC_FULL_FREQ, GC_TIME_LIMIT, GC_IGNORE_WARN,
GC_INITIAL_HEAP_SIZE): Recognize new macro.
* include/gc.h (GC_INIT_CONF_DONT_EXPAND, GC_INIT_CONF_MAX_RETRIES,
GC_INIT_CONF_FREE_SPACE_DIVISOR, GC_INIT_CONF_FULL_FREQ,
GC_INIT_CONF_TIME_LIMIT, GC_INIT_CONF_IGNORE_WARN,
GC_INIT_CONF_INITIAL_HEAP_SIZE): New macro for internal use.
* include/gc.h (GC_INIT): Use GC_INIT_CONF_XXX macros.
* include/gc_mark.h: Prefix GC_H with '_'.
* include/gc_mark.h (GC_least_plausible_heap_addr,
GC_greatest_plausible_heap_addr, GC_debug_header_size): Use GC_API
for the public variable declaration.
* include/new_gc_alloc.h (GC_objfreelist_ptr, GC_aobjfreelist_ptr,
GC_uobjfreelist_ptr, GC_auobjfreelist_ptr): Likewise.
* include/gc_pthread_redirects.h (GC_pthread_create,
GC_pthread_sigmask, GC_dlopen, GC_pthread_join, GC_pthread_detach):
Use GC_API for the wrapper prototype.
* include/gc_pthread_redirects.h (pthread_create, pthread_join,
pthread_detach, pthread_sigmask, dlopen): Undefine unconditionally
before redirecting.
* include/new_gc_alloc.h: Replace GC_incr_mem_freed() with
GC_incr_bytes_freed(); remove FIXME.
* include/private/gc_priv.h (GC_make_closure,
GC_debug_invoke_finalizer, GC_noop): Remove GC_API for the private
function.
* tests/test.c (GC_print_stats): Handle GC_DLL case regardless of
the target.
* finalize.c (GC_general_register_disappearing_link,
GC_register_finalizer_inner): Remove unnecessary "ifdef THREADS"
guard for LOCK/UNLOCK().
* finalize.c (GC_general_register_disappearing_link,
GC_register_finalizer_inner): Get GC_oom_fn value before releasing
the lock (to prevent data races).
* gcj_mlc.c (GC_gcj_malloc, GC_debug_gcj_malloc,
GC_gcj_malloc_ignore_off_page): Likewise.
* mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
* include/gc_inline.h (GC_FAST_MALLOC_GRANS): Use GC_get_oom_fn()
instead of GC_oom_fn (to prevent data races).
* malloc.c (GC_generic_malloc): Likewise.
* mallocx.c (GC_memalign): Likewise.
* pthread_support.c (pthread_create): Likewise.
* gcj_mlc.c (maybe_finalize): Acquire the lock before setting
last_finalized_no value to prevent data races.
* include/gc.h (GC_gc_no, GC_get_gc_no, GC_oom_fn, GC_set_oom_fn,
GC_set_find_leak, GC_set_finalize_on_demand,
GC_set_java_finalization, GC_set_finalizer_notifier,
GC_set_dont_expand, GC_set_full_freq, GC_set_non_gc_bytes,
GC_set_no_dls, GC_set_free_space_divisor, GC_set_max_retries,
GC_set_dont_precollect, GC_set_time_limit, GC_warn_proc): Refine
the comment.
* misc.c (GC_set_oom_fn): Likewise.
* include/gc.h (GC_general_register_disappearing_link): Refine the
comment (replace "soft" word with "weak").
* misc.c (GC_oom_fn, GC_get_gc_no, GC_get_parallel,
GC_set_finalizer_notifier, GC_set_find_leak): Add the comment.
* misc.c (GC_set_oom_fn, GC_get_oom_fn, GC_set_finalizer_notifier,
GC_get_finalizer_notifier): Use LOCK/UNLOCK to prevent data races.
* dbg_mlc.c: Guard include <errno.h> with ifndef MSWINCE; include
"private/dbg_mlc.h" before it.
* malloc.c: Likewise.
* dbg_mlc.c (GC_debug_strdup): Use memcpy() instead of strcpy()
for WinCE (since deprecated); evaluate strlen() only once; don't
set errno for WinCE.
* malloc.c (GC_strdup): Likewise.
* dyn_load.c (GC_wnt): Define as macro (FALSE) for WinCE.
* include/gc.h (GC_unregister_my_thread): Refine the comment.
* include/gc.h (GC_uintptr_t, GC_beginthreadex, GC_endthreadex):
Don't declare for WinCE.
* include/gc.h (GC_WINMAIN_WINCE_LPTSTR): New macro (WinCE only).
* include/gc.h (GC_WinMain): Remove GC_API.
* include/gc.h (GC_WinMain): Use GC_WINMAIN_WINCE_LPTSTR for
lpCmdLine.
* tests/test.c (GC_WinMain): Likewise.
* win32_threads.c (main_thread_args, GC_WinMain): Likewise.
* include/gc_config_macros.h (ptrdiff_t): Guard with
ifndef _PTRDIFF_T_DEFINED; define _PTRDIFF_T_DEFINED macro.
* include/private/gc_locks.h: Guard include "atomic_ops.h" with
ifdef GC_PTHREADS (and not GC_WIN32_THREADS).
* mark.c: Include "atomic_ops.h" if PARALLEL_MARK.
* thread_local_alloc.c: Include "atomic_ops.h" if GC_GCJ_SUPPORT.
* win32_threads.c: Include "atomic_ops.h" if MPROTECT_VDB.
* include/private/gc_locks.h: Use include "atomic_ops.h" instead
of include <atomic_ops.h>.
* include/private/gc_priv.h: Likewise.
* include/private/gc_locks.h (GC_allocate_ml, GC_need_to_lock):
Don't export (replace GC_API to "extern").
* win32_threads.c (GC_allocate_ml): Don't export.
* include/private/gc_priv.h (DebugBreak): Define as macro for
WinCE (if not UNDER_CE and DebugBreak is not defined yet).
* include/private/gc_priv.h (UNALIGNED): Rename to UNALIGNED_PTRS
(since "UNALIGNED" is defined in winnt.h of WinCE).
* mark.c (UNALIGNED): Likewise.
* include/private/gcconfig.h (ARM32): Recognize _M_ARM and _ARM_.
* include/private/gcconfig.h (ALIGNMENT): Check always defined.
* include/private/gcconfig.h: Allow GC_WIN32_THREADS for WinCE.
* include/private/thread_local_alloc.h: Define USE_WIN32_SPECIFIC
for WinCE (since __declspec(thread) is unsupported).
* include/private/thread_local_alloc.h (TLS_OUT_OF_INDEXES):
Define for WinCE (if undefined).
* malloc.c (GC_malloc): Remove outdated comment about disabling
signals.
* misc.c: Don't include <tchar.h> (since not used anymore and may
break TEXT() macro defined in winnt.h).
* misc.c (GC_init_inner): Don't use GetModuleHandle() and
InitializeCriticalSectionAndSpinCount() for WinCE.
* misc.c (GC_init_inner): Replace GetModuleHandleA() with
GetModuleHandle() (and use TEXT() macro controlled by UNICODE).
* misc.c (LOG_FILE): Remove unused macro; don't use _T() macro.
* misc.c (GC_CreateLogFile): New static function (Win32/WinCE
only); move the code from GC_write(); replace GETENV() with
GetEnvironmentVariable(); replace CreateFileA() with
CreateFile(); use TEXT() macro (for Unicode support); replace
strcat() with memcpy() (since deprecated in WinCE).
* misc.c (GC_write): Define as STATIC.
* win32_threads.c (GC_attached_thread): Likewise.
* misc.c (GC_write): Use GC_CreateLogFile().
* misc.c: Define vsnprintf macro as StringCchVPrintfA for WinCE.
* misc.c (GC_abort): Try to invoke MessageBoxA() dynamically
(Win32 only) if DONT_USE_USER32_DLL is defined.
* misc.c (GC_abort): Duplicate msg to GC log file (for Win32 and
WinCE).
* misc.c (GC_abort): Use a more user-friendly abort if
NO_DEBUGGING (Win32 only).
* os_dep.c: Include "atomic_ops.h" only if MPROTECT_VDB (and
THREADS).
* os_dep.c (detect_GetWriteWatch): Use TEXT() for GetModuleHandle
(for Unicode support); check GetModuleHandle() result.
* tests/test.c: Don't define assert for WinCE (since may be
redefined by "assert.h" included from libatomic_ops).
* tests/test.c (FAIL): Define as ABORT for all targets (except
for PCR).
* tests/test.c (n_tests): Don't use AO_t.
* tests/test.c (check_heap_stats): Don't cast n_tests.
* tests/test.c (inc_int_counter): New function (for n_tests atomic
incrementation).
* tests/test.c (run_one_test): Test GC_memalign() for all targets.
* tests/test.c (run_one_test): Avoid unbalanced brackets in
#if-#else-#endif blocks.
* tests/test.c (run_one_test): Replace AO_fetch_and_add1() and
private LOCK/UNLOCK with GC_call_with_alloc_lock(inc_int_counter).
* tests/test.c (check_heap_stats): Replace
"if (sizeof(char *) > 4)" with "#if CPP_WORDSZ == 64" to suppress
"unreachable code" compiler warning.
* tests/test.c (WinMain): Set cmd type to LPWSTR (for WinCE
"UNDER_CE" mode); else use LPSTR type (for Win32 and WinCE).
* tests/test.c (thr_window): Replace "L" string prefix with
TEXT().
* thread_local_alloc.c: Check THREADS is defined (to prevent other
compiler errors and warnings otherwise).
* tests/test.c (WinMain): Recognize GC_NO_DLLMAIN macro (for
GC_use_DllMain()).
* Makefile.direct (GC_NO_DLLMAIN, DONT_IMPORT_GETCURTHREAD): Add
the comments for.
* win32_threads.c (GC_register_my_thread_inner): Recognize
DONT_IMPORT_GETCURTHREAD macro.
* win32_threads.c: Recognize GC_NO_DLLMAIN macro (to exclude
DllMain support if needed).
* win32_threads.c (GC_NO_DLLMAIN): Define implicitly if DllMain
thread registration is unsupported for a given configuration.
* win32_threads.c (GC_use_DllMain): Update the comment; refine
ABORT message.
* win32_threads.c (GC_use_DllMain,
GC_started_thread_while_stopped, GC_register_my_thread_inner,
GC_lookup_thread_inner, GC_delete_gc_thread,
GC_allow_register_threads, GC_lookup_pthread,
GC_push_thread_structures, GC_stop_world, GC_push_all_stacks):
Check for GC_NO_DLLMAIN.
* win32_threads.c (GC_Thread_Rep.tm_in_use, GC_attached_thread,
DllMain): Don't define if GC_NO_DLLMAIN.
* win32_threads.c (GC_stop_world): Declare "i" and "max" local
variables only if not GC_NO_DLLMAIN (to suppress compiler
warning).
* win32_threads.c (GC_mark_thread, start_mark_threads): Use
CreateThread() instead of _beginthreadex() for WinCE.
* win32_threads.c (MARK_THREAD_STACK_SIZE, WINCE_MAIN_STACK_SIZE):
New macros defined (used by start_mark_threads(), WinMain()).
* win32_threads.c (GC_thr_init): Exclude parallel-specific code on
WinCE for now (since getenv(), GetProcessAffinityMask() and
SignalObjectAndWait() are missing on WinCE).
* win32_threads.c (GC_thr_init): replace GetModuleHandleA() with
GetModuleHandle(); replace CreateEventA() with CreateEvent(); use
TEXT() macro (for Unicode support).
* include/gc.h (GC_has_static_roots_func): New typedef (user filter
callback).
* include/gc.h (GC_register_has_static_roots_callback): Use
GC_has_static_roots_func type.
* dyn_load.c (GC_has_static_roots,
GC_register_has_static_roots_callback): Likewise.
* dyn_load.c (GC_has_static_roots,
GC_register_has_static_roots_callback): Define on all platforms.
* dyn_load.c (GC_register_dynlib_callback,
GC_register_dynamic_libraries, GC_init_dyld): Replace K&R-style
functions definition with the ANSI C one.
* dyn_load.c (GC_register_dynlib_callback): Use new local variable
"callback" (initialized from GC_has_static_roots) to minimize data
races.
* dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr,
GC_cond_add_roots): Define as STATIC.
* mark_rts.c (GC_remove_roots_inner): Likewise.
* dyn_load.c (GC_dyld_image_add): Don't call GC_add_roots() for
sections smaller than pointer size (just to avoid acquiring the
lock unnecessarily).
* dyn_load.c (GC_dyld_name_for_hdr): Define unconditionally (not
only for DARWIN_DEBUG).
* dyn_load.c (GC_dyld_image_add): Replace GC_add_roots() call with
LOCK + GC_add_roots_inner() + UNLOCK.
* dyn_load.c (GC_dyld_image_add): Call GC_has_static_roots() user
callback (if set) holding the lock; if it returns 0 then don't call
GC_add_roots_inner() for that region.
* dyn_load.c (GC_register_has_static_roots_callback): Put
"callback" value to GC_has_static_roots on all platforms.
* dyn_load.c (GC_has_static_roots): Update the comments.
* include/gc.h (GC_exclude_static_roots, GC_add_roots,
GC_remove_roots, GC_register_has_static_roots_callback): Likewise.
* include/private/gc_priv.h (struct roots): Likewise.
* include/private/gc_priv.h (GC_remove_roots_inner): Move prototype
to mark_rts.c and declare it as STATIC.
* include/private/gc_priv.h (GC_exclude_static_roots_inner): New
prototype.
* dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): Use
GC_exclude_static_roots_inner() instead of GC_exclude_static_roots.
* misc.c (GC_init_inner): Likewise.
* mark_rts.c (GC_exclude_static_roots_inner): New function (move
all the code from GC_exclude_static_roots(); add the comment.
* mark_rts.c (GC_add_roots_inner, GC_exclude_static_roots_inner):
add alignment assertion for the lower bound; add assertion for the
lower bound to be less than the upper one.
* mark_rts.c (GC_add_roots_inner, GC_exclude_static_roots): Adjust
the upper bound (round down to be of a pointer-aligned value);
return in case of an empty range.
* mark_rts.c (GC_exclude_static_roots): Acquire the lock and call
GC_exclude_static_roots_inner().
* mark_rts.c (GC_remove_roots): Quickly check the bounds and return
in case of a do-nothing case (before acquiring the lock).
* finalize.c (GC_fail_count): New external variable declaration.
* finalize.c (GC_reset_finalizer_nested,
GC_check_finalizer_nested): New function declarations (if THREADS
only).
* finalize.c (GC_finalizer_nested, GC_finalizer_skipped): New
static global variables (used internally by GC_finalize() and
GC_check_finalizer_nested()).
* finalize.c (GC_check_finalizer_nested): New static function
definition (only if not THREADS, used internally by
GC_notify_or_invoke_finalizers() to minimize the probability of
a deep recursion when a client finalizer tries to allocate GC
memory).
* finalize.c (GC_finalize): Reset GC_finalizer_nested value (or
call GC_reset_finalizer_nested()) if last heap expansion failed.
* finalize.c (GC_notify_or_invoke_finalizers): Access GC_gc_no,
GC_finalizer_now, GC_finalize_on_demand, GC_finalizer_notifier,
last_finalizer_notification variables holding the lock (to avoid
data races).
* finalize.c (GC_finalizer_notifier): Add comment.
* finalize.c (GC_notify_or_invoke_finalizers): Add "quick" check
for an empty finalization queue (only if THREADS and not
KEEP_BACK_PTRS/MAKE_BACK_GRAPH).
* finalize.c (GC_notify_or_invoke_finalizers): Call
GC_check_finalizer_nested() and skip GC_invoke_finalizers() call
if appropriate.
* include/private/pthread_support.h (GC_Thread_Rep): Add unsigned
finalizer_nested and finalizer_skipped fields (for internal use
by the multi-threaded GC_check_finalizer_nested()).
* win32_threads.c (GC_Thread_Rep): Likewise.
* pthread_support.c (GC_reset_finalizer_nested,
GC_check_finalizer_nested): New function definitions (the
multi-threaded variants of that in finalize.c).
* win32_threads.c (GC_reset_finalizer_nested,
GC_check_finalizer_nested): Likewise.
* alloc.c (GC_stopped_mark): Remove GC_log_printf("") (not needed
anymore and GCC produces a warning for it).
* alloc.c (GC_stopped_mark): Adjust printf argument type
specifier.
* backgraph.c: Include dbg_mlc.h before ifdef MAKE_BACK_GRAPH (for
the case when the configuration information comes from a config.h
file).
* checksums.c: Likewise.
* include/gc_allocator.h (GC_ATTR_UNUSED): Use "__unused__"
keyword instead of "unused".
* include/gc_allocator.h: Fix typos in comments.
* thread_local_alloc.c: Likewise.
* include/javaxfc.h (GC_finalize_all): Update comment.
* include/private/gc_priv.h (GC_API_PRIV): New macro (defined as
GC_API and serves only as a marker for the private but exported
symbols used by test.c only).
* include/private/gc_priv.h (GC_abort, GC_arrays, GC_is_marked,
GC_printf, GC_err_printf, GC_log_printf): Replace GC_API decl with
GC_API_PRIV one.
* include/private/gc_priv.h (GC_fo_entries): Don't export it
outside a DLL.
* include/private/gc_priv.h (GC_ATTR_FORMAT_PRINTF): New macro
designated to check the arguments correctness of printf-like
functions (currently works only for GCC v3+).
* include/private/gc_priv.h (GC_printf, GC_err_printf,
GC_log_printf): Use GC_ATTR_FORMAT_PRINTF attribute.
* dyn_load.c (HAVE_DL_ITERATE_PHDR): Break definition from use.
Define for FreeBSD 7.0+.
* mach_dep.c: Don't include ucontext.h with NO_GETCONTEXT.
* include/gc_gcj.h (GC_init_gcj_malloc): Improve descriptive
comment.
* allchblk.c (GC_merge_unmapped): Don't assume that adjacent
free blocks have different mapping status. Correctly handle gap
between blocks.
(GC_split_block): Remove dead code setting hb_flags. Add comment.
(GC_allochblk): Split blocks also in generational-only mode.
* os_dep.c (GC_unmap_gap): Don't really use munmap.
* include/private/gc_priv.h (GC_unmapped_bytes): Define as 0 for
not USE_MUNMAP case.
* Makefile.direct (MARK_BIT_PER_OBJ, PRINT_BLACK_LIST,
USE_PROC_FOR_LIBRARIES): Fix typo in the comments.
* Makefile.direct (USE_MMAP, USE_MUNMAP, THREAD_LOCAL_ALLOC,
PARALLEL_MARK, STATIC): Update the comments.
* include/private/gcconfig.h (GC_PREFER_MPROTECT_VDB): New macro
recognized (only if MPROTECT_VDB).
* Makefile.direct (DONT_USE_USER32_DLL, GC_PREFER_MPROTECT_VDB):
Add the comments for.
* os_dep.c (detect_GetWriteWatch): Recognize "GC_USE_GETWRITEWATCH"
environment variable (only if MPROTECT_VDB, if the variable is
unset when GC_PREFER_MPROTECT_VDB macro controls the strategy).
* doc/README.environment (GC_USE_GETWRITEWATCH): New variable.
* include/private/gcconfig.h (MPROTECT_VDB): Add FIXME for
USE_MUNMAP and PARALLEL_MARK cases (to relax the conditions in
the future).
* misc.c (GC_get_heap_size, GC_get_free_bytes): Ignore the memory
space returned to OS (GC_unmapped_bytes).
* include/gc.h (GC_get_heap_size, GC_get_free_bytes): Update the
comments.
* misc.c (GC_get_unmapped_bytes): New API function.
* include/gc.h (GC_get_unmapped_bytes): New API prototype.
* os_dep.c (GC_dirty_init): Move "ifdef GWW_VDB" block out of
"ifdef MSWIN32" one (for Cygwin).
* pthread_support.c (GC_allow_register_threads): New API function.
* win32_threads.c (GC_allow_register_threads): Likewise.
* include/gc.h (GC_allow_register_threads): New API prototype.
* include/gc.h (GC_register_my_thread, GC_unregister_my_thread):
Update the comments.
* pthread_support.c (GC_register_my_thread): Check the collector
is in the multi-threaded mode.
* win32_threads.c (GC_register_my_thread): Likewise.
* finalize.c (GC_finalize_all): Always call GC_invoke_finalizers
instead, following Ivan's original patch.
* allchblk.c (GC_allochblk_nth): Add assertion.
* checksums.c: Add GC_record_fault, GC_was_faulted,
CC_n_faulted_dirty_errors.
(GC_check_dirty): Remove register declarations, print
dirty bit errors on faulted pages.
* os_dep.c (GC_write_fault_handler): Call GC_record_fault().
* os_dep.c (GC_remove_protection): Compute index correctly.
== [7.2alpha2] 2009-06-12 ==
* dbg_mlc.c (GC_print_smashed_obj): Convert a group of printf()
calls into a single one (for output atomicity).
* typd_mlc.c (GC_calloc_explicitly_typed): Don't declare and use
GC_finalization_failures variable; check the result of
GC_general_register_disappearing_link() (for lack of memory)
instead.
* finalize.c (GC_finalization_failures): Remove unused global
variable.
* finalize.c (GC_general_register_disappearing_link,
GC_general_register_disappearing_link): Don't update the value of
GC_finalization_failures (since unused).
* include/private/gc_pmark.h (PUSH_ONE_CHECKED_STACK,
GC_PUSH_ONE_STACK, GC_PUSH_ONE_HEAP): The first parameter is of
word type now (as FIXUP_POINTER requires numeric argument).
* finalize.c (GC_ignore_self_finalize_mark_proc): GC_PUSH_ONE_HEAP
requires the first parameter of word type.
* mark.c (PUSH_GRANULE): Likewise.
* mark.c (GC_push_one, GC_push_all_eager): Likewise.
* finalize.c (GC_finalize_all): Call GC_invoke_finalizers() or
GC_finalizer_notifier directly, instead
of GC_INVOKE_FINALIZERS() to prevent infinite looping.
* include/javaxfc.h: Clarify GC_finalize_all comment.
* gcj_mlc.c: Include gc_pmark.h before "ifdef GC_GCJ_SUPPORT" (not
after) for configuration information.
* gcj_mlc.c (GC_gcj_malloc_ignore_off_page): Add comment.
* gcj_mlc.c (GC_gcj_malloc_ignore_off_page): Check "op" local
variable for NULL before dereferencing it, return GC_oom_fn() in
this case.
* typd_mlc.c (GC_malloc_explicitly_typed,
GC_malloc_explicitly_typed_ignore_off_page): Transform the code to
suppress compiler warning (for uninitialized "lg" variable).
* win32_threads.c (GC_unregister_my_thread): add false assertion
in unreachable code.
* pthread_support.c (GC_inner_start_routine): Don't release the
GC lock between GC_register_my_thread_inner() and
GC_init_thread_local() calls (post the "registered" even after
calling GC_init_thread_local()).
* win32_threads.c (GC_register_my_thread, GC_unregister_my_thread):
Use GC_lookup_thread_inner() instead of GC_lookup_thread() and
acquire the GC lock only once.
* win32_threads.c (GC_thr_init): Call GC_register_my_thread_inner()
directly instead of GC_register_my_thread() since I_HOLD_LOCK
and our (main) thread is not registered yet (add assertion for it).
* win32_threads.c (GC_init_parallel): Call GC_lookup_thread_inner()
directly instead of GC_lookup_thread() (since I_HOLD_LOCK).
* win32_threads.c (GC_lookup_thread): Remove unused function.
* win32_threads.c: Remove "#error GC_DLL untested with Cygwin".
* win32_threads.c (GC_win32_dll_threads): Define as FALSE macro
also if THREAD_LOCAL_ALLOC or GC_PTHREADS.
* win32_threads.c (GC_use_DllMain): Call ABORT also if GC_PTHREADS
(for Cygwin).
* win32_threads.c (GC_push_stack_for): Add parentheses around "&&"
(inside GC_ASSERT) to prevent compiler warning.
* win32_threads.c (GC_push_all_stacks): Remove FIXME for
PARALLEL_MARK.
* win32_threads.c (MAX_MARKERS, GC_markers): Move the definitions
to a place before GC_get_next_stack().
* win32_threads.c (marker_sp, marker_bsp): New static arrays (same
as in pthread_support.c).
* win32_threads.c (marker_last_stack_min): New static arrays (the
same semantics as for last_stack_min of GC_Thread_Rep).
* win32_threads.c (GC_get_next_stack): Handle marker threads.
* win32_threads.c (GC_mark_thread): Save the current stack pointer
to marker_[b]sp.
* win32_threads.c (start_mark_threads): Initialize
marker_last_stack_min elements (to "unset" value).
* misc.c (GC_set_oom_fn, GC_set_all_interior_pointers,
GC_set_finalize_on_demand, GC_set_java_finalization,
GC_set_finalizer_notifier, GC_set_dont_expand, GC_set_full_freq,
GC_set_no_dls, GC_set_free_space_divisor, GC_set_max_retries,
GC_set_dont_precollect, GC_set_time_limit, GC_set_warn_proc):
Change return type to void (these API functions no longer return
the old value).
* include/gc.h: Likewise.
* tests/test.c (main, WinMain, test): Remove explicit cast to void
for GC_set_warn_proc().
* misc.c (GC_get_oom_fn, GC_get_all_interior_pointers,
GC_get_finalize_on_demand, GC_get_java_finalization,
GC_get_finalizer_notifier, GC_get_dont_expand, GC_get_full_freq,
GC_get_no_dls, GC_get_free_space_divisor, GC_get_max_retries,
GC_get_dont_precollect, GC_get_time_limit, GC_get_warn_proc): New
API functions (to get the current value of the corresponding R/W
public variables).
* include/gc.h: Likewise.
* include/gc.h (GC_set_warn_proc, GC_set_free_space_divisor):
Update the comment.
* misc.c (GC_ignore_warn_proc): New API call-back function.
* include/gc.h (GC_ignore_warn_proc): Likewise.
* misc.c (GC_set_find_leak, GC_get_find_leak, GC_set_non_gc_bytes,
GC_get_non_gc_bytes): New API setter and getter functions (for the
public GC_find_leak and GC_non_gc_bytes variables, respectively).
* include/gc.h: Likewise.
* include/gc.h (GC_memalign): Add proto to GC API.
* mallocx.c (GC_memalign): Use GC_API, GC_CALL for the definition.
* tests/test.c (run_one_test): Test GC_memalign() on Win32 too,
remove GC_memalign() proto.
* misc.c (GC_write): Use multi-byte (A) variants of Win32
GetModuleFileName() and CreateFile().
* tests/test.c (main): Replace K&R-style function definition with the
ANSI C one.
* include/private/gcconfig.h (PLATFORM_ANDROID): New macro
recognized (for Linux on ARM32 without glibc).
* include/private/gcconfig.h (STRTOULL): Define for all targets
(define as "strtoul" for most targets except for LLP64/Win64).
* misc.c (GC_init_inner): Use STRTOULL instead of atoi/atol()
(cast the result to word type) to decode values of "GC_TRACE",
"GC_INITIAL_HEAP_SIZE", "GC_MAXIMUM_HEAP_SIZE" environment
variables.
* include/gc_allocator.h: Add gc_allocator_ignore_off_page.
* tests/test_cpp.cc: Add call to gc_allocator_ignore_off_page.
* win32_threads.c (GC_release_mark_lock): Correct misspelling of
AO_load in assertion.
* win32_threads.c (MAX_THREADS): Define as 1 if GC_win32_dll_threads
is defined as FALSE (otherwise the size of dll_thread_table is near
200 KiB for 32-bit).
* win32_threads.c (GC_use_DllMain): Optimize for THREAD_LOCAL_ALLOC.
* win32_threads.c (GC_Thread_Rep): Add backing_store_end and
backing_store_ptr fields for IA64 support.
* win32_threads.c (GC_register_my_thread_inner): Set
backing_store_end field to reg_base value for IA64 (same as in
pthread_support.c).
* win32_threads.c (SET_PTHREAD_MAP_CACHE): Put parentheses in the
"right" places, remove ';'.
* win32_threads.c (GC_fault_handler_lock): Declare only
if MPROTECT_VDB (and not WinCE).
* win32_threads.c (GC_suspend): Acquire and release
GC_fault_handler_lock only if MPROTECT_VDB (and not WinCE).
* win32_threads.c (GC_suspend): Define as STATIC.
* win32_threads.c (GC_push_stack_for): Fix WARN() format specifier
(should be word-compliant, "%p" is used w/o "0x"), don't cast sp.
* win32_threads.c (GC_push_all_stacks): Convert a group of printf()
calls into a single one (for output atomicity).
* win32_threads.c (GC_get_next_stack): Unprotect thread descriptor
before altering its last_stack_min ("thread" variable is added).
* win32_threads.c (GC_get_next_stack): Remove unnecessary checks for
"s" is non-NULL.
* win32_threads.c (GC_get_next_stack): Don't call GC_may_be_in_stack
if WinCE.
* win32_threads.c (GC_get_next_stack): Pass current_min value to
GC_get_stack_min as-is (without -1).
* win32_threads.c (GC_wait_marker): Remove FIXME and use "release"
version of AO_fetch_and_sub1().
* win32_threads.c (GC_win32_start_inner, GC_win32_start): convert int
to pointer (and vice versa) thru word type to suppress warnings.
* win32_threads.c (GC_mark_mutex_waitcnt): Fix comment, always
access atomically.
* misc.c: Change GC_THREADS tests back to THREADS.
* allchblk.c (GC_print_hblkfreelist, GC_dump_regions): Convert
a group of printf() calls into a single one (for output atomicity).
* include/gc.h (GC_set_all_interior_pointers, GC_set_full_freq,
GC_set_time_limit): New prototypes.
* misc.c (GC_set_all_interior_pointers, GC_set_full_freq,
GC_set_time_limit): New public setter/getter functions.
* include/gc.h: Fix (and remove outdated) comments for thread-local
allocation.
* include/gc.h: Fix typos in comments.
* misc.c (GC_init_inner, GC_printf): Likewise.
* include/gc.h (GC_unregister_disappearing_link): Refine comment.
* include/gc.h (GC_stack_base): Recognize _M_IA64 macro.
* misc.c (GC_stack_last_cleared, GC_min_sp, GC_high_water,
GC_bytes_allocd_at_reset, DEGRADE_RATE): Define only if THREADS.
* misc.c (GC_stack_last_cleared, GC_min_sp, GC_high_water,
GC_bytes_allocd_at_reset): Define as STATIC.
* misc.c (GC_get_heap_size, GC_get_free_bytes,
GC_get_bytes_since_gc, GC_get_total_bytes): Acquire the GC lock to
avoid data races.
* misc.c (GC_write_cs): Define only if THREADS (Win32/WinCE only).
* misc.c (GC_init_inner): Initialize GC_write_cs only if THREADS.
* misc.c (GC_init_inner): Use GC_INITIAL_HEAP_SIZE (if available) to
set the default initial value of initial_heap_sz.
* misc.c (GC_deinit): Destroy GC_write_cs only if THREADS.
* misc.c (GC_init_inner): Fix WARN() format specifier (should be
word-compliant, "%p" is used w/o "0x").
* misc.c (GC_init_inner): Don't recognize "GC_PAUSE_TIME_TARGET"
environment variable if SMALL_CONFIG.
* misc.c (GC_init_inner): Recognize "GC_FULL_FREQUENCY" environment
variable to set initial GC_full_freq value (if not SMALL_CONFIG).
* doc/README.environment (GC_FULL_FREQUENCY): Add information.
* doc/README.environment (GC_MARKERS): Refine information.
* misc.c (GC_init_inner): Change GC_ASSERT to GC_STATIC_ASSERT where
possible.
* misc.c (IF_NEED_TO_LOCK): New macro (instead of GC_need_to_lock).
* misc.c (GC_write): Use IF_NEED_TO_LOCK for handling GC_write_cs.
* misc.c (GC_abort): Don't define if SMALL_CONFIG.
* misc.c (GC_abort): Directly use WRITE() instead of GC_err_printf()
(to prevent possible infinite recursion).
* finalize.c (finalization_mark_proc): Replace K&R-style declaration
with ANSI C one.
* finalize.c (GC_grow_table, GC_register_finalizer_inner,
GC_enqueue_all_finalizers): Remove outdated comments about disabling
signals.
* finalize.c (GC_general_register_disappearing_link): Fix assertion
to catch NULL "obj" value.
* finalize.c (GC_unregister_disappearing_link): Check "link"
alignment before gaining the lock.
* finalize.c (GC_finalize): Refine comment.
* finalize.c (GC_finalize): Fix WARN() format specifier (should be
word-compliant, "%p" is used w/o "0x").
* finalize.c (GC_invoke_finalizers): Initialize "bytes_freed_before"
variable (to 0) to suppress compiler warning.
* include/gc_gcj.h (MARK_DESCR_OFFSET): Move to private/gc_pmark.h.
* include/gc_gcj.h: add "extern C" header and tail.
* include/private/gc_pmark.h: Remove GC_do_parallel_mark(),
GC_help_wanted, GC_helper_count, GC_active_count declarations (move
the comments to the place where these symbols are defined in mark.c).
* mark.c: Add STATIC GC_do_parallel_mark() declaration (for use by
GC_mark_some_inner, if PARALLEL_MARK only).
* mark.c (GC_mark_some_inner, GC_help_wanted, GC_helper_count,
GC_active_count, GC_do_parallel_mark): Define as STATIC.
* pthread_support.c (GC_mark_thread): Likewise.
* typd_mlc.c (GC_explicit_typing_initialized, GC_explicit_kind,
GC_array_kind, GC_ext_descriptors, GC_ed_size, GC_avail_descr,
GC_typed_mark_proc_index, GC_array_mark_proc_index, GC_eobjfreelist,
GC_arobjfreelist): Likewise.
* include/private/gc_pmark.h (PUSH_CONTENTS_HDR): Change GC_ASSERT
for HBLKSIZE to GC_STATIC_ASSERT.
* mark.c (GC_noop): Define for Borland C the same as for Watcom.
* mark.c (GC_noop, GC_mark_and_push): Add ARGSUSED tag.
* pthread_support.c (GC_do_blocking_inner): Likewise.
* mark.c (GC_mark_from): Initialize "limit" (to 0) in the default
switch branch to suppress compiler warning.
* mark.c (GC_return_mark_stack): Append new-line to printf message.
* mark.c: Remove unused GC_true_func(), GC_PUSH_ALL().
* pthread_support.c (GC_mark_thread): Add dummy "return 0" to
suppress compiler warning.
* pthread_support.c (start_mark_threads): Move the code limiting
"GC_markers" value (and printing a warning) to GC_thr_init().
* pthread_support.c (GC_thr_init): Silently limit "GC_markers" value
if based on the number of CPUs.
* pthread_support.c (GC_thr_init): Treat incorrect "GC_markers"
values as one.
* pthread_support.c (GC_register_my_thread_inner): Add a check for
"stack_end" is non-NULL (the same as in win32_threads.c).
* pthread_support.c (pthread_create): Call GC_oom_fn before giving up
with ENOMEM.
* thread_local_alloc.c (return_single_freelist): Convert "for" loop
to "while" one to suppress "possible extraneous ';'" warning.
* darwin_stop_world.c (GC_push_all_stacks): Recognize ARM32.
* include/private/gc_priv.h (GC_THREAD_STATE_T): Define for ARM32
(Darwin only).
* include/private/gcconfig.h: Add machine-specific part for DARWIN.
* include/private/gcconfig.h (ARM32): Define config parameters for
DARWIN (iPhone).
* alloc.c (GC_FULL_FREQ, GC_DONT_EXPAND, GC_FREE_SPACE_DIVISOR,
GC_TIME_LIMIT): New macros (used to control the default initial
values of GC_full_freq variable, GC_dont_expand,
GC_free_space_divisor, GC_time_limit respectively).
* include/private/gc_priv.h (TIME_LIMIT): Remove macro (replaced
with GC_TIME_LIMIT in alloc.c).
* alloc.c (GC_need_full_gc, GC_stopped_mark, GC_finish_collection):
Define as STATIC.
* mark_rts.c (GC_push_current_stack, GC_push_gc_structures): Likewise.
* include/private/gc_priv.h (GC_stopped_mark, GC_finish_collection):
Move the prototypes to alloc.c, make STATIC.
* include/private/gc_priv.h (GC_push_current_stack,
GC_push_gc_structures, GC_push_regs_and_stack): Remove prototypes
(move the comments to the places where these functions are defined).
* mach_dep.c (GC_push_regs_and_stack): Move to mark_rts.c and define
as STATIC.
* alloc.c (GC_timeout_stop_func, GC_stopped_mark,
GC_print_heap_sects): Convert a group of printf() calls into
a single one (for output atomicity).
* mark_rts.c (GC_print_static_roots): Likewise.
* alloc.c (GC_stopped_mark): Output blank line (when logging) for
convenience to delimit collections.
* alloc.c (GC_clear_a_few_frames): Rename NWORDS to CLEAR_NWORDS;
make "frames" local variable volatile (to prevent optimization).
* alloc.c (GC_try_to_collect_inner, GC_stopped_mark,
GC_finish_collection, GC_allocobj): Remove outdated comments about
disabling signals.
* include/private/gc_priv.h (GC_register_displacement_inner,
GC_gcollect_inner): Likewise.
* alloc.c (GC_try_to_collect_inner, GC_stopped_mark,
GC_finish_collection): Initialize "start_time" local variable (to 0)
to suppress compiler warning.
* mark_rts.c (GC_add_roots_inner): Likewise.
* alloc.c (GC_RATE, MAX_PRIOR_ATTEMPTS): Guard with "ifndef".
* include/private/gc_priv.h (clock, GC_stop_world, GC_start_world,
GC_acquire_mark_lock, GC_release_mark_lock, GC_notify_all_builder,
GC_wait_for_reclaim, GC_notify_all_marker, GC_wait_marker): Replace
K&R-style function prototypes with ANSI C one.
* include/private/gc_priv.h (ABORT): Define as DebugBreak() for
Win32/WinCE if SMALL_CONFIG (the same as in GC_abort()).
* include/private/gc_priv.h (ROUNDED_UP_WORDS, abs): Remove unused
macros.
* include/private/gc_priv.h (GC_noop): Declare for Borland C the
same as for Watcom.
* mark_rts.c (GC_push_conditional_with_exclusions): Add ARGSUSED tag.
* dbg_mlc.c (GC_store_debug_info, GC_store_debug_info_inner): Remove
outdated comment about disabling signals.
* mallocx.c (GC_malloc_uncollectable,
GC_malloc_atomic_uncollectable): Likewise.
* os_dep.c: Likewise.
* dbg_mlc.c (GC_debug_change_stubborn, GC_debug_end_stubborn_change):
Add ARGSUSED tag.
* pthread_stop_world.c (GC_suspend_handler,
GC_suspend_handler_inner): Likewise.
* dbg_mlc.c (GC_debug_free, GC_debug_realloc): Fix printf message.
* dbg_mlc.c (GC_debug_realloc): Set "result" to NULL in the default
switch branch to suppress compiler warning.
* dyn_load.c (GC_init_dyld): Use ABORT() instead of GC_abort().
* include/private/darwin_semaphore.h (sem_init): Likewise.
* include/javaxfc.h: Replace "GC_H" with "_GC_H".
* include/private/dbg_mlc.h (GC_has_other_debug_info,
GC_store_debug_info): Replace K&R-style function prototypes with ANSI
C one.
* include/private/gcconfig.h (GC_FreeBSDGetDataStart, real_malloc,
GC_win32_get_mem, GC_wince_get_mem, GC_unix_get_mem): Likewise.
* include/private/pthread_support.h (GC_stop_init): Likewise.
* include/private/gcconfig.h: Refine comment about setting
GC_stackbottom.
* include/private/gcconfig.h (FIXUP_POINTER): Put parentheses in the
"right" places.
* include/private/pthread_support.h (GC_Thread_Rep): Refine comment
for "stack_end" field.
* mallocx.c (GC_malloc_uncollectable,
GC_malloc_atomic_uncollectable): Remove cast to undefined "hbklk".
* os_dep.c (GC_USE_MEM_TOP_DOWN): New macro (for setting
GC_mem_top_down to MEM_TOP_DOWN for debug purposes).
* os_dep.c (GC_gww_read_dirty, catch_exception_raise): Fix WARN()
format specifier (should be word-compliant, "%p" is used w/o "0x").
* pthread_stop_world.c (GC_suspend_handler_inner): Likewise.
* os_dep.c (GC_dirty_init): Append new-line to printf messages.
* os_dep.c (GC_mprotect_thread): Fix GC_err_printf message.
* os_dep.c (GC_save_callers): Change GC_ASSERT to GC_STATIC_ASSERT.
* pthread_stop_world.c (GC_retry_signals, GC_suspend_ack_sem): Define
as STATIC.
* pthread_stop_world.c (GC_push_all_stacks): Add assertion for that
"thread_blocked" is not set for the current thread.
* real_malloc.c: Add "extern GC_quiet" to suppress compiler warning.
* reclaim.c (GC_reclaim_all): Initialize "start_time" (to 0) to
suppress compiler warning.
* tests/test.c (check_heap_stats): Avoid unbalanced brackets in ifdef.
* win32_threads.c: restructure parallel marking mutex initialization.
* win32_threads.c, alloc.c, darwin_stop_world.c, mallocx.c, mark.c,
pthread_stop_world.c, pthread_support.c: Add runtime conditions
on GC_parallel were appropriate.
* pthread_support.c: Condition marker_bsp on ia64.
(GC_segment_is_thread_stack): Fix loop upper bound.
* reclaim.c: Limit some assertions to PARALLEL_MARK.
* pthread_support.c: Don't acquire mark lock for thread-local
allocation.
* include/private/gc_priv.h: Don't define parallel mark sync
support just for THREAD_LOCAL_ALLOC.
* include/private/gcconfig.h: refine MINGW32 test.
* mark.c: Add win64/gcc tests.
* test.c (fork_a_thread, reverse_test, alloc8bytes, tree_test,
typed_test, run_one_test, check_heap_stats, main, test): Replace
all K&R-style function definitions with ANSI C ones.
* trace_test.c (main): Likewise.
* test.c (GC_COND_INIT): Define as GC_INIT() also in case of
THREAD_LOCAL_ALLOC.
* test.c (reverse_test): Call fork_a_thread() only if GC_PTHREADS
or GC_WIN32_THREADS; remove fork_a_thread() macros definition.
* test.c (reverse_test): Use "volatile" when clearing "b" and "c"
local variables (to suppress "assigned value is never used"
compiler warning).
* test.c (tree_test): Use public GC_noop1() instead of private
GC_noop().
* test.c (typed_test): Likewise.
* test.c (check_heap_stats): Define and assign value to
"late_finalize_count" local variable only if its value is used
(if FINALIZE_ON_DEMAND defined).
* test.c (main): Remove DJGPP-specific initialization of
GC_stackbottom (not needed anymore, handled in gcconfig.h).
* trace_test.c: Guard #define GC_DEBUG with #ifndef.
* trace_test.c: Include "gc_backptr.h".
* trace_test.c (main): Call GC_INIT().
* trace_test.c (main): Add "return 0" statement.
* dyn_load.c (GC_register_dynlib_callback): Use new index j
instead of i in the inner loop.
* tests/test.c: Increment n_tests with fetch_and_add when possible,
avoiding need to export lock.
* include/gc_pthread_redirects.h:
- dlfcn.h is included for dlopen() proto before undefining
"dlopen" (so, it's possible now to include dlfcn.h after
gc.h from user code);
- GC_dlopen() proto is added (except for Darwin as
it's missing there);
- "dlopen" is explicitly undefined (before its redefinition).
* include/gc.h:
- "process.h" is included besides "windows.h"
(for _beginthreadex/_endthreadex); win32 only.
- GC_NO_THREAD_DECLS is moved to the right place
(before closing "extern C").
* pthread_support.c: Fix out of memory handling for Thread_Reps.
* win32_threads.c: Don't include process.h on winCE,
improve out of memory handling for thread structures, don't
define GC_beginthreadex and GC_endthreadex for winCE.
* tests/test.c: Change gcj vtable decriptor type from size_t to
GC_word.
* gcj_mlc.c: Add comment.
* tests/test.c: Change NTEST to NTHREADS. Fork 5 threads by default.
Run reverse_test a second time in each thread.Add comments.
Don't rely on AO_fetch_and_add.
* dyn_load.c (GC_register_dynlib_callback,
GC_register_dynamic_libraries_dl_iterate_phdr): Add support
for GNU_PT_RELRO relocations.
* Makefile, Makefile.direct: GC_SOLARIS_PTHREADS was replaced
by GC_SOLARIS_THREADS.
* include/gc.h: Improve finalizer documentation.
* mips_sgi_mach_dep.s: Replace _MIPS_SIM_ABI32 with _ABIO32.
* pthread_stop_world.c, Makefile.dj: Fix typos.
* win32_threads.c (GC_new_thread): Make first_thread
visible to the whole file.
(UNPROTECT): New macro.
(GC_push_stack_for, GC_suspend, GC_start_world): unprotect
thread structures before writing.
(GC_suspend): Acquire GC_fault_handler_lock before suspending
thread.
* os_dep.c: export GC_fault_handler_lock.
(GC_remove_protection): Check if already unprotected.
* doc/README.win32: Add OpenWatcom warning.
* include/private/gcconfig.h: Really check it in.
* os_dep.c (GC_get_stack_base, windows): Replace with Dave Korn's
code from gcc version.
* os_dep.c: make gc compilable (optionally) for Cygwin with
GetWriteWatch-based virtual dirty bit implementation ("os_dep.c" file).
* os_dep.c: Make non-win32 GC_write_fault_handler STATIC.
* mark.c (GC_noop): fix declaration definition mismatch for DMC.
* include/private/gcconfig.h: Enable MPROTECT_VDB and GWW_VDB for
Watcom (Win32 only). It works.
* mach_dep.c: Don't use __builtin_unwind_init for register
state on PowerPC/Darwin.
* doc/gcdescr.html: Improve description of object freelist
structure.
* include/private/gc_priv.h: Fix comment for _size_map.
* os_dep.c (GC_linux_stack_base): Relax sanity test.
* include/private/gc_pmark.h (PUSH_CONTENTS_HDR for
MARK_BIT_PER_OBJ): Add missing backslash before eoln.
* misc.c (GC_set_warn_proc): Implicitly initialize GC on
non-Cygwin win32.
* configure.ac: Enable thread-local allocation for sparc-linux.
* alloc.c (GC_try_to_collect): Remove duplicate initialization
check.
* malloc.c (GC_generic_malloc): Remove lw to eliminate single-
threaded warnings.
* mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
* allchblk.c, backgraph.c, dbg_mlc.c, dyn_load.c,
finalize.c, include/private/gc_pmark.h, malloc.c, mark.c,
os_dep.c, pthread_stop_world.c, pthread_support.c, reclaim.c,
thread_local_alloc.c.
* misc.c: Refine comment.
* os_dep.c: Define GC_GWW_BUF_LEN more intelligently. Add FIXME
comment.
* win32_threads.c (GC_push_stack_for): Yet another attempt
at the stack_min finding logic. Try to clean up the existing code
while minimizing VirtualQuery calls.
(GC_win32_start_inner): Register thread before GC_printf.
Produce more output with DEBUG_THREADS.
*include/gc.h: Update obsolete comments.
* tests/test.c:
(gcj_class_struct2): Use cast instead of l suffix.
Cast GetLastError to int in various places.
Avoid unused result warning from incr/decr macros.
Add cast for fake_gcj_mark_proc.
Cast GC_gc_no to unsigned in printf.
* include/gc.h: Fix two typos in comments.
* finalize.c: Fix typo in comment.
* blacklst.c (GC_print_source_pointer): Don't call GC_print_heap_obj
with lock.
* reclaim.c: (GC_reclaim_block): Scan even nearly full blocks
if we are checking for leaks.
* win32_threads.c: Remove mark lock spinning.
* win32_threads.c, pthread_support.c: Update GC_unlocked_count,
GC_spin_count, and GC_block_count using atomic operations.
* tests/test.c: Declare n_tests as AO_t only if we have threads.
* win32_threads.c: Support PARALLEL_MARK. Make printf arg
types agree with format specifiers.
Add STATIC for GC_threads.
* include/private/gcconfig.h: Add FIXME comment.
* tests/test.c (run_ine_test): Replace LOCK/UNLOCK use with
AO_fetch_and_add1_full. Declare n_tests as AO_t.
(WinMain): Don't call GC_use_DllMain.
with PARALLEL_MARK or THREAD_LOCAL_ALLOC.
* alloc.c (GC_try_to_collect_inner): Don't print redundant
GC_bytes_allocd and GC_gc_no.
(GC_stopped_mark): Print average world stop time.
* include/private/gc_priv.h (MS_TIME_DIFF): Add cast.
* misc.c, doc/README.environment: Add support for
GC_FREE_SPACE_DIVISOR and GC-disable-incremental.
* include/gc.h: Make GC_set_free_space_divisor correspond to
(somewhat unfortunate) reality.
(Mostly improves LLP64 support.)
* backgraph.c, checksums.c, dbg_mlc.c, finalize.c, mark.c,
misc.c, reclaim.c: Changed some int and long type to word or size_t
(and vice versa where appropriate)
* gcj_mlc.c, include/private/dbg_mlc.h, include/private/gcconfig.h,
include/private/thread_local_alloc.h, mark.c,
misc.c, thread_local_alloc.c, win32_threads.c: Added intermediate
casts to word type when casting from int to pointer (or pointer
to int, or data pointer to code pointer) - just to remove the
corresponding compiler warning.
* ptr_chck.c (GC_is_visible): cast int const to word type to
prevent left shift overflow.
* os_dep.c: change the type of GC_mem_top_down global variable
(containing a flag) to DWORD.
* include/gc_config_macros.h: define GC_SOLARIS_THREADS if GC_THREADS
is defined on SunOS x86_64.
* misc.c (GC_init_size_map): Ifdef out GC_ASSERT as a workaround
for VC++ 2008 amd64 (v15.00.21022.08 for x64) compiler bug
(the compiler gets hung if invoked with -Ox -D
ALL_INTERIOR_POINTERS -D GC_ASSERTIONS)
* backgraph.c: cast GC_gc_no value to unsigned short when
assigned/compared to height_gc_no field of back_edges.
* os_dep.c (GC_remove_protection): Add ARGSUSED.
* win32_threads.c (GC_thread_exit_proc): Remove unused local
variable.
* mark.c (GC_check_dirty): Move declaration out of func body.
* doc/gcinterface.html: Improve REDIRECT_MALLOC documentation.
* include/gc.h (GC_register_my_thread): Improve comment.
* Makefile.direct: Add comment for -DCHECKSUMS.
* thread_local_alloc.c, include/private/thread_local_alloc.h:
Fix typos in comments.
* finalize.c: Declare mark_procs and GC_register_finalizer_inner
STATIC.
* malloc.c (GC_free): Move size calculation below assertion.
* win32_threads.c (GC_get_stack_min, GC_may_be_in_stack):
Add one entry VirtualQuery cache, I_HOLD_LOCK assertions.
(GC_push_stack_for, GC_get_next_stack) : Hopefully fix WINCE support.
* finalize.c (GC_general_register_disappearing_link): Add
assertion.
* malloc.c (GC_generic_malloc): Round lb to granules, not words.
* mallocx.c (GC_generic_malloc_ignore_off_page): Round lb to
granules, not words.
* mach_dep.c (NO_GETCONTEXT): Define for sparc linux.
* configure.ac: Define mach_dep for sparc-linux.
* mark_rts.c (GC_approx_sp): Use volatile to avoid common
warning.
* dyn_load.c (GC_cond_add_roots): Fix GC_get_next_stack argument
order.
* alloc.c, dbg_mlc.c, dyn_load.c, finalize.c, gcj_mlc.c,
include/gc.h, include/gc_config_macros.h, include/gc_cpp.h,
include/gc_gcj.h, include/gc_mark.h, include/gc_typed.h,
include/javaxfc.h, include/private/gc_locks.h,
include/private/gc_priv.h, malloc.c, mallocx.c, mark.c, mark_rts.c,
misc.c, obj_map.c, os_dep.c, pthread_support.c, ptr_chck.c,
stubborn.c, tests/test.c, thread_local_alloc.c, typd_mlc.c
win32_threads.c: Add GC_CALL and GC_CALLBACK macro invocations.
* test.c: Remove some old K&R code.
* win32_threads.c (GC_may_be_in_stack): New. (GC_Thread_Rep):
Add last_stack_min. (GC_push_stack_for): Use last_stack_min.
(GC_get_next_stack): Add limit argument, use_last_stack_min.
(GC_suspend): make stack_base assignment conditional.
* dyn_load.c (win32 GC_cod_add_roots): Pass limit to
GC_get_next_stack.
* configure_atomic_ops.sh: Remove.
* build_atomic_ops.sh, build_atomic_ops.sh.cygwin, doc/README.win32,
Makefile.direct: Partially support build directories whose path
name contains blanks.
* Makefile.am: Support new files (build_atomic_ops.sh,
build_atomic_ops.sh.cygwin)
* include/private/gc_locks.h, include/private/gc_pmark.h,
include/private/gc_priv.h, include/private/gcconfig.h,
mach_dep.c, mark_rts.c, misc.c, os_dep.c, pthread_stop_world.c,
pthread_support.c, thread_local_alloc.c, typd_mlc.c, win32_threads.c:
Fix comments.
* pthread_support.c: Comment out LOCK_STATS.
* include/gc.h: Fix comments.
* misc.c (GC_init_inner): Enable GC_LOG_FILE on Cygwin.
* include/private/gcconfig.h: Consider USE_MMAP for Cygwin.
* os_dep.c (GC_get_main_stack_base): Use alternate definition
with USE_MMAP.
* include/private/gc_priv.h: Sometimes define SETJMP on Cygwin.
* doc/README: Make it clearer when Makefile.direct is assumed.
* cord/cord.am: install include/cord.h.
* win32_threads.c (GC_pthread_join, GC_pthread_start_inner):
Remove unused variables.
* darwin_stop_world.c: Always declare GC_thr_init().
* dbg_mlc.c (GC_debug_free_inner): Don't touch oh_sz if
SHORT_DBG_HDRS is defined.
* include/private/gc_pmark.h (OR_WORD_EXIT_IF_SET, parallel
mark, USE_MARK_BITS version): Refer to correct parameter name.
* finalize.c (GC_general_register_disappearing_link): Remove
redundant code.
* gcj_mlc.c (GC_init_gcj_malloc): Add cast to signed.
* os_dep.c: (GC_write_fault_handler): Remove remaining
references to deleted variable "code". Remove redundant
FREEBSD definitions.
* include/private/gcconfig.h (GWW_VDB): Define for X86_64 when
defined for X86. (STATIC): Define as "static" with NO_DEBUGGING.
* include/private/gc_priv.h: Update MAX_HEAP_SECTS.
* dbg_mlc.c (GC_print_smashed_obj): Increase robustness with
smashed string, (GC_debug_free_inner): Mark as free.
* mallocx.c (GC_malloc_many): Always clear new block if
GC_debugging_started.
* reclaim.c: Move GC_debugging_started from
GC_reclaim_small_nonempty_block() to GC_reclaim_generic(),
which is also called directly.
* doc/README: Fix spelling error. Update license summary.
* include/gc.h (GC_PRE_INCR3, GC_POST_INCR3): add (void **) casts.
* tests/test.c: Don't define GC_DEBUG if already defined.
* doc/simple_example.html: update --enable-full-debug reference,
Make HTML formatting standards compliant.
* doc/debugging.html, doc/leak.html: Fix HTML formatting bugs.
* doc/gcinterface.html: specify encoding.
* doc/simple_example.html: Update thread-local allocation
description.
* configure.ac: Check for gc-debug earlier; replace remaining
full-debug tests.
* include/gc.h, ptr_chck.c (GC_pre_incr, GC_post_incr):
Use signed offset type. Use ptr_t internally.
* doc/gcinterface.html: Update LOCAL_MALLOC description.
* doc/README.autoconf, doc/leak.html, doc/README.DGUX386:
Fix full-debug reference.
* include/gc.h: Rewrite GC_..._INCR and friends.
* tests/test.c: Minimally test GC_..._INCR and friends.
* mark.c: (GC_push_next_marked, GC_push_next_marked_dirty,
GC_push_next_marked_uncollectable): Never invoke GC_push_marked
on free hblk.
* headers.c: Test COUNT_HDR_CACHE_HITS not USE_HDR_CACHE.
(GC_header_cache_miss): Always blacklist pointers for free
hblks. Add assertion and comment.
* pthread_support.c (GC_register_my_thread): Fix #if indentation.
* include/private/gc_hdrs.h: USE_HDR_CACHE is no longer tested.
Delete it.
* include/private/gc_pmark.h: (PUSH_OBJ): Add assertion.
* alloc.c, include/gc_mark.h, Makefile.direct: Improve comments.
* configure.ac: Set win32_threads on MinGW.
Ivan's description of the patch follows. Note that a few pieces like
the GC_malloc(0) patch, were not applied since an alternate had been
previously applied. A few differed stylistically from the rest of
the code (mostly casts to void * instead of target type),
or were classified as too minor to bother. Note that
all of Ivan's static declarations which did not correct outright
naming bugs (as a few did), where replaced by STATIC, which is
ignored by default.
- minor bug fixing (for FreeBSD, for THREAD_LOCAL_ALLOC and for
GC_malloc(0));
- addition of missing getter/setter functions for public variables
(may be useful if compiled as Win32 DLL);
- addition of missing GC_API for some exported functions;
- addition of missing "static" declarator for internal functions
and variables (where possible);
- replacement of all remaining K&R-style definitions with ANSI
C ones (__STDC__ macro is not used anymore);
- addition of some Win32 macro definitions (that may be missing in
the standard headers supplied with a compiler) for GWW_VDB mode;
- elimination of most compiler warnings (except for
"uninitialized data" warning);
- several typos correction;
- missing parenthesis addition in macros in some header files of
"libatomic_ops" module.
My highlights based on reading the patch:
* allchblk.c: Remove GC_freehblk_ptr decl.
Make free_list_index_of() static.
* include/gc.h: Use __int64 on win64, define GC_oom_func,
GC_finalizer_notifier_proc, GC_finalizer_notifier_proc,
add getter and setters: GC_get_gc_no, GC_get_parallel,
GC_set_oom_fn, GC_set_finalize_on_demand,
GC_set_java_finalization, GC_set_dont_expand,
GC_set_no_dls, GC_set_max_retries, GC_set_dont_precollect,
GC_set_finalizer_notifier. Always define GC_win32_free_heap.
gc_config_macros.h: Define _REENTRANT after processing
GC_THREADS.
* include/gc_cpp.h: Improve GC_PLACEMENT_DELETE test,
handling of operator new[] for old Windows compilers.
* include/gc_inline.h (GC_MALLOC_FAST_GRANS): Add parentheses
around arguments.
* dbg_mlc.c, malloc.c, misc.c: Add many GC_API specs.
* mark.c (GC_mark_and_push_stack): Fix source argument for
blacklist printing.
* misc.c: Fix log file naming based on environment variable
for Windows. Make GC_set_warn_proc and GC_set_free_space_divisor
just return current value with 0 argument. Add DONT_USE_USER32_DLL.
Add various getters and setters as in gc.h.
* os_dep.c: Remove no longer used GC_disable/enable_signals
implementations. (GC_get_stack_base): Add pthread_attr_destroy
call. No longer set GC_old_bus_handler in DARWIN workaround.
* pthread_support.c: GC_register_my_thread must also
call GC_init_thread_local.
* Makefile.direct, mach_dep.c: Add support for NO_GETCONTEXT.
* mach_dep.c: Include signal.h.
* gc_priv.h: Factor out INLINE declaration.
* include/private/gcconfig.h: Update MIPS/LINUX config.
* doc/gcdescr.html: Fix typo.
* mach_dep.c (GC_with_callee_saves_pushed): Don't rely on getcontext
for MIPS/LINUX.
* configure.ac: SPARC fixes.
* thread_local_alloc.c(GC_mark_thread_local_fls_for): Include
size 0, except for gcj.
* doc/gc.man: Expand C++ cautions.
* include/gc_inline.h: Fix comments.
== [7.1] 2008-05-03 ==
* doc/gcinterface.html: Improve C++ interface documentation.
* allchblk.c (GC_allochblk): Check for overflow during size
rounding.
* tests/huge_test.c: New.
* Makefile.direct, tests/tests.am: Add huge_test.c
* pthread_support.c: Fix typo in comment.
* os_dep.c (GC_win32_get_mem): Add heap section only if
allocation succeeded.
* malloc.c: (free replacement) Fix caller address space check.
* finalize.c (GC_grow_table): Dereference table in null-check.
* win32_threads.c (GC_delete_gc_thread, GC_delete_thread):
Consistently call CloseHandle. (GC_suspend): Call
GC_delete_gc_thread.
* tests/test.c: Don't reference GC_print_stats if not exported.
* tests/test.c (run_one_test): Don't mention pthread_self().
* misc.c: Declare GC_thr_init().
* allchblk.c (add_to_fl): disable assertions with USE_MUNMAP,
and refine assertions to handle huge unmergable blocks.
(GC_allochblk_nth): Add comment.
* include/private/gcconfig.h: Add missing FREEBSD macro
consistency test.
* allchblk.c (GC_enough_large_bytes_left): No longer take
parameters; return free list index bound.
(GC_merge_unmapped): Don't access nexthdr until after null test.
(Fixes bug in 1/29/08 check-in.) (GC_allochblk): Calculate
when splitting is allowable only once here, not when considering each
block. (GC_allchblk_nth): Accept new may_split parameter.
Avoid some redundant tests for exact size matches.
* alloc.c (GC_should_collect): Cache min_bytes_allocd.
(GC_maybe_gc): Make locking assertion testable.
* mark_rts.c: Fix indentation.
* pthread_stop_world.c: Replace old GC_err_printf1 reference.
* tests/test.c: Remove (void) casts. Optionally print some
timing information.
* windows-untested/gc.def: Remove CreateThread line.
* windows-untested/README: New file.
* win32_threads.c (GC_use_DllMain): Force collector initialization.
* include/gc.h (GC_use_DllMain): Clarify usage rules in comment.
* mark.c (GC_mark_from): Slightly simplify GC_DS_PER_OBJECT code.
* include/gc_cpp.h: Add matching placement delete overloads
everywhere.
* include/private/gc_locks.h (NO_THREAD): Add cast.
* include/private/gcconfig.h: Add test for __HP_aCC.
* configure.ac, tests/tests.am: Avoid libgccpp on HP/UX.
* doc/README.win32: Fix typo.
* configure.ac: Fix printing of enable-shared result.
* misc.c (GC_init_inner): Assert !GC_need_to_lock only when
defined. (GC_call_with_stack_base): Add GC_API.
* os_dep.c (GC_get_stack_base): Add GC_API.
* win32_threads.c: (GC_register_my_thread, GC_unregister_my_thread):
Add GC_API.
* include/gc.h: Add GC_API annotations.
* include/private/gc_locks.h: Define UNCOND_LOCK etc. also for
PCR.
* include/private/gc_pmark.h: Fix comments.
* include/private/gc_priv.h, mark_rts.c, typd_mlc.c:
Add GC_push_typed_structures() to push GC_ext_descriptors.
* tests/test.c: Call GC_INIT for DARWIN; test system type using
gcconfig.h-defined macros.
* allchblk.c (GC_merge_unmapped, GC_freehblk): Refuse to create
blocks large enough that their size, when interpreted as a signed
value, would be negative.
* include/private/gc_priv.h: Comment hb_sz range limit.
* mark.c (GC_push_next_marked): correct comment.
* Makefile.direct: document NO_PROC_STAT.
* include/private/gcconfig.h: Accommodate NO_PROC_STAT.
== [7.1alpha2] 2008-01-10 ==
* Makefile.am: Mention atomic_ops.c and atomic_ops_sysdeps.S
again. Refer to build directory as ".".
* configure.ac: Ignore --enable-parallel-mark on Darwin for now.
* darwin_stop_world.c: Add FIXME comment for parallel marker.
* include/private/gc_priv.h: Update MAX_ROOT_SETS
and LOG_PHT_ENTRIES to handle larger heaps.
* include/gc.h (GC_INIT,GC_init): Update comments.
* allchblk.c, alloc.c, include/private/gc_priv.h:
Track GC_bytes_dropped and use in GC triggering decisions.
* alloc.c (min_bytes_allocd): Weight atomic blocks less.
* alloc.c (GC_add_to_heap): Call GC_install_header(p) AFTER
adjusting p.
* Makefile.am: Add NT_X64_THREADS_MAKEFILE.
* NT_X64_STATIC_THREADS_MAKEFILE: Clean up obsolete comment.
* alloc.c: Add declaration for GC_add_current_malloc_heap.
* win32_threads.c (GC_beginthreadex): Clean up error
return code.
* doc/README.win64, NT_X64_THREADS_MAKEFILE, Makefile.direct:
Add NT_X64_THREADS_MAKEFILE.
* alloc.c: Define GC_version instead of in version.h.
* version.h: Remove.
* include/gc_version.h: Move most of version.h here.
* include/gc.h: Include gc_version.h.
* gcname.c, add_gc_prefix.c: include gc.h instead of version.h.
* Makefile.direct, Makefile.dj, Makefile.am, include/include.am:
Adjust for version.h rename.
* configure.ac: Put libatomic_ops links in build directory.
* Makefile.am: Don't mention atomic_ops.c and atomic_ops_sysdeps.S
as nodist sources.
* include/gc.h, doc/README.macros: Add GC_NO_THREAD_REDIRECTS,
GC_NO_THREAD_DECLS, don't test explicitly for GC_SOLARIS_THREADS.
* alloc.c: Deal correctly with address wrapping for
GC_greatest_plausible_heap_addr and GC_least_plausible_heap_addr.
* finalize.c, include/gc.h (GC_register_disappearing_link,
GC_register_finalizer_inner): Improve out-of-memory handling.
* include/private/gc_pmark.h: Fix comment spelling.
* include/gc_inline.h, include/gc_tiny_fl.h: cleanups to make usable
in other contexts.
* include/gc.h: Don't define GC_HAVE_BUILTIN_BACKTRACE for uclibc.
* gc_cpp.cc: Don't include gc_cpp.h from local directory.
* allchblk.c, configure.ac (add --enable-munmap)
* dyn_load.c (GC_dyld_image_add): Remove ifdef clause and use the macro
GC_GETSECTBYNAME instead.
* include/private/gc_priv.h: Define GC_GETSECTBYNAME according to the
architecture (Darwin).
* reclaim.c (GC_bytes_found): Expand comment.
* thread_local_alloc.c (GC_malloc_atomic, GC_gcj_malloc): Pass
granules, not bytes, to GC_FAST_MALLOC_GRANS.
* include/gc.h: Never include gc_local_alloc.h.
* tests/test.c: Add size zero allocation tests.
* malloc.c: Update GC_large_allocd_bytes on explicit deallocation.
* allchblk.c: Sanity check GC_max_large_allocd_bytes.
* Makefile.direct: Invoke $(MAKE) instead of make.
* doc/scale.html: Reflect gc7 thread local allocation behavior.
* include/extra/gc.h, include/extra/gc_cpp.h: New.
* include/include.am: Install gc.h and gc_cpp.h in $(prefix)/include
again.
* pthread_support.c (GC_thr_init): Use sysconf(_SC_NPROCESSORS_ONLN)
for HURD.
* include/private/gcconfig.h: Add Linux/mips-64 support.
* dbg_mlc.c: Use random() on all glibc systems.
* mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext() on
HURD. Add comment.
* pthread_stop_world.c (GC_suspend_handler, GC_stop_init): Accommodate
systems without SA_SIGINFO.
* include/gc.h (GC_PTR_STORE): Fix non-DEBUG parentheses.
* tests/test.c (run_one_test): Add GC_PTR_STORE test.
No longer test for RS6000.
* alloc.c, backgraph.c, headers.c, include/private/gc_priv.h:
Maintain GC_our_memory and GC_n_memory.
* dbg_mlc.c (GC_print_smashed_obj): Improve message.
(GC_print_all_smashed_proc): Pass client object address instead of
base.
* dyn_load.c (sort_heap_sects): New. (GC_register_map_entries):
Register sections that are contiguous and merged with our heap.
* malloc.c, os_dep.c (GC_text_mapping): Check for just base name
of libraries.
* malloc.c (calloc): Check for special callers even with
USE_PROC_FOR_LIBRARIES. Move assertion. Add rudimentary
malloc/free tracing.
* misc.c: No longer call GC_init_lib_bounds explicitly.
* thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Always
initialize on demand.
* tests/test.c: Call GC_INIT only when required.
* Makefile.direct: Remove comment fragment.
* tests/tests.am: Add smashtest.
* configure.ac: Define GC_USE_DLOPEN_WRAP with redirect-malloc.
* pthread_support.c: Fix comment spelling.
* include/private/gcconfig.h: Define USE_PROC_FOR_LIBRARIES with
GC_LINUX_THREADS and REDIRECT_MALLOC.
* tests/smash_test.c: Initial check-in.
* obj_map.c: Print log entry to correct file.
* include/private/thread_local_alloc.h: Add TlsAlloc error check.
* alloc.c (GC_stopped_mark): Call GC_add_current_malloc_heap()
while world is still running.
* os_dep.c (GC_is_heap_base): Don't call GC_add_current_malloc_heap()
with world stopped.
* include/gc.h (GC_INIT for cygwin): Always call GC_add_roots.
* misc.c (GC_init/GC_init_inner): Perform all work in
GC_init_inner.
* Makefile.direct: Expand -DUSE_MUNMAP comment.
* include/gc.h: Define uintptr_t explicitly for VC++6.
* msvc_dbg.c (GetModuleBase): Revert to strcat if strcat_s doesn't
exist.
== [7.0] 2007-07-02 ==
* include/gc_config_macros.h: Also check for IA64 when setting
GC_HPUX_THREADS.
* mallocx.c: Change my_bytes_allocd to signed_word.
* include/gc_pthread_redirects.h: Remove obsolete Solaris threads
(as opposed to pthreads) support.
* mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext()
on ARM/Linux. Check getcontext() return value.
* backgraph.c (per_object_func): Make argument types consistent.
(GC_traverse_back_graph): Mark GC_deepest_obj.
* finalize.c (GC_finalize): Change dl_size and fo_size to size_t.
* os_dep.c (GC_win32_get_mem): Add GC_mem_top_down option.
* doc/README.win32, doc/README, README.QUICK: Fix some of the worst
anachronisms.
* dyn_load.c: Partially support cygwin, but don't enable it yet.
* Makefile.am: Use -no-undefined for libgc.
* Makefile.direct: Document USE_PROC_FOR_LIBRARIES.
* dyn_load.c (GC_register_map_entries): Rename prot_buf to prot
consistently.
* misc.c: Fix some WARN calls. Move GC_is_initialized setting and
GC_thr_init() call.
* os_dep.c: Consistently use WARN where appropriate.
* thread_local_alloc.c: Revert change to GC_WIN32_THREADS test. Instead
remove inappropriate pthread.h include.
* doc/README.linux: Remove some anachronisms.
* alloc.c: Also use GC_check_tls on non-Linux systems.
* mallocx.c (GC_reclaim_generic): Remove bogus declaration.
* include/private/gc_priv.h (GC_reclaim_generic): Declare correctly
with prototype.
* alloc.c (GC_adj_bytes_allocd): Avoid (long) casts, fix comment.
(GC_print_heap_sects): Use size_t instead of unsigned long.
* thread_local_alloc.c (GC_lookup_thread): Define in the correct
context.
* win32_threads.c, include/gc_config_macros.h: The last of Romano
Paolo Tenca's patch. Move stdint.h include to gc_config_macros.h.
* include/gc_inline.h: Avoid gc_priv.h dependencies.
* tests/test.c (check_heap_stats): Replace unsigned long with size_t.
* NT_X64_STATIC_THREADS_MAKEFILE: Replace obsolete -debugtype:cv.
* mark_rts.c (GC_push_roots): Fix kind type.
* doc/README.win64: New file.
* doc/doc.am, Makefile.direct: Add README.win64.
* Makefile.am, Makefile.direct: Add NT_X64_STATIC_THREADS_MAKEFILE.
* NT_X64_STATIC_THREADS_MAKEFILE: Fix warning flags.
* allochblk.c, alloc.c, blacklst.c, dbg_mlc.c, dyn_load.c,
finalize.c, headers.c, mach_dep.c, malloc.c, mark.c, misc.c,
obj_map.c, os_dep.c, ptr_chck.c, reclaim.c, typd_mlc.c,
win32_threads.c, cord/de_win.c, include/gc_mark.h,
include/private/gc_hdrs.h, include/private/gc_pmark.h,
include/private/gc_priv.h, tests/test_cpp.cc:
Replace old style function declarations. Clean up integral types.
Remove register declarations. The change in malloc.c and the
"int descr" declaration in mark.c are the most likely to have
been real bugs outside of win64.
* msvc_dbg.c: Disable on win64.
* win32_threads.c: Add AMD64 support.
* include/gc.h: no backtrace on AMD64 for now.
* msvc_dbg.c(GetModuleBase): Replace strcat with strcat_s.
* include/gc.h: (GC_word, GC_signed_word): Fix win64 definitions.
Don't include windows.h in an extern "C" context.
* include/private/gcconfig.h: Fix win64/X86_64 configuration.
* tests/test.c: Eliminate more old style function definitions.
Cleanup pointer and integer casts for win64.
* tests/test_cpp.cc: Don't include gc_priv.h.
* NT_STATIC_THREADS_MAKEFILE: Restrict suffixes for VC++ 2005.
* NT_X64_STATIC_THREADS_MAKEFILE: New.
* win32_threads.c: Separate out DEBUG_WIN32_PTHREADS_STACK. Ignore
FINISHED threads for suspension. (GC_pthread_join): Add
pthread_self() cast. (GC_pthread_start_inner): Execute cleanup
handler when popping it.
* include/private/gc_locks.h: Inline THREAD_EQUAL for
GC_WIN32_PTHREADS. Define USE_PTHREAD_LOCKS only if we have
pthreads.
* gc_dlopen.c, thread_local_alloc.c, threadlibs.c, win32_threads.c,
tests/test.c: Accommodate GC_WIN32_PTHREADS.
* include/gc.h: Don't include windows.h for GC_WIN32_PTHREADS.
* include/gc_config_macros.h: Define both PTHREADS and
GC_WIN32_THREADS.
* include/private/gc_locks.h: Nonstandard definitions of
NUMERIC_THREAD_ID for GC_WIN32_PTHREADS.
* doc/README.win32, Makefile.direct: Include documentation
for GC_WIN32_PTHREADS.
* Makefile.direct: Remove some anachronisms in the documentation.
* Makefile.am: Move includes to bottom. Add better library
dependencies. Increment library version. Remove "SUBDIRS += .".
* cord/cord.am, tests/tests.am: Add better library dependencies.
Remove now unnecessary dependencies.
* include/gc.h (GC_beginthreadex, GC_endthreadex, GC_ExitThread):
Move to define on all Windows platforms. (_beginthread): define
to generate error if used.
* include/private/gc_locks.h: Format to 80 columns.
* malloc.c(GC_free): Ignore bad frees on MSWIN32 with REDIRECT_MALLOC.
* NT_MAKEFILE: msvc_dbg.h is in include/private. Don't use cvars
rc.
* misc.c (WIN32 GC_write): Define GC_need_to_lock in single-threaded
case.
* win32_threads.c: Test for __MINGW32__ in addition to _MINGW_VER.
(GC_CreateThread, GC_beginthreadex): Deallocate args even if we fail.
* include/gc.h: Add GC_reachable_here(). (GC_WinMain): Add GC_API.
(GC_beginthreadex, GC_endthreadex, GC_ExitThread): Declare.
* tests/test.c: Add GC_reachable_here() call.
* alloc.c (GC_try_to_collect): Call GC_init if necessary.
* tests/thread_leak_test.c: Don't unconditionally define
GC_LINUX_THREADS.
* Makefile.am: Remove extra_ldflags_libgc definition.
* include/private/gc_priv.h: Define AO_REQUIRE_CAS.
* finalize.c (GC_unreachable_finalize_mark_proc): Don't return void
value.
== [7.0alpha9] 2007-05-15 ==
* Some gc6.9 changes.
* Change FindTopOfStack decl in darwin_stop_world.c.
* Move some static tests from misc.c to gcconfig.h. Use #error.
* Add GC_print_free_list() function (thanks to Bruce Hoult).
* Add GC_GNU_THREADS support on HURD (thanks to Aleksey Demakov,
Barry DeFreese, and possibly other Debian maintainers).
* __GNUC__ was misspelled as __GNUC in thread_local_alloc.h (thanks to
Peter Wang).
* Integrated various MacOSX patches and tried to reconcile them (thanks to
Allan Hsu, several contributors at Apple, and probably others).
* Added some casts to powerpc.h in libatomic_ops to silence warnings.
* Makefile.am: Include NT_STSTIC_THREADS_MAKEFILE in dist.
* include/private/gc_locks.h: GC_compare_and_exchange, GC_atomic_add:
remove. NUMERIC_THREAD_ID, THREAD_EQUAL: New. GC_lock_holder: now
unsigned long. I_DONT_HOLD_LOCK, I_HOLD_LOCK: Update.
* pthread_stop_world.c, pthread_support.c, win32_threads.c: Use
NUMERIC_THREAD_ID, THREAD_EQUAL.
* include/private/gcconfig.h: GENERIC_COMPARE_AND_SWAP: Remove.
* include/private/thread_local_alloc.h: Don't USE_COMPILER_TLS on
ARM.
* dbg_mlc.c, include/gc.h, finalize.c: Merge Alexandre Oliva's
GC_debug_register_finalizer_unreachable() patch from gcc tree.
* thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Add assertions
to check GC has been initialized.
* include/gc_cpp.h: Documentation updates.
* include/gc_config_macros.h: Don't check for __ppc__ to set
DARWIN_THREADS.
* Makefile.am: Include configure_atomic_ops.sh in dist.
* Makefile.am: Don't distribute copied atomic_ops files. Include
libatomic_ops with "make dist".
* configure.ac: Enable THREAD_LOCAL_ALLOC for Cygwin with threads.
* win32_threads.c: Report error for Cygwin + GC_DLL.
* Makefile.direct: Update THREAD_LOCAL_ALLOC documentation.
* cord/de_win.c: Rename and move AboutBox. Call GC_INIT. Remove
MakeProcInstance anachronism.
* doc/README.macros: Officially remove elif prohibition.
Remove documentation for defunct SRC_M3 support.
* include/gc.h: Remove more SRC_M3 references.
* include/private/gcconfig.h: Remove still more SRC_M3 references.
GC_SOLARIS_THREADS no longer needs to be checked separately.
* thread_local_alloc.c, include/private/thread_local_alloc.h:
Spell __declspec correctly.
* NT_STATIC_THREADS_MAKEFILE: Enable thread-local allocation.
* doc/README.win32: Adjust GC_win32_dll_threads rules again.
* mark.c (GC_mark_some wrapper): Restructure for readability, handle
GC_started_thread_while_stopped.
* misc.c (Win32 GC_write): Lock GC_write_cs only if needed.
* win32_threads.c: (client_has_run): remove,
GC_started_thread_while_stopped, GC_attached_thread: add.
(GC_push_all_stacks): Add verbose output.
(DllMain): Avoid initializing collector or the like.
Never update both thread tables.
* doc/README.win32: Adjust GC_win32_dll_threads rules.
* pthread_stop_world.c (GC_push_all_stacks): Print thread count with
GC_PRINT_VERBOSE_STATS.
* configure.ac: Comment out redundant
AC_DEFINE(NO_EXECUTE_PERMISSION).
* sparc_mach_dep.S: Remove single quote in comment.
* include/private/gcconfig.h: Fix DATAEND for NONSTOP.
* win32_threads.c: Include stdint.h for Mingw. Add GC_API for DllMain.
(GC_use_DllMain): Fix assertion.
* configure.ac: Introduce extra_ldflags_libgc. Use it for Darwin.
* Makefile.am (libgc_la_LDFLAGS): Use extra_ldflags_libgc.
* include/private/gcconfig.h: Enable MPROTECT_VDB for all Darwin
targets. Remove comments.
Prepare ppc64 support for Darwin.
* darwin_stop_world.c (GC_push_all_stacks): Fix compiler warnings.
Make i unsigned.
(GC_stop_world): Likewise. Remove unused GC_thread p.
(GC_start_world): Likewise.
* os_dep.c: Define GC_darwin_register_mach_handler_thread extern.
Remove double SIG_HNDLR_PTR definition.
(GC_forward_exception): Fix compiler warnings, make i unsigned.
Initialize thread_state to NULL.
(catch_exception_raise): Fix compiler warnings, make i unsigned.
* include/private/gc_priv.h (NEED_FIND_LIMIT, FREEBSD variant):
also define for X86_64.
* configure.ac: Move generic gnu (Hurd) case to below kfreebsd case.
* README.changes: Point to ChangeLog.
* darwin_stop_world.c: Move THREAD_FLD defines to ...
* include/private/gc_priv.h: ... here.
Fix THREAD_STATE definitions for ppc64.
* os_dep.c (catch_exception_raise): Use THREAD_FLD for exc_state member
access.
* configure.ac (i586-darwin): Replaced HAS_I386_THREAD_STATE_* with
HAS_X86_THREAD_STATE32_*.
(x86_64-*-darwin*): Extended the above check for x86_64-*-darwin* with
HAS_X86_THREAD_STATE64_*.
Added value 1 in the above AC_DEFINE's. Important for the upcoming
Leopard.
* include/private/gcconfig.h: Modified X86_64 define for Darwin.
Removed __x86_64__ check in POWERPC section. Added base definitions
for the X86_64 Darwin port.
* include/private/gc_priv.h: Added GC_MACH_HEADER and GC_MACH_SECTION
to distinguish between 32 and 64-bit applications. Added definitions
for X86_64 Darwin.
* darwin_stop_world.c: Added HAS_X86_THREAD_STATE64___RAX. And
replaced HAS_I386_THREAD_STATE___EAX with HAS_X86_THREAD_STATE32___EAX.
(GC_push_all_stacks): Added code for X86_64 Darwin. Even for the
!DARWIN_DONT_PARSE_STACK. Maybe obsolete.
* dyn_load.c (GC_dyld_name_for_hdr): Use GC_MACH_HEADER.
(GC_dyld_image_add): Use GC_MACH_HEADER and GC_MACH_SECTION.
Distinguish between getsectbynamefromheader_64 and
getsectbynamefromheader.
* os_dep.c (catch_exception_raise): Introduce exception definition for
X86_64 Darwin. Replaced old i386_EXCEPTION_STATE_* definition with
x86_EXCEPTION_STATE32_*. Add X86_64 for exc_state.faultvaddr.
== [7.0alpha7] 2006-09-19 ==
* More 6.7 changes.
* Declare GC_dump() in gc.h.
* Add --enable-large-config, which just defines the LARGE_CONFIG macro.
* Make GlobalAlloc address alignment a bit more intuitive (thanks to
Charles Mills).
* Use #elif in the definitions of GET_MEM.
* Overhaul porting.html. Remove corresponding text from README.
* Fix typo in DARWIN section of gcconfig.h.
* Fix Darwin thread memory leak (thanks to Bruce Mitchener).
* Update x86 AO_test_and_set implementation to use "=q".
* Add $(EXEEXT) to many tests in tests/tests.am. (Corresponds to a
6.7 fix, which no longer applied.)
* Fix Darwin/PPC port.
* Fix Cygwin/threads port.
* Fix gcj malloc support.
* For GNU-style make, don't build libatomic_ops unless threads are requested.
This should allow single-threaded builds on platforms which do not
currently support libatomic_ops.
* Clean up and hopefully fix the CFLAGS calculation for GNU build.
(Substantially improves things on HP/UX.)
* Integrated Andrei Polushin's Visual C++ patches. These provide for
stack traces, better C++ debug support, and better log file handling.
Note that these change the location of the log file to a the path of the
executable with a .log extension. To get the old behavior back, define
OLD_WIN32_LOG_FILE. For the time being, I'm checking his project
files and the like into a windows-untested subdirectory. They
are almost certainly already out of date, but better than what we had
before.
* Fixed some win32 threads bugs, and added support for _beginthreadex.
* Fix zero size thread local allocation so that explicit deallocation
works correctly.
* Removed serious bug in GC_malloc_uncollectable(large size).
* Do not try to do thread-local gcj allocation in incremental mode. There
are races in setting up the descriptor.
* Add GC_INIT() to middle.c, fix some more GC_printfn calls.
* Some assertions erroneously used I_HOLD_LOCK() negatively, even though
it can now spuriously return TRUE.
* Rename SUNOS5 macro and OS name to SOLARIS and SUNOS5DL to SOLARISDL.
* On Linux and some Un*x variants, allocate memory by first trying sbrk,
and then switching to mmap if that fails.
* Fixed /proc/x/maps reading to deal with asynchronous deletions.
* Fix REDIRECT_MALLOC with threads on Linux. It now usually seems to work
with ugly hacks that include having calloc behave differently when it is
called from ld.so or the pthreads library. A reasonable amount of
infrastructure was added to support some of this. (Thanks to Roland McGrath
for ideas and information.)
* Import various updated build scripts.
* Add GC_register_has_static_roots_callback (thanks to Andrew Haley).
* Fix serious bugs in GC_malloc_atomic_uncollectable().
* Return GC_SUCCESS form GC_get_stack_base().
* Fix several atomic_ops problems on IA64 with HP Compiler.
* Update to atomic_ops-1.2.
* Fix hb_n_marks description and reclaim.c assertion.
* Various additional win32 threads fixes.
* Enable GC_ASSERTIONS for Debug build with NT_THREADS_MAKEFILE.
== [7.0alpha5] 2005-09-29 ==
* More 6.6, 6.7 changes.
* Some Solaris fixes, including some more general changes in how
the assembly pieces of mach_dep.c are handled.
* Removed a lot of SOLARIS_THREADS-specific code that was only
needed with the old implementation. This included many (mostly no-op)
versions of GC_is_fresh.
* Don't use atomic_ops in gc_locks.h unless we need threads.
* Fixed USE_MARK_BITS, which is once again the default without PARALLEL_MARK.
* Removed Solaris GC_INIT hack. It's a workaround for a long dead bug,
and it seemed to be wrong anyway.
* Changed win32_threads.c to require preprocessor-based interception
of thread routines by default. A client call to GC_use_DllMain is
now required to get the old behavior in which DllMain is used to implicitly
register threads. This was done for uniformity with other platforms, and
because the DllMain solution seemed to require very tricky code which,
at least in the past, imposed hard bounds on the number of threads.
* Many small changes to make thread support work again on Cygwin.
* Moved definition of allocator lock etc. to pthread_support.c and
win32_threads.c for those two cases.
* Got rid of the FASTLOCK() machinery. It doesn't seem useful on modern
platforms.
* Cleaned up the uncollectible allocation routines, speeding up the
slower paths. The code did enough unnecessary work off the critical path
that the underlying logic was getting hard to extract.
* No longer turn off THREAD_LOCAL_ALLOC with DBG_HDRS_ALL. Indications
are it just works, and I think the reasons for it not working disappeared
a while ago.
* Fixed bugs in hb_n_marks calculation and assertion.
* Don't use __builtin_expect for pre-3.0 gcc.
* Define GWW_VDB only for recent Microsoft tool chains.
* Add overview.html to doc directory.
* Fix NT_STATIC_THREADS_MAKEFILE, various compiler warnings.
* Made thread local allocation sort of work with Cygwin. The code should
be there to deal with other Windows variants, But non-Cygwin Windows
threads need more bug fixes.
== [7.0alpha4] 2005-08-02 ==
* Various 6.5, 6.6 changes.
* Removed GC_brief_async_signal_safe_sleep and used atomic_ops instead
(thanks to Ben Maurer).
* Integrated build patches from Davide Angelocola and Petter Urkedal.
* Fix dynamic-linker-based pthread call redirection.
* Renamed RS6000 to POWERPC/AIX.
* Allow recovery from SIGSEGV in marker on Linux. This works around
a race in thread stack marking if /proc is used to find roots. We do
that by default with malloc redirection and threads. This involved
moving some GC_find_limit and SETJMP related declarations to gc_priv.h.
* Added doc/porting.html file.
* Added ADD_HEAP_GUARD_PAGES for sbrk/*nix platforms to debug extreme
memory overwrite errors.
* Added trivial NO_INCREMENTAL flag to facilitate debugging.
* Added GC_getattr_np-based GC_get_stack_base (untested).
* Separated thread local allocation into a separate file and added the
beginning of win32 support for that.
== [7.0alpha3] 2005-04-28 ==
* Added support for dlopen-based interception of pthread functions.
This is only half done. The gc.h redefinitions currently interfere.
* Integrated major automake overhaul from Petter Urkedal.
== [7.0alpha2] 2005-04-07 ==
* GC_bytes_allocd was incremented by a possibly uninitialized variable
in GC_generic_malloc_inner. (Bug introduced in gc7.0alpha1. Thanks
to Ben Hutchings for tracking it down.)
* Win32 fixes (thanks to Ben Hutchings and Maurizio Vairani).
* Integrated Ben Hutchings' GetWriteWatch-based virtual dirty bit
implementation for win32.
* Removed pc_gc.tar and floppy targets in Makefile.direct. Removed
pc_excludes file.
* No longer include GC_bytes_wasted when evaluating allocation progress.
Since we are now counting live memory, it no longer makes sense.
* Applied Davide Angelocola's configure patch. There are now separate
Makefile.am's in the cord and tests subdirectory, more tests, etc.
* Renamed configure.in to configure.ac.
* Merged a very small number of Nathanael Nerode's configure.ac
cleanups from the gcc tree. Unfortunately, that file is a bit
different from ours.
* Changed EINTR handling in sem_wait slightly.
* Restructure the root marking code. Remove all traces of
USE_GENERIC_PUSH_REGS, and effectively make it the default.
Make it easier to pass a context pointer to the mark routine, in
case we ever want to do precise stack marking.
* Replace GC_start_blocking() and GC_end_blocking() with GC_do_blocking().
This remains undocumented, and only implemented for pthreads. But it
removes an otherwise unavoidable race with stores of callee-save
registers.
* Fix GC_n_mark_bits for the default MARK_BIT_PER_GRANULE case. This
resulted in bogus complaints in heap dumps.
* Upgrade to libatomic_ops-1.0, and update build structure to match.
* Remove SRC_M3 support. Clean up lock initialization code in misc.c.
* Removed gc_local_alloc.h. If THREAD_LOCAL_ALLOC is defined, the
thread local allocation routines are now called automatically.
* Renamed gc_inl.h back to gc_inline.h. Changed the interface appreciably
since locking has turned into a dominant issue, and in-line allocation
only makes sense if it's no worse than thread-local allocation.
Gc_inline.h is now also used to implement thread-local allocation.
* Finished replacing stubborn allocation with manual write barrier.
Untested.
* Use thread-local allocation code by default.
* Added GC_register_my_thread and friends for Posix and win32.
* Patch for GWW_VDB from Ben Hutchings.
* Removed explicit THREAD_LOCAL_ALLOC tests, since that now always
redefines GC_malloc.
* Removed now unused AIX memory allocation code.
* Various minor fixes for bugs introduced in 7.0alpha1.
== [7.0alpha1] 2004-11-09 ==
* Remove GC_PROTO, VOLATILE, GC_PTR, and GC_CONST. Assume ANSI C compiler
and use ANSI constructs unconditionally.
* Introduce #elif and #error in some of the appropriate places.
* Remove GC_printf cruft. Use stdargs.
* Remove separate Solaris threads support. Use the more generic Posix
implementation.
* Use atomic_ops for atomic operations and memory barriers.
* Clean up MPROTECT_VDB implementation. Use SA_SIGINFO wherever
possible.
* Remove broken SIGNALS stuff.
* Use size_t instead of word, where appropriate.
* Add .S.o rule to Makefile.am.
* Officially discontinue SunOS4, several old flavors of M68K (SunOS4,
A/UX, HP), IBM PC/RTs and RISCOS/Irix4. (I doubt the old code worked.
If anyone cares, these should be easy to resurrect.)
* Add EXPECT() in some critical places.
* Redefined hb_sz and hb_body to deal with bytes rather than words.
This affected a great deal of code. I would like to consistently use
byte offsets and sizes where there's not a convincing reason to do
otherwise.
* Redefined several other variables (GC_mem_found, GC_words_allocd)
etc. to use units of bytes. Most of these were also renamed to
reflect that fact.
* Killed as many "register" declarations as possible.
* Partially replaced stubborn allocation with manual write barrier.
It's currently broken.
* Restructured mark code, to allow mark bits to be kept either on
a per allocation granule or per object basis. The emphasis is
now on the -DUSE_MARK_BYTES option, since individual bits perform
quite badly on hyper-threaded P4s, and are probably suboptimal on
other architectures. -DUSE_MARK_BITS is currently broken, and may
be resurrected only for the single-threaded case. This significantly
reduced the cache footprint required by auxiliary GC data structures.
It also reduces space overhead for small heaps. It probably slows
things down slightly if interior pointers are very common.
* As part of the above, we now maintain an approximate count of set
mark bits in each heap block.
* As part of the above, the semantics of hb_map changed drastically.
For MARK_BIT_PER_OBJ, it doesn't exist. For MARK_BIT_PER_GRANULE,
it is purely a way to replace a mod instruction with a table lookup.
(Somewhat to my surprise, this still wins on modern hardware.)
* Removed PRINTSTATS, GATHERSTATS, and SILENT macros. Everything is
now controlled by GC_print_stats variable and GC_PRINT_STATS
and new GC_PRINT_VERBOSE_STATS environment variables.
* Add GC_log_printf and use it consistently for logging output.
* Unconditionally count the objects we reclaim in the sweep phase.
For thread local allocation, we need that anyway, and we expect
that's increasingly the only case that matters. And it simplifies
the code. In general expect minor performance hacks that benefit
only the single-threaded case to disappear.
* Remove GC_quiet from gc.h and elsewhere.
* Changed the heap expansion heuristic, and the definition of
GC_free_space_divisor, to refer to live data size, instead of total
heap size. I believe this is much more robust. It wasn't previously
possible, because we didn't have access to live data size.
* Thread local allocation added the extra byte in twice: Once in
thread_local_alloc, and once in malloc_many.
* Removed GC_malloc_words_small and GC_gcj_fast_malloc. A new
mechanism based on the thread local allocation data structures
is expected to be added instead. This should allow inlined code
that is both fast and doesn't rely on collector internals.
* Changed both free lists and reclaim lists to be indexed by granules
instead of words, norming halving their size.
* MERGE_SIZE is now the only option, and the macro was removed.
(Without it, we need a memory reference to GC_all_interior_pointers
anyway. Thus it costs us nothing.)
* Change GC_size_map to map to granules instead of words. Make sure
that every possible size up to TINY_FREELISTS is present.
* Split of macros need for fast inline allocation into gc_tiny_fl.h
in anticipation of a new inline allocator that doesn't rely on GC
internals.
* Changed thread local allocation to use GRANULE_BYTES and TINY_FREELISTS
in anticipation of a merge with the inline allocation code.
* Removed ALIGN_DOUBLE. This is mostly handled by GRANULE_BYTES.
* Make locking on most platforms conditional on GC_need_to_lock.
== [6.9] ==
* Fix typo in PREFETCH implementation for X86_64 (thanks to Peter Wang).
* Fix M68K LINUX port (thanks to Debian packagers).
* __GNUC__ was misspelled as __GNUC in new_gc_alloc.h (thanks to Peter Wang).
* Integrated Allan Hsu's patch for OS X VM deallocation problems.
* Applied FreeBSD/X86_64 patch.
== [6.8] 2006-07-08 ==
* Added some support for Dragonfly BSD (thanks to Joerg Sonnenberger and
Thomas Klausner).
* Improvements to the HP/UX section of configure.in/configure.ac (thanks
to Andreas Tobler).
* GC_unix_get_mem could neglect to release the malloc lock on Irix, under
extremely unlikely circumstances. (Thanks to Jean-Baptiste Nivois for
some careful code inspection.)
* Added support for kFreeBSD + glibc (thanks to Petr Salinger).
* Fix more MacOS threads memory leaks (thanks to Allan Hsu).
* Added initial Solaris/X86-64 support (thanks to Rainer Orth).
== [6.7] 2006-03-03 ==
* Add "int" to Solaris "end" and "etext" declaration in gc.h. Declared
the symbols with underscores and as arrays, since that's what's actually
used. Perhaps this could all just be removed. (Thanks to John Bowman.)
* Fixed ARM GC_test_and_set code (thanks to Kazu Hirata and Paul Brook).
* Added casts for assignments to hb_last_reclaimed, which truncate the
value. Added a cast to GC_adj_words_allocd. Use GetModuleHandleA
when retrieving a handle to kernel32.dll under win32.
* Added Tandem S-Series support. (Thanks to Craig McDaniel. A modified
version of his patch was applied, and hence breakage is probably not
his fault.)
* Remove spurious gc:: qualifier for operator delete[] in gc_cpp.h (thanks
to Hanno Boeck).
* Changed a test for LINUX in config_macros.h to one for __linux__.
* Add prototypes for GC_finalizer_notifier and GC_thr_init (thanks to
David Ayers).
* Use ld instead of nonexistent ldz instruction in Darwin FindTopOfStack
(thanks to Andreas Tobler).
* Add support for Darwin/X86 (thanks to Geoff Norton and the Mono
developers).
* Merge in some recent gcc fixes. Add ppc64 asm code. (Thanks to
Bryce McKinlay and other GCJ developers.)
* Scan MEM_PRIVATE sections under Windows ME and predecessors.
* Interior pointers with some largish offsets into large objects could
be ignored, if GC_all_interior_pointers was set. (Oddly this worked
correctly for stack references if it was not set. Otherwise it failed
for both stack and heap references. Thanks to Andrew McKinlay for the
critical test case.)
* Integrated Tatsuya Bizenn's NETBSD threads support, with some
untested changes.
* Added GC_strdup and friends to make leak detection work correctly
for strdup clients (thanks to Jon Moore). Fixed the existing strdup
with malloc redirection to handle a null malloc return correctly.
== [6.6] 2005-09-09 ==
* Fix CPU count detection for Irix and FreeBSD (thanks to Dan Bonachea).
* Integrate Dan Bonachea's patch for the IBM XLC compiler on Darwin.
* Integrated Andreas Tobler's FreeBSD/PowerPC patch.
* Don't access the GC thread structure from the restart handler. It's
unsafe, since the handler may run too late. (Thanks to Ben Maurer for
tracking this down.)
* Applied Christian Thalinger's patch to change comment syntax in
alpha_mach_dep.S.
* Added test for GC_no_dls in GC_dyld_image_add for DARWIN (thanks to
Juan Jose Garcia-Ripoll).
* Use LINUX_STACKBOTTOM for Linux/SH and LINUX/ARM (thanks to
Sugioka Toshinobu and Christian Thalinger).
* Rewrote GC_parse_map_entry. This assumed a fixed column layout of
/proc/self/maps on Linux. This ceased to be true about 2 years ago.
The old code is probably quite problematic with -DREDIRECT_MALLOC. It
is also used by default for IA64, though I haven't seen actual failures
there.
* More consistently define HBLKSIZE to 4096 on 64 bit architectures with
4K pages (thanks to Andrew Haley).
* With win32 threads, GC_stop_world needs to acquire GC_write_cs (thanks
to Ben Hutchings for the observation and patch).
* Move up struct callinfo declaration to make gcc 4.0.2 happy.
== [6.5] 2005-05-22 ==
* Integrated Paolo Molaro's patch to deal with EINTR in sem_wait.
* Make GC_approx_sp() write to dummy location to ensure that stack
is grown here, when sp looks reasonable, rather than later, when
it might look like a bad memory reference. (Problem was never
observed that I know of. But on rereading the code it seemed
dubious.)
* Separate out GC_with_callee_saves_pushed and sometimes call
it from GC_suspend_handler in pthread_stop_world.c. Callee-save
register values sometimes failed to get traced under HP/UX on
PA-RISC. Linux/IA64 had the same problem, though non-stacked
callee-save registers seem to be so rarely used there that nobody
ever noticed.
* Integrated an ancient Darwin powerpc_darwin_machine_dep.s patch
from Andreas Tobler, which I had lost.
* Fix compare_and_exchange implementation for gcc/IA64 to deal with
pickier compiler versions.
* Fixed Itanium 32-bit ABI support (HP/UX). In particular, the
compare_and_exchange implementation didn't consider that possibility.
* Undefine GC_pthread_detach in win32_threads.c (thanks to
Tommaso Tagliapietra).
* Fixed inclusion of frame.h for NETBSD in os_dep.c.
* Applied Dan Bonachea's patch to use mmap on AIX.
* Several fixes to resurrect the Irix port on recent OS versions.
* Change ALPHA to use LINUX_STACKBOTTOM.
* Change SPARC64/LINUX to also use LINUX_STACKBOTTOM. Deal with potential
bad values of __libc_stack_end on that platform (thanks to David Miller).
* Relax gctest to allow larger heap if ALIGN_DOUBLE isn't set.
(Unnecessary in 7.0)
* Force a define of __STDC__=0 for the IBM compiler on AIX, so that
we get prototypes. (Unnecessary in 7.0)
* GC_INIT definition for AIX and CYGWIN referred to DATASTART and DATAEND
which are only defined in private include files.
* Integrated some small gcconfig.h patches from Dan Bonachea. Also
relaxed assertion about FreeBSD stack size in pthread_support.c.
* Integrated Andrew Begel's darwin_stop_world.c patch for 64-bit
support. This may need additional work.
* Avoided potentially infinite recursion in GC_save_callers if
the system backtrace calls malloc. The workaround currently requires
__thread support if this code is used with threads.
* Avoided another similar infinite recursion by conditionally
invoking GC_save_callers in alloc.c (thanks to Matthias Andree
for helping to track down both of these).
* Removed all traces of aix_irix_threads.c. AIX and Irix now use
pthread_support.c and pthread_stop_world.c. The old code appeared
to be unreliable for AIX, and was not regularly maintained.
* On Irix, ignore segments with MA_FETCHOP or MA_NOTCACHED attributed;
they're not always safe to read.
* Fixed a previously vacuous assertion (diagnosed by the SGI compiler)
in GC_remove_from_fl.
* Fix stack_size assertion in GC_pthread_create.
* Fix assertion in GC_steal_mark_stack.
== [6.4] 2004-12-21 ==
* Merge gcconfig.h changes from gcc tree.
* Unconditionally include gc_priv.h in solaris_pthreads.c, win32_threads.h,
aix_irix_threads.c, and solaris_threads.c to get thread definitions.
* Start marker threads in GC_thr_init, so that they get started even
if no other threads are ever started. (Oddly enough, the parallel
collector worked correctly, though not well, with no helper threads.)
* Go ahead and split large blocks in GC_allochblk_nth if GC_dont_gc
is set (thanks to Alexander Petrossian).
* GC_PRINT_BACK_HEIGHT would deadlock with thread support.
* Let in_progress_space in backgraph.s grow dynamically.
* Fix README.solaris2. The GC_thr_init() hack doesn't work anymore.
* Convert GC_finalizer_mem_freed to bytes in allchblk.c.
* Add missing declaration for GC_generic_malloc_words_small_inner.
Without it, s390x breaks. (Thanks to Ulrich Weigand.)
* Applied several MacOSX patches to support older tool chains (thanks
to Stefan Ring).
* Bug fix for NetBSD/amd64 (thanks to Marc Recht).
* Add NetBSD/sh3 support (thanks to Uchiyama Yasushi).
* Fixed an uninitialized variable in cordprnt.c.
* Eliminated some, but not all, gcc -Wall warnings.
* Changed some old style casts to reinterpret_cast in new_gc_alloc.h
(thanks to Dan Grayson).
* GC_extend_size_map shouldn't adjust for GC_all_interior_pointers if
GC_DONT_ADD_BYTE_AT_END is set.
* Changed some (long) casts to (word) in preparation for win64 (thanks
to Peter Colson).
* Changed "int stack_size" declaration in pthread_support.c to use
size_t. (Only mattered with GC_ASSERTIONS enabled.)
* Added CRIS (etrax) support (thanks to Simon Posnjak and Hans-Peter Nilsson).
* Removed GC_IGNORE_FB frame buffer recognition, and replaced
it with a check that the mapping type is MEM_IMAGE.
In theory, this should work much better, but it is a high
risk change for win32. (Thanks to Ashley Bone for the crucial
experimental data behind this, and to Rutger Ovidius for
some further experiments.)
* GC_allochblk_nth incremented GC_words_wasted by bytes rather than
words.
* Consider GC_words_wasted in GC_adj_words_allocd only if it is within
reason. (A hack to avoid some extremely unlikely scenarios in which
we manage to allocate only "wasted" space. 7.0 has a better fix.)
* Changed PowerPC GC_clear implementation to use lwsync instead of
eieio, since the documentation recommends against eieio, and
it seems to be incorrect if the preceding memory op is a load.
* Fixed print_block_list to print the correct kind number for
STUBBORN (thanks to Rutger Ovidius).
* Have configure.in generate an error if it is asked to support
pthreads, but doesn't know how to.
* Added Kazuhiro Inaoka's patch for Renesas M32R support.
* Have the GNU build mechanism link with -ldl. Rename THREADLIBS
to THREADDLLIBS to reflect this. (Thanks to Sven Verdoolaege.)
* Added Hannes Mehnert's patch for FreeBSD/SPARC support.
* Merged some FreeBSD specific patches to threadlibs.c and dyn_load.c.
(Thanks to John Merryweather Cooper.)
* Define MPROTECT_VDB on MACOSX only if threads are being used, since the
dirty page tracking mechanism uses threads. (This avoids an undefined
reference to _GC_darwin_register_mach_handler_thread.)
* By popular demand, use __libc symbols only if we are built with
USE_LIBC_PRIVATES, which is off by default, and not otherwise documented.
* Ignore GC_enable_incremental() requests when KEEP_BACK_PTRS is set.
The GC itself will dirty lots of pages in this cases, probably making
it counterproductive on all platforms. And the DARWIN port crashes.
== [6.3] 2004-07-08 ==
* Compile test_cpp.cc with CXXCOMPILE instead of COMPILE.
* Very large allocations could cause a collector hang. Correct
calculation of GC_collect_at_heapsize.
* GC_print_hblkfreelist printed some bogus results if USE_MUNMAP
was defined.
* Include gc_config_macros.h in threadlibs.c.
* Correct MacOSX thread stop code (thanks to Dick Porter).
* SMALL_OBJ definition was off by one. This could cause crashes
at startup. (Thanks to Zoltan Varga for narrowing this down to
a trivial test case.)
* Integrate Paolo Molaro's patch to deal with a race in the Darwin
thread stopping code.
* Changed X86_64 implementation to use SA_SIGINFO in the MPROTECT_VDB
implementation. The old approach appears to have been broken by
recent kernels.
* Added GC_ATTR_UNUSED to eliminate a warning in gc_allocator.h (thanks
to Andrew Begel).
* Fix GC_task_self declaration in os_dep.c (thanks to Andrew Pinski).
* Increase INITIAL_BUF_SZ in os_dep.c for Solaris /proc reads.
== [6.3alpha6] 2004-05-06 ==
* Define USE_GENERIC_PUSH_REGS for NetBSD/M68K.
* Fixed the X86_64 PREFETCH macros to correctly handle ia32e (which uses
different prefetch instructions from AMD64). (Thanks to H.J. Lu.)
* GC_config_macros.h did not correctly define GC_WIN32_THREADS from
GC_THREADS.
* Added simple_example.html.
* Merged Andrew Gray's patch to correctly restore signal handlers on
FreeBSD.
* Merged a patch from Andreas Jaeger to deal with prefetch-related warnings
on x86-64. Added some other casts so that the PREFETCH macros
always get a ptr_t argument. Removed some casts in the PREFETCH
implementations.
* Added a header guard for gc_allocator.h and changed GC_debug_free to
clobber contents of deallocated object (suggested by Jesse Jones).
* The signal masking code in pthread_stop_world.c contained some errors.
In particular SIGSEGV was masked in the handler, in spite of the fact that
it wrote to the heap. This could lead to an uncaught SIGSEGV, which
apparently became much more likely in Linux 2.6. Also fixed some
typos, and reduced code duplication in the same area.
* Remove ltconfig, clean up configure messages for DG/UX (thanks to
Adrian Bunk for the patches).
* Integrated NetBSD/OpenBSD patches from Marc Recht and Matthias Drochner.
== [6.3alpha5] 2004-03-30 ==
* Fix & vs && typo in GC_generic_malloc and
GC_generic_malloc_ignore_off_page. (Propagated from the gcc tree.)
* Removed SA_NODEFER hack from NetBSD and Solaris write-protect handler.
(According to Christian Limpach, the NetBSD problem is fixed.
Presumably so is the Solaris 2.3 problem.)
* Removed placement delete from gc_cpp.h for the SGI compiler (thanks
to Simon Gornall for the patch).
* Changed semantics of the GC_IGNORE_FB environment variable, based
on experimentation by Nicolas Cannasse pointing out that the old
interpretation was useless. We still need help in identifying win32
graphics memory mappings. The current "solution" is a hack.
* Removed "MAKEOVERRIDES =" from Makefile.am and thus Makefile.in.
It probably made more sense in the gcc context.
* Explicitly ensure that NEED_FIND_LIMIT is defined for {Open,Net}BSD/ELF.
* Replaced USE_HPUX_TLS macro by USE_COMPILER_TLS, since gcc often
supports the same extension on various platforms.
* Added some basic (completely untested) defines for win64, in support
of future work.
* Declared GC_jmp_buf in os_dep.s as JMP_BUF instead of jmp_buf, fixing
a memory overwrite bug on Solaris and perhaps other platforms.
* Added 0 != __libc_stack_end test to GC_linux_stack_base (thanks to
Jakub Jelinek for the patch and explaining the problem).
Otherwise pre-linking could cause the collector to fail.
* Changed default thread local storage implementation to USE_PTHREAD_SPECIFIC
for HP/UX with gcc. The compiler-based implementation appears to work
only with the vendor compiler.
* Export GC_debug_header_size and GC_USR_PTR_FROM_BASE from gc_mark.h,
making client mark code cleaner and less dependent on GC version.
* Export several new procedures and GC_generic_malloc from gc_mark.h
to support user-defined kinds. Use the new procedures to replace existing
code in gcj_mlc.c and typd_mlc.c.
* Added support for GC_BACKTRACES.
* Fixed a remaining problem in CORD_str with signed characters (thanks
to Alexandr Petrosian for the patch).
* Removed supposedly redundant, but very buggy, definitions of finalizer
macros from javaxfc.h. Fortunately this file probably has no users.
The correct declarations were already in gc.h.
* Also need to set GC_in_thread_creation while waiting for GC during
thread termination, since it is also possible to collect from an
unregistered thread in that case.
* Define NO_GETENV for Windows CE, since getenv doesn't appear to exist.
Plus some other minor WinCE fixes (thanks to Alain Novak).
* Added GC_register_describe_type_fn.
* Arrange for debugging finalizer registration to ignore non-heap
registrations, since the regular version of the routine also behaves
that way.
* GC_gcj_malloc and friends need to check for finalizers waiting to be run.
One of the more obscure allocation routines with missing a LOCK() call.
* Fixed cvtres invocations in NT_MAKEFILE and NT_STATIC_THREADS_MAKEFILE
to work with VS.NET.
* Cleaned up GC_INIT calls in test. Updated gc.man to encourage GC_INIT
use in portable code.
* Taught the GC to use libunwind if --enable-full-debug is specified on
IA64 and libunwind is present.
* The USE_MUNMAP code could get confused about the age of a block and
prematurely unmap it. GC_unmap_old had a bug related to wrapping of
GC_gc_no. GC_freehblk and GC_merge_unmapped didn't maintain
hb_last_reclaimed reasonably when blocks were merged. The code was
fixed to reflect original intent, but that may not always be an
improvement.
== [6.3alpha4] 2004-01-01 ==
* USE_MMAP was broken by confusion in the code dealing with USE_MMAP_ANON.
* Darwin support was broken in alpha3 as a result of my mis-integration of
Andrew Begel's patches. Fixed with another patch from Andrew Begel.
* A new sanity check in pthread_stop_world.c:GC_push_all_stacks() was
overly aggressive. We may collect from an unregistered thread during
thread creation. Fixed by explicitly checking for that case. (Added
GC_in_thread_creation.)
== [6.3alpha3] 2003-12-20 ==
* Removed -DSMALL_CONFIG from BCC_MAKEFILE.
* Changed macros to test for an ARM processor (Patch from Richard Earnshaw.)
* Mostly applied a DJGPP patch from Doug Kaufman. Especially Makefile.dj
had suffered from serious bit rot.
* Rewrote GC_apply_to_maps, eliminating an off-by-one subscript error,
and a call to alloca (for lcc compatibility).
* Changed USE_MUNMAP behavior on POSIX platforms to immediately remap
the memory with PROT_NONE instead of unmapping it. The latter risks
an intervening mmap grabbing the address space out from underneath us.
Updated this code to reflect a cleaner patch from Ulrich Drepper.
* Replaced _T with _Tp in new_gc_alloc.h to avoid a MACOS X conflict.
(Patch from Andrew Begel.)
* Dynamically choose whether or not lock should spin on win32 (thanks
to Maurizio Vairani for the patch). This may be a significant performance
improvement for win32.
* Fix Makefile.direct to actually include NT_STATIC_THREADS_MAKEFILE
in the distribution (thanks to Maurizio Vairani).
* Maybe_install_looping_handler() was accidentally exported, violating
our name space convention.
* Made os_dep.c use sigsetjmp and SA_NODEFER for NetBSD. (Thanks to
Christian Limpach. I generalized the patch to use sigsetjmp on all
UNIX_LIKE platforms, admittedly a slightly risky move. But it may avoid
similar problems on some other platforms. I also cleaned up the definition
of UNIX_LIKE a bit.)
* Integrated Andrew Begel's Darwin threads patch, adjusted according to
some of Fergus Hendersons's comments. (Patch didn't apply cleanly,
errors are possible.)
* Added another test or two for the Intel 8.0 compiler to avoid
confusing it with gcc. The single-threaded collector should now build
with icc, at least on ia64.
== [6.3alpha2] 2003-11-04 ==
* Re-enabled I_HOLD_LOCK assertion in aix_irix_threads.h.
* Put back the WINABI qualifier for GC_CreateThread. (Thanks to
Danny Smith for the patch. 6.3alpha1 had the qualifier in one place
but not elsewhere, which was clearly wrong.)
* Sometimes explicitly define __private_extern__ before DARWIN dyld.h
include. (Thanks to Andreas Tobler for posting the patch.)
* Included signal.h from pthread_support.c. Removed GC_looping_handler,
which was dead code.
* GC_find_start was misdeclared by gc_pmark.h if PRINT_BLACK_LIST was
defined (thanks to Glauco Masotti for testing and reporting this).
Changed GC_find_start to never just return 0. According to its
comment it doesn't, and it's unclear that's correct.
* GC_alloc_large had several largely compensating bugs in the
computation of GC_words_wasted. (It was confused about bytes vs.
words in two places.)
* Integrated Slava Sysoltsev's patch to support more recent versions of
the Intel compiler on IA64/Linux.
* Changed win32 spinlock initialization to conditionally set a spin count.
(Emmanual Stumpf pointed out that enabling this makes a large performance
difference on win32 multiprocessors.) Also cleaned up the win32 spinlock
initialization code a bit.
* Fixed thread support for HP/UX/IA64. The register backing store base for
the main thread was sometimes not set correctly. (Thanks to
Laurent Morichetti.)
* Added -DEMPTY_GETENV_RESULTS flag to work around Wine problem.
* Declare GC_stack_alloc and GC_stack_free in solaris_threads.h to
avoid 64-bit size mismatches (thanks to Bernie Solomon).
* Fixed GC_generic_push_regs to avoid a potential and very unfortunate
tail call optimization. This could lead to prematurely reclaimed
objects on configurations that used the generic routine and the new
build infrastructure (which potentially optimizes mach_dep.c).
This was a serious bug, but it's unclear whether it has resulted in
any real failures.
* Fixed CORD_str to deal with signed characters (thanks to Alexandr Petrosian
for noticing the problem and supplying the patch).
* Merged a couple of NOSYS/ECOS tests into os_dep.c from gcj (thanks
to Anthony Green).
* Partially merged a win32 patch from Ben Hutchings, and substantially
revised other parts of win32_threads.c. It had several problems.
Under MinGW with a statically linked library, the main thread was
not registered. Cygwin detached threads leaked thread descriptors.
There were several race conditions. For now, unfortunately the
static threads limit remains, though we increased it, and made table
traversal cost depend on the actual thread count.
There is also still some code duplication with pthread_support.c.
(Thread descriptors did become much smaller, since Ben Hutchings
removed the thread context from them.)
* Integrated a Solaris configure.in patch from Rainer Orth.
* Added GC_IGNORE_FB and associated warning to very partially address
the issue of the collector treating a mapped frame buffer as part
of the root set. (Thanks to David Peroutka for providing some
insight. More would be helpful. Is there anything that can be used
to at least partially identify such memory segments?)
== [6.3alpha1] 2003-07-26 ==
* Integrated some NetBSD patches by Marc Recht. These
were already in the NetBSD package.
* GC_pthread_create waited for the semaphore even if pthread_create failed.
(Thanks to Dick Porter for the pthread_support.c patch.) Applied the
analogous fix for aix_irix_threads.c.
* Added Rainer Orth's Tru64 fixes.
* The check for exceeding the thread table size in win32 threadDetach
was incorrect (thanks to Alexandr Petrosian for the patch).
* Applied Andrew Begel's patch to correct some reentrancy issues
with dynamic loading on Darwin.
* GC_CreateThread() was neglecting to duplicate the thread handle in
the table (thanks to Tum Nguyen for the patch).
* Pass +ESdbgasm only on PA-RISC machines with vendor compiler (thanks to
Roger Sayle for the patch).
* Applied more AIX threads patches from Scott Ananian.
== [6.2] 2003-06-21 ==
* Integrated a second round of Irix/AIX patches from Dan Bonachea.
Renamed mips_sgi_mach_dep.S back to mips_sgi_mach_dep.s, since it requires
the Irix assembler to do the C preprocessing; gcc -E doesn't work.
* Fixed Makefile.direct for DARWIN (thanks to Manuel Serrano).
* There was a race between GC_pthread_detach and thread exit that could
result in a thread structure being deallocated by GC_pthread_detach
even though it was still needed by the thread exit code (thanks to
Dick Porter for the small test case that allowed this to be debugged).
* Fixed version parsing for non-alpha versions in acinclude.m4 and
version checking in version.h.
* Issues identified (not yet fixed):
- A dynamic libgc.so references dlopen unconditionally, but doesn't link
against libdl.
- GC_proc_fd for Solaris is not correctly updated in response to a
fork() call. Thus incremental collection in the child won't work
correctly. (Thanks to Ben Cottrell for pointing this out.)
- --enable-redirect-malloc is mostly untested and known not to work
on some platforms.
- There seem to be outstanding issues on Solaris/X86, possibly with
finding the data segment starting address.
- Very large root set sizes (> 16 MB or so) could cause the collector
to abort with an unexpected mark stack overflow. (Thanks to
Peter Chubb.) NOT YET FIXED. Workaround is to increase the initial
size.
- The SGI version of the collector marks from mmapped pages, even
if they are not part of dynamic library static data areas. This
causes performance problems with some SGI libraries that use mmap
as a bitmap allocator. NOT YET FIXED. It may be possible to turn
off DYNAMIC_LOADING in the collector as a workaround. It may also
be possible to conditionally intercept mmap and use GC_exclude_static_roots.
The real fix is to walk rld data structures, which looks possible.
- Incremental collector should handle large objects better. Currently,
it looks like the whole object is treated as dirty if any part of it is.
== [6.2alpha6] 2003-06-05 ==
* There was an extra underscore in the name of GC_save_registers_in_stack
for NetBSD/SPARC (thanks to Jaap Boender for the patch).
* Integrated Brian Alliet's patch for Darwin. This restructured the
linuxthreads/pthreads support to separate generic pthreads support
from more the system-dependent thread-stopping code. I believe this
should make it easier to eliminate the code duplication between
pthreads platforms in the future. The patch included some other
code cleanups.
* Integrated Dan Bonachea's patch to support AIX threads. This required
substantial manual integration, mostly due to conflicts with other
recent threads changes. It may take another iteration to
get it to work.
* Removed HPUX/PA-RISC support from aix_irix_threads.c. It wasn't used
anyway and it cluttered up the code. And anything we can do to migrate
towards generic pthreads support is a good thing.
* Added a more explicit test for tracing of function arguments to test.c.
* Added Akira Tagoh's PowerPC64 patch.
* Fixed some bit rot in the Cygwin port (thanks to Dan Bonachea for
pointing it out). gc.h now includes just windows.h, not winbase.h.
* Declared GC_save_regs_in_stack() in gc_priv.h. Remove other declarations.
* Changed --enable-cplusplus to use automake consistently. The old way
confused libtool. "Make install" didn't work correctly for the old version.
Previously --enable-cplusplus was broken on cygwin.
* Changed the C version of GC_push_regs to fail at compile time if it is
generated with an empty body. This seems to have been the cause of one
or two subtle failures on unusual platforms. Those failures should
now occur at build time and be easily fixable.
== [6.2alpha5] 2003-05-14 ==
* GC_invoke_finalizers could, under rare conditions, set
GC_finalizer_mem_freed to an essentially random value. This could
possibly cause unbounded heap growth for long-running applications
under some conditions. (The bug was introduced in 6.1alpha5, and
is not in gcc3.3.)
* Attempted to sanitize the various DLL macros. GC_USE_DLL disappeared.
GC_DLL is used instead. All internal tests are now on GC_DLL.
README.macros is now more precise about the intended meaning.
* Include DllMain in the multi-threaded win32 version only if the
collector is actually built as a dll (thanks to Mohan Embar for
a version of the patch).
* Hide the cygwin threadAttach/Detach functions. They were violating our
namespace rules.
* Fixed an assertion in GC_check_heap_proc. Added GC_STATIC_ASSERT
(thanks again to Ben Hutchings).
* Removed some obsolete definitions for Linux/PowerPC in gcconfig.h.
* CORD_cat was not rebalancing unbalanced trees in some cases, violating
a CORD invariant. Also tweaked the re-balancing rule for
CORD_cat_char_star. (Thanks to Alexandr Petrosian for the bug report
and patch.)
* Added hand-coded structured exception handling support to mark.c.
This should enable support of dynamic libraries under win32 with
gcc-compiled code. (Thanks to Ranjit Mathew for the patch.)
Turned on dynamic library scanning for win32/gcc.
* Removed some remnants of read wrapping (thanks to Kenneth Schalk).
GC_USE_LD_WRAP was probably broken in recent versions.
* The build could fail on some platforms since gcconfig.h could include
declarations mentioning ptr_t, which was not defined, e.g. when if_mach
was built (thanks to Yann Dirson for pointing this out). Also
cleaned up tests for GC_PRIVATE_H in gcconfig.h a bit.
* The GC_LOOP_ON_ABORT environment variable interfered with incremental
collection, since the write fault handler was erroneously overridden.
Handlers are now set up in the correct order.
* It used to be possible to call GC_mark_thread_local_free_lists() while
the world was not stopped during an incremental GC. This was not safe.
Fortunately, it was also unnecessary. Added GC_world_stopped flag
to avoid it. (This caused occasional crashes in GC_set_fl_marks
with thread local allocation and incremental GC. This probably happened
primarily on old, slow multiprocessors.)
* Allowed overriding of MAX_THREADS in win32_threads.c from the build
command line (thanks to Yannis Bres for the patch).
* Taught the IA64/linux code to determine the register backing store base from
/proc/self/maps after checking the __libc symbol, but before guessing.
(__libc symbols are on the endangered list, and the guess is likely to not
always be right for 2.6 kernels.) Restructured the code to read and parse
/proc/self/maps so it only exists in one place (all platforms).
* The -DUSE_PROC_FOR_LIBRARIES code was broken on Linux. It claimed that it
also registered the main data segment, but didn't actually do so. (I don't
think anyone actually uses this configuration, but ...)
* Made another attempt to get --enablecplusplus to do the right thing.
Since there are unavoidable problems with C programs linking against a
dynamic library that includes C++ code, I separated out the c++ code into
libgccpp.
== [6.2alpha4] 2003-03-10 ==
* Use LINUX_STACKBOTTOM for >= glibc2.2 on Linux/MIPS. (See Debian bug
# 177204)
* Integrated Jeff Sturm and Jesse Rosenstock's MACOSX threads patches.
* Integrated Grzegorz Jakacki's substantial GNU build patch. "Make dist"
should now work for the GNU build process. Documentation files
are installed under share/gc.
* Tweaked gc_cpp.h to again support the Borland compiler (thanks to
Rene Girard for pointing out the problems).
* Updated BCC_MAKEFILE (thanks to Rene Girard).
* Added GC_ASSERT check for minimum thread stack size.
* Added --enable-gc-assertions.
* Added some web documentation to the distribution. Updated it in the
process.
* Separate gc_conf_macros.h from gc.h.
* Added generic GC_THREADS client-defined macro to set the appropriate
GC_XXX_THREADS internal macro. (gc_config_macros.h.)
* Add debugging versions of _ignore_off_page allocation primitives.
* Moved declarations of GC_make_closure and GC_debug_invoke_finalizer
from gc.h to gc_priv.h.
* Reset GC_fail_count even if only a small allocation succeeds.
* Integrated Brian Alliet's patch for dynamic library support on Darwin.
* gc_cpp.h's gc_cleanup destructor called GC_REGISTER_FINALIZER_IGNORE_SELF
when it should have called the lower case version, since it was
explicitly computing a base pointer.
== [6.2alpha3] 2003-01-30 ==
* Don't include execinfo.h in os_dep.c when it's not needed, and may not
exist.
== [6.2alpha2] ==
* Fixed the completely broken FreeBSD code in 6.2alpha1 (thanks to
Hironori Sakamoto for the patch).
* Changed IRIX reference in dbg_mlc.c to IRIX5 (thanks to Marcus Herbert).
* Attempted to work around the problems with .S filenames and the SGI
compiler. (Untested.)
* Worked around an HP/UX make issue with the GNU-style build process.
* Fixed the --enable-cplusplus build machinery to allow builds without
a C++ compiler. (That was always the intent ...)
* Changed the debugging allocation macros to explicitly pass the return
address for Linux and XXXBSD on hardware for which we can't get stack
traces. Use __builtin_return_address(0) to generate it when possible.
Some of the configuration work was cleaned up (good) and moved to gc.h
(bad, but necessary). This should make leak detection more useful
on a number of platforms. (Thanks to Fabian Thylman for the suggestion.)
* Fixed compilation problems in dbg_mlc.c with GC_ADD_CALLER.
* Bumped revision number for dynamic library.
== [6.2alpha1] 2003-01-23 ==
* Guard the test for GC_DUMP_REGULARLY in misc.c with
"#ifndef NO_DEBUGGING". Otherwise it fails to build with NO_DEBUGGING
defined. (Thanks to Manuel Serrano.)
* Message about retrying suspend signals was incorrectly generated even when
flag was not set.
* Cleaned up MACOSX/NEXT root registration code. There was apparently a
separate ifdef case in GC_register_data_segments() for no reason.
* Removed MPROTECT_VDB for MACOSX port, based on one negative report.
* Arrange for gc.h and friends to be correctly installed with GNU-style
"make install".
* Enable the GNU-style build facility include C++ support in the library
with --enable-cplusplus (thanks to Thomas Maier for some of the patch).
* Mark from GC_thread_key in linux_threads.c, in case that's allocated
from the garbage collected heap, as it is with our own thread-specific
storage implementation (thanks to Jeff Sturm).
* Mark all free list header blocks if they are heap allocated. This avoids
some unnecessary tracing. And it remains correct if we clear the
root set. (Thanks to Jeff Sturm for identifying the bug.)
* Improved S390/Linux support. Add S390/Linux 64-bit support (thanks to
Ulrich Weigand).
* Corrected the spelling of GC_{M,C}ALLOC_EXPLICTLY_TYPED to
GC_{M,C}ALLOC_EXPLICITLY_TYPED in gc_typed.h. This is technically
an interface change. Based on the fact that nobody reported this,
I suspect/hope there were no clients.
* Cleaned up gc_typed.h so that (1) it adds an extern "C" declaration
when appropriate, (2) doesn't generate references to undefined internal
macros, and (3) allows easier manual construction of descriptors.
* Close the file descriptor used by GC_print_address_map().
* Set the "close-on-exec" bit for various file descriptors maintained
for the collector's internal use.
* Added a hack to find memory segments owned by the system allocator
under win32. Based on my tests, this tends to eventually find all
segments, though it may take a while. There appear to be cleaner,
but slower solutions under NT/XP. But they rely on an API that's
unsupported under 9X.
* Changed Linux PowerPC stack finding to LINUX_STACKBOTTOM. (Thanks
to Akira Tagoh for pointing out that HEURISTIC1 does not work on
64-bit kernels.)
* Added GC_set_free_space_divisor to avoid some Windows dll issues.
* Added FIXUP_POINTER, POINTER_SHIFT, POINTER_MASK to allow preprocessing
of candidate pointers for tagging, etc.
* Always lock around GC_notify_full_gc(). Simplified code for
invoking GC_notify_full_gc().
* Changed the way DATASTART is defined on FreeBSD to be robust against
an unmapped page after etext. (Thanks to Hironori Sakamoto for
tracking down the intermittent failure.)
* Made GC_enable() and GC_disable() official. Deprecated direct update
of GC_dont_gc. Changed GC_gcollect to be a noop when garbage collection
is disabled.
* Call GC_register_dynamic_libraries before stopping the world on Linux,
in order to avoid a potential deadlock due to the dl_iterate_phdr lock.
* Introduced a more general mechanism for platform-dependent code to
decide whether the main data segment should be handled separately
from dynamic libraries, or registered by GC_register_dynamic_libraries.
The latter is more reliable and easier on Linux with dl_iterate_phdr.
== [6.1] ==
* Added GC_MAXIMUM_HEAP_SIZE environment variable.
* Fix configure.in for MIPS/LINUX (thanks to H.J. Lu).
* Double page hash table size for -DLARGE_CONFIG.
* Integrated Bo Thorsen's X86-64 support.
* STACKBOTTOM definition for LINUX/MIPS was partially changed back
(thanks to H.J. Lu and Hiroshi Kawashima for resolving this).
* Replaced all occurrences of LINUX_DATA_START in gcconfig.h with
SEARCH_FOR_DATA_START. It doesn't hurt to fall back to a search.
And __data_start doesn't seem to get defined correctly of the GC
library is loaded with LD_PRELOAD, e.g. for leak detection.
* If the GC_find_leak environment variable is set, do a
atexit(GC_gcollect) to give us at least one chance to detect leaks.
This may report some very benign leaks, but ...
* Addeded REDIRECT_FREE. It's necessary if we want leak detection with
LD_PRELOAD.
* Defer printing of leaked objects, as for smashed objects.
* Fixed process and descriptor leak in GC_print_callers. Try for
line number even if we got function name.)
* Ported parallel GC support and thread local allocation to Alpha.
Not yet well-tested.
* Added GC_DUMP_REGULARLY and added finalization statistics to GC_dump().
* Fixed Makefile.am to mention alpha_mach_dep.S instead of the defunct
alpha_mach_dep.s.
* Incorporated a change to new_gc_alloc.h,
which should make it work with gcc3.1.
* Use alpha_mach_dep.S only on Linux. (It's not clear that this is
optimal, but it otherwise didn't build on Tru64. Thanks to Fergus Henderson.)
* Added ifdef to guard free() in os_dep.c. Otherwise we get a
compilation error on Irix (thanks to Dai Sato).
* Added an experimental version of GC_memalign to mallocx.c. This can't
always work, since we don't handle alignment requests in the hblk-level
allocator, and we can't handle arbitrary pointer displacements unless
GC_all_interior_pointers is enabled. But it should work for alignment
requests up to HBLKSIZE. This is not yet documented in the standard
places.
* Finally debugged the OSF1/Tru64 thread support. This needs more testing,
since I needed to add a somewhat unconvincing workaround for signal
delivery issues that I don't yet completely understand. But it does
pass my tests, even in parallel GC mode. Incremental GC support is
disabled if thread support is enabled, due to the signal issues.
* Eliminated name-space-incorrect definition of _cdecl from gc_cpp.h.
* Added GC_debug_malloc_replacement and GC_debug_realloc_replacement
declarations to gc.h. On IA64, this is required for REDIRECT_MALLOC
to work correctly with these.
* Fixed Linux USE_PROC_FOR_LIBRARIES to work with a 64-bit /proc format.
== [6.1alpha5] 2002-06-19 ==
* Added GC_finalizer_mem_freed, and changed some of the code that
decided on heap expansion to look at it. Memory explicitly
deallocated by finalizers essentially needs to be counted as reclaimed
by the GC. Otherwise there are cases in which the heap can grow
infinitely. (Thanks to Mark Reichert for the test case.)
* Integrated Adam Megacz patches to not scan dynamic libraries if
we are compiling with gcc on win32. Otherwise we need structured
exception handling to deal with asynchronously unmapped root
segments, and gcc doesn't directly support that.
* Integrated Anthony Green's patch to support Wine.
* GC_OPERATOR_NEW_ARRAY was misspelled OPERATOR_NEW_ARRAY in several
places, including gc_cpp.cc (thanks to Wink Saville for pointing this out).
* Integrated Loren J. Rittle's Alpha FreeBSD patches. These also
changed the declarations of symbols like _end on many platforms to
that they wouldn't mistakenly be declared as short data symbols (suggested by
Richard Henderson).
* Integrated changes from the Debian distribution (thanks to Ryan Murray
for pointing these out).
Fix C++ comments in POWERPC port. Add ARM32
incremental GC support. Get rid of USE_GENERIC_PUSH_REGS for alpha/Linux,
this time for real. Use va_copy to get rid of cord printf problems
(finally).
* Close file descriptor used to count CPUs (thanks to Jeff Sturm for
pointing out the omission).
* Don't just drop gcj free lists in GC_start_reclaim, since that can
eventually cause the marker to see a bogus mark descriptor in the
dropped objects. The usual symptom was a very intermittent segmentation
fault in the marker. This mattered only if one of the GC_gcj_malloc
variants was used (thanks to Michael Smith, Jeff Sturm, Bryce McKinlay and
Tom Tromey for helping to track this down).
* Fixed Linux and Solaris/64 SPARC configuration (thanks to David Miller,
Jeff Sturm, Tom Tromey, and Christian Joensson).
* Fixed a typo in strdup definition (thanks to Gerard A Allan).
* Changed Makefile.direct to invoke $(CC) to assemble alpha_mach_dep.S.
This is needed on Linux. I'm not sure whether it's better or worse
on Tru64.
* Changed gc_cpp.h once more to declare operator new and friends only in
a Microsoft environment. This may need further fine tuning (thanks to
Johannes Schmidt for pointing out that the older code breaks on gcc3.0.4).
* Don't ever override strdup if it's already macro defined (thanks to
Adnan Ali for pointing out the problem).
* Changed gc_cpp.h yet again to also overload placement new. Due to the
C++ overloading rules, the other overloaded new operations otherwise hide
placement new, which causes many STL uses to break (thanks to Reza Shahidi
for reporting this, and to Matt Austern for proposing a fix).
* Integrated cygwin pthreads support from Dan Bonachea.
* Turn on DYNAMIC_LOADING for NetBSD (thanks to Krister Walfridsson).
* Changed printing code to print more complete GC times.
* Applied Mark Mitchell's Irix patch to correct some bit rot.
* Clarified which object-printing routines in dbg_mlc.c should hold
the allocation lock. Restructured the code to allow reasonable object
printing with -DREDIRECT_MALLOC.
* Fix the Linux mmap code to always start with 0x1000 as the initial hint.
Minor patches for 64-bit AIX, particularly to STACKBOTTOM (thanks to
Jeffrey Mark Siskind).
* Renamed "SUSPENDED" flag for Solaris threads support to avoid a conflict
with a system header (thanks to Philip Brown).
* Cause win32_threads.c to handle an out of range stack pointer correctly,
though currently with a warning. (Thanks to Jonathan Clark for
observing that win32 applications may temporarily use the stack
pointer for other purposes, and suggesting a fix. Unfortunately, it's
not clear that there is a complete solution to this problem.)
== [6.1alpha4] 2002-06-16 ==
* Fixed typo in sparc_mach_dep.S, preventing the 64-bit version from
building. Increased 64-bit heap size limit in test.c slightly, since
a functional SPARC collector seems to slightly exceed the old limits.
* Use NPRGREG in solaris_threads.c, thus printing all registers if things
go wrong.
* Added GC_MARKERS environment variable to allow use of a single marker
thread on an MP without confusing the lock implementation.
* Collect much less aggressively in incremental mode with GC_TIME_UNLIMITED.
This is really a purely generational mode, and we can afford to
postpone the collection until the heap is (nearly) full.
* Remove read() wrapper for MPROTECT_VDB. It was causing more harm than
good. It is often no longer needed if system calls avoid writing to
pointerful heap objects.
* Fix MACOSX test in gcconfig.h (thanks to John Clements).
* Change GC_test_and_set so that it consistently has one argument.
Add spaces to ::: in powerpc assembly code in gc_locks.h (thanks to
Ryan Murray).
* Fixed a formatting error in dbg_mlc.c. Added prototype to GC_abort()
declaration (thanks to Michael Smith).
* Removed "source" argument to GC_find_start(). Eliminate GC_FIND_START().
* Added win32 recognition code in configure.in. Changed some of the
dllimport/export defines in gc.h (thanks to Adam Megacz).
* GC_malloc_many didn't set hb_last_reclaimed when it called
GC_reclaim_generic. (I'm not sure this matters much, but ...)
* Allocating uncollectible objects with debug information sometimes
allocated objects that were one byte too small, since uncollectible
objects don't have the extra byte added at the end (thanks to
Wink Saville for pointing this out).
* Added a bit more assertion checking to make sure that gcj objects
on free lists never have a nonzero second word.
* Replaced BCC_MAKEFILE with an up-to-date one (thanks to Andre Leiradella).
* Upgraded libtool, configure.in and some related files to hopefully
support NetBSD/SPARC (thanks to Adrian Bunk). Unfortunately,
libtool 1.4.2 seemed to be buggy due to missing quotes in several
"test" invocations. Fixed those in the ltmain.sh script.
* Some win32-specific patches, including the introduction of
GC_CreateThread (thanks to Adam Megacz).
* Merged in gcj changes from Anthony Green to support embedded systems.
* Tried to consistently rename preprocessed assembly files with a capital
.S extension.
* Use alpha_mach_dep.S on ALPHA again. It doesn't really matter, but this
makes our distribution consistent with the gcc one, avoiding future merge
problems.
* Move GET_MEM definition into gcconfig.h. Include gcconfig.h slightly
later in gc_priv.h to avoid forward references to ptr_t.
* Add some testing of local allocation to test.c.
* Change definition of INVALID_QTID in specific.h. The -1 value was used
inconsistently, and too likely to collide with a valid stack address.
Some general clean-up of specific.[ch]. Added assertions. (Thanks
to Michael Smith for tracking down an intermittent bug to this
general area. I'm not sure it has been squashed yet, however.)
* On Pthread systems it was not safe to call GC_malloc() between fork()
and exec(). According to the applicable standards, it doesn't appear
to be safe to call malloc() or many other libc functions either, thus
it's not clear this is fixable. Added experimental support for
-DHANDLE_FORK in linux_threads.c which tries to support it. It may
succeed if libc does the right thing. I'm not sure whether it does.
(Thanks to Kenneth Schalk for pointing out this issue.)
* Documented thread local allocation primitives to require an
explicit GC_init call. GC_init_parallel is no longer declared to
be a constructor function, since that isn't portable and often
seems to lead to initialization order problems.
* Changed gc_cpp.cc and gc_cpp.h in one more attempt to make them
compatible with Visual C++ 6 (thanks to Wink Saville for the patch).
* Some more patches for Linux on HP PA-RISC.
* Added include/gc_allocator.h. It implements (hopefully) standard
conforming (as opposed to SGI-style) allocators that allocate
collectible (gc_allocator) or GC-traceable, but not collectible
(traceable_allocator) objects. This borrows heavily from libstc++,
which borrows heavily from the SGI implementation, this part of
which was written by Matt Austern. Changed test_cpp.cc to very
minimally test this.
* On Linux/X86, retry mmap with a different start argument. That should
allow the collector to use more (closer to 3GB) of the address space.
* Force 64 bit alignment with GCJ support (reflects Bryce McKinlay's
patch to the gcc tree).
* Refined the choice of sa_handler vs. sa_sigaction in GC_dirty_init
to accommodate some glibc5 systems (thanks to Dan Fandrich for the patch).
* Compensated for the fact that current versions of glibc set
__libc_stack_end incorrectly on Linux/IA64 while initialization code
is running. This could cause the collector to miss 16 bytes of
the memory stack if GC_malloc or friends where called before main().
* Mostly integrated Takis Psarogiannakopoulos' port to DG/UX Inix 86.
This will probably take another iteration to work, since his
patch conflicted with the libtool upgrade.
* Added README.arm.cross containing some information about cross-
compiling to an ARM processor from Margaret Fleck (original code provided by
Bradley D. LaRonde; edited by Andrej Cedilnik using some of solutions by
Tilman Vogel; also ported for iPAQ by Oliver Kurth).
== [6.1alpha3] 2002-02-07 ==
* Minor cleanup on the gcconfig.h section for SPARC.
* Minor fix to support Intel compiler for I386/Linux (thanks to
Sven Hartrumpf).
* Added SPARC V9 (64-bit) support (thanks to Jeff Sturm).
* Restructured the way in which we determine whether or not to keep
call stacks for debug allocation. By default SAVE_CALL_COUNT is
now zero on all platforms. Added SAVE_CALL_NARGS parameters.
If possible, use execinfo.h to capture call stack. (This should
add support for a number of new platforms, though often at
considerable runtime expense.)
* Try to print symbolic information for call stacks. On Linux, we
do this with a combination of execinfo.h and running addr2line in
a separate process. This is both much more expensive and much more
useful. Amazingly, it seems to be fast enough for most purposes.
* Redefined strdup if -DREDIRECT_MALLOC is given.
* Changed incremental collector and MPROTECT_VDB implementation so that,
under favorable conditions, pointer-free objects are not protected.
Added GC_incremental_protection_needs() to determine ahead of time whether
pointer-free objects may be protected. Replaced GC_write_hint() with
GC_remove_protection().
* Added test for GC_ENABLE_INCREMENTAL environment variable.
* Made GC_time_limit runtime configurable. Added GC_PAUSE_TIME_TARGET
environment variable.
* Eliminated GC_page_sz, a duplicate of GC_page_size.
* Caused the Solaris and Irix thread creation primitives to call
GC_init_inner().
== [6.1alpha2] 2001-12-20 ==
* No longer wrap read by default in multi-threaded applications. It was
pointed out on the libgcj list that this holds the allocation lock for
way too long if the read blocks. For now, reads into the heap are
broken with incremental collection. It's possible to turn this back on
if you make sure that read calls don't block (e.g. by calling select
first).
* Fix ifdef in Solaris_threads.h to refer to GC_SOLARIS_THREADS.
* Added check for environment variable GC_IGNORE_GCJ_INFO.
* Added printing of stop-the-world GC times if GC_PRINT_STATS environment
variable is set.
* The calloc definition in leak_detector.h was missing parentheses, and
realloc was missing a second argument to GC_REALLOC (thanks to
Elvenlord Elrond).
* Added GC_PRINT_BACK_HEIGHT environment variable and associated
code, mostly in the new file backgraph.c. See doc/README.environment.
* Added -DUSE_GLOBAL_ALLOC to work around a Windows NT issue (thanks to
Jonathan Clark).
* Integrated port to NEC EWS4800 (MIPS-based workstation, with somewhat
different address-space layout). This may help for other machines with
holes in the data segment. (Thanks to Hironori Sakamoto.)
* Changed the order in which GC_push_roots and friends push things onto
the mark stack. GC_push_all calls need to come first, since we can't
necessarily recover if those overflow the mark stack. (Thanks to
Matthew Flatt for tracking down the problem.)
* Some minor cleanups to mostly support the Intel compiler on Linux/IA64.
== [6.1alpha1] 2001-09-22 ==
* Non-debug, atomic allocations could result in bogus smashed object
reports with debugging on (thanks to Patrick Doyle for the small test case).
* Fixed GC_get_register_stack_base (Itanium only) to work around a glibc
2.2.4 bug.
* Initial port to HP/UX on Itanium. Thread support and both 32 and 64
bit ABIs appear to work. Parallel mark support doesn't yet, due to
some inline assembly code issues. Thread local allocation does appear
to work.
* ifdef'ed out glibc2.1/Itanium workaround. I suspect nobody is using
that combination anymore.
* Added a patch to make new_gc_alloc.h usable with gcc3.0 (thanks to
Dimitris Vyzovitis for the patch).
* Debugged 64-bit support on HP/UX PA-RISC.
* Turned on dynamic loading support for FreeBSD/ELF (thanks to Peter Housel).
* Unregistering of finalizers with debugging allocation was broken (thanks
to Jani Kajala for the test case).
* Old finalizers were not returned correctly from GC_debug_register_finalizer.
* Disabled MPROTECT_VDB for Linux/M68K based on a report that it doesn't work.
* Cleaned up some statistics gathering code in reclaim.c (thanks to
Walter Bright).
* Added some support for OpenBSD/ELF/Linux (thanks to Suzuki Toshiya).
* Added Jakub Jelinek's patch to use dl_iterate_phdr for dynamic library
traversal to dyn_load.c. Changed it to weakly reference dl_iterate_phdr,
so that the old code is still used with old versions of glibc.
* Cleaned up feature test macros for various threads packages and
integrated (partially functional) FreeBSD threads code from Loren J. Rittle.
It's likely that the cleanup broke something, since it touched lots of
code. It's also likely that it fixed some unreported bugs in the
less common thread implementations, since some of the original code
didn't stand up to close scrutiny. Support for the next pthreads
implementation should be easier to add.
== [6.0] 2001-07-26 ==
* Two more bug fixes for KEEP_BACK_PTRS and DBG_HDRS_ALL.
* Fixed a stack clearing problem that resulted in SIGILL with a
misaligned stack pointer for multi-threaded SPARC builds.
* Integrated another HURD patch (thanks to Igor Khavkine).
== [6.0alpha9] ==
* added README.macros.
* Made gc.mak a symbolic link to work around winzip's tendency to ignore
hard links.
* Simplified the setting of NEED_FIND_LIMIT in os_dep.c, possibly breaking
it on untested platforms.
* Integrated initial GNU HURD port (thanks to Chris Lingard and
Igor Khavkine).
* A few more fixes for Digital Mars compiler (by Walter Bright).
* Fixed gcc version recognition. Renamed OPERATOR_NEW_ARRAY to
GC_OPERATOR_NEW_ARRAY. Changed GC_OPERATOR_NEW_ARRAY to be the default.
It can be overridden with -DGC_NO_OPERATOR_NEW_ARRAY (thanks to
Cesar Eduardo Barros).
* Changed the byte size to free-list mapping in thread local allocation
so that size 0 allocations are handled correctly.
* Fixed Linux/MIPS stackbottom for new toolchain (thanks to Ryan Murray).
* Changed finalization registration to invoke GC_oom_fn when it runs out
of memory.
* Removed lvalue cast in finalize.c. This caused some debug configurations
not to build with some non-gcc compilers.
== [6.0alpha8] 2001-06-15 ==
* Changed GC_debug_malloc_replacement and GC_debug_realloc_replacement
so that they compile under Irix (thanks to Dave Love).
* Updated powerpc_macosx_mach_dep.s so that it works if the collector
is in a dynamic library (thanks to Andrew Begel).
* Transformed README.debugging into debugging.html, updating and
expanding it in the process. Added gcdescr.html and tree.html
from the web site to the GC distribution.
* Fixed several problems related to PRINT_BLACK_LIST. This involved
restructuring some of the marker macros.
* Fixed some problems with the sizing of objects with debug information.
Finalization was broken KEEP_BACK_PTRS or PRINT_BLACK_LIST. Reduced the
object size with SHORT_DEBUG_HDRS by another word.
* The "Needed to allocate blacklisted ..." warning had inadvertently
been turned off by default, due to a buggy test in allchblk.c. Turned
it back on.
* Removed the marker macros to deal with 2 pointers in interleaved fashion.
They were messy and the performance improvement seemed minimal. We'll
leave such scheduling issues to the compiler.
* Changed Linux/PowerPC test to also check for __powerpc__ in response
to a discussion on the gcc mailing list.
* Removed the "static" from the jmp_buf declaration in GC_generic_push_regs
(suggested by Matthew Flatt). This was causing problems in
systems that register all of their own roots. It looks far more correct
to me without the "static" anyway.
* Fixed several problems with thread local allocation of pointer-free or
typed objects. The collector was reclaiming thread-local free lists, since
it wasn't following the link fields.
* There was apparently a long-standing race condition related to
multi-threaded incremental collection. A collection could be started and
a thread stopped between the memory unprotect system call and the setting of
the corresponding dirt bit. I believe this did not affect Solaris or PCR,
which use a different dirty-bit implementation. Fixed this by installing
signal handlers with sigaction instead of signal, and disabling the thread
suspend signal while in the write-protect handler. (It is unclear
whether this scenario ever actually occurred.)
* Incremental collection did not cooperate correctly with the PARALLEL_MARK
implementation of GC_malloc_many or the local_malloc primitives. It still
doesn't work well, but it shouldn't lose memory anymore.
* Integrated some changes from the gcc source tree that I had previously
missed (thanks to Bryce McKinlay for the reminder and patch).
* Added Makefile.direct as a copy of the default Makefile, which would
normally be overwritten if configure is run.
* Changed the gc.tar target in Makefile.direct to embed the version number
in the gc directory name. This will affect future tar file distributions.
* Changed the Irix dynamic library finding code to no longer try to
eliminate writable text segments under Irix6.x, since that is probably no
longer necessary, and can apparently be unsafe on occasion (thanks to
Shiro Kawai for pointing this out).
* GC_cleanup with GC_DEBUG enabled passed a real object base address to
GC_debug_register_finalizer_ignore_self, which expected a pointer past the
debug header. Call GC_register_finalizer_ignore_self instead, even with
debugging enabled (thanks to Jean-Daniel Fekete for catching this).
* The collector didn't build with call chain saving enabled but NARGS=0.
* Fixed up the GNU-style build files enough so that they work in some
obvious cases (thanks to Maarten Thibaut).
* Added initial port to Digital Mars compiler for win32 (thanks to Walter
Bright).
== [6.0alpha7] 2001-04-19 ==
* Added GC_finalizer_notifier. Fixed GC_finalize_on_demand. (The variable
actually wasn't being tested at the right points. The build-time flag
was.)
* Added Tom Tromey's S390 Linux patch.
* Added code to push GC_finalize_now in GC_push_finalizer_structures
(thanks to Matthew Flatt).
* Added GC_push_gc_structures() to push all GC internal roots.
* Integrated some FreeBSD changes from Matthew Flatt.
* It looks like USRSTACK is not always correctly defined under Solaris.
Hacked gcconfig.h to attempt to work around the problem. The result
is not well tested. (Thanks again to Matthew Flatt for pointing this out.)
* Added Ji-Yong Chung's win32 threads and C++ fixes.
* Arranged for hpux_test_and_clear.s to no longer be needed or built.
It was causing build problems with gas, and it's not clear this is
better than the pthreads alternative on this platform.
* Some MINGW32 fixes from Hubert Garavel.
* Added initial Hitachi SH4 port from Kaz Kojima.
* Ported thread-local allocation and parallel mark code to HP/UX on PA_RISC.
* Made include/gc_mark.h more public and separated out the really private
pieces. This is probably still not quite sufficient for clients that
want to supply their own kind of type information. But it's a start.
This involved lots of identifier renaming to make it namespace clean.
* Added GC_dont_precollect for clients that need complete control over
the root set.
* GC_is_visible didn't do the right thing with gcj objects. (Not that
many people are likely to care, but ...)
* Don't redefine read with GC_USE_LD_WRAP.
* Initial port to LINUX/HP_PA. Incremental collection and threads are not
yet supported. (Incremental collection should work if you have the
right kernel. Threads may work with a sufficiently patched pthread
library.)
* Changed gcconfig.h to recognize __i386__ as an alternative to i386 in
many places (thanks to Benjamin Lerman).
* Made win32_threads.c more tolerant of detaching a thread that it didn't
know about (thanks to Paul Nash).
* Added Makefile.am and configure.in from gcc to the distribution, with
minimal changes. For the moment, those are just placeholders. In the
future, we're planning to switch to a GNU-style build environment for
Un*x-like systems, though the old Makefile will remain as a backup.
* Turned off STUBBORN_ALLOC by default, and added it back as a Makefile
option.
* Redistributed some functions between malloc.c and mallocx.c, so that
simple statically linked apps no longer pull in mallocx.o.
* Changed large object allocation to clear the first and last few words
of each block before releasing the lock. Otherwise the marker could see
objects with nonsensical type descriptors.
* Fixed a couple of subtle problems that could result in not recognizing
interior pointers from the stack. (I believe these were introduced
in 6.0alpha6.)
* GC_debug_free_inner called GC_free, which tried to reacquire the
allocator lock, and hence deadlocked. (DBG_HDRS_ALL probably never worked
with threads.)
* Fixed several problems with back traces. Accidental references to a free
list could cause the free list pointer to be overwritten by a back pointer.
There seemed to be some problems with the encoding of root and finalizer
references.
== [6.0alpha6] ==
* Changed the definition of DATASTART on ALPHA and IA64, where data_start
and __data_start are not defined by earlier versions of glibc. This might
need to be fixed on other platforms as well.
* Changed the way the stack base and backing store base are found on IA64.
This should now remain reliable on future kernels. But since it relies
on /proc, it will no longer work in the simulated NUE environment.
* Made the call to random() in dbg_mlc.c with -DKEEP_BACK_PTRS dependent
on the OS. On non-Unix systems, rand() should be used instead. Handled
small RAND_MAX (thanks to Peter Ross for pointing this out).
* Fixed the cord make rules to create the cord subdirectory, if necessary
(thanks to Doug Moen).
* Changed fo_object_size calculation in finalize.c. Turned finalization
of non-heap object into a no-op. Removed anachronism from GC_size()
implementation.
* Changed GC_push_dirty call in solaris_threads.c to GC_push_selected.
It was missed in a previous renaming (thanks to Vladimir Tsichevski
for pointing this out).
* Arranged to not mask SIGABRT in linux_threads.c (thanks to Bryce McKinlay).
* Added GC_no_dls hook for applications that want to register their own
roots.
* Integrated Kjetil Matheussen's Amiga changes.
* Added FREEBSD_STACKBOTTOM. Changed the X86/FreeBSD port to use it
(thanks to Matthew Flatt).
* Added pthread_detach interception for platforms supported by linux_threads.c
and irix_threads.c.
* Changed the USE_MMAP code to check for the case in which we got the
high end of the address space, i.e. mem_ptr + mem_sz == 0. It appears
that this can happen under Solaris 7. It seems to be allowed by what
I would claim is an oversight in the mmap specification. (Thanks to
Toshio Endo for pointing out the problem.)
* Cleanup of linux_threads.c. Some code was originally cloned from
irix_threads.c and now unnecessary. Some comments were obviously wrong.
* (Mostly) fixed a longstanding problem with setting of dirty bits from
a signal handler. In the presence of threads, dirty bits could get lost,
since the getting of a bit in the bit vector was not atomic with respect
to other updates. The fix is 100% correct only for platforms for which
GC_test_and_set is defined. The goal is to make that all platforms with
thread support. Matters only if incremental GC and threads are both
enabled.
* made GC_all_interior_pointers (a.k.a. ALL_INTERIOR_POINTERS) an
initialization time, instead of build-time option. This is a
nontrivial, high risk change. It should slow down the code measurably
only if MERGE_SIZES is not defined, which is a very nonstandard
configuration.
* Added doc/README.environment, and implemented what it describes. This
allows a number of additional configuration options to be set through
the environment. It documents a few previously undocumented options.
* Integrated Eric Benson's leak testing improvements.
* Removed the option to throw away the beginning of each page (DISCARD_WORDS).
This became less and less useful as processors enforce stricter alignment.
And it hadn't been tested in ages, and was thus probably broken anyway.
== [6.0alpha5] ==
* Changed the definition of GC_pause in linux_threads.c to use a volatile
asm. Some versions of gcc apparently optimize away writes to local volatile
variables. This caused poor locking behavior starting at about
4 processors.
* Added GC_start_blocking(), GC_end_blocking() calls and wrapper for sleep
to linux_threads.c.
The first two calls could be used to generally avoid sending GC signals to
blocked threads, avoiding both premature wakeups and unnecessary overhead.
* Fixed a serious bug in thread-local allocation. At thread termination,
GC_free could get called on small integers. Changed the code for thread
termination to more efficiently return left-over free-lists.
* Integrated Kjetil Matheussen's BeOS support.
* Rearranged the directory structure to create the doc and tests
subdirectories.
* Sort of integrated Eric Benson's patch for OSF1. This provided basic
OSF1 thread support by suitably extending hpux_irix_threads.c. Based
on earlier email conversations with David Butenhof, I suspect that it
will be more reliable in the long run to base this on linux_threads.c
instead. Thus I attempted to patch up linux_threads.c based on Eric's code.
The result is almost certainly broken, but hopefully close enough that
someone with access to a machine can pick it up.
* Integrated lots of minor changes from the NetBSD distribution. (These
were supplied by David Brownlee. I'm not sure about the original
authors.)
* Hacked a bit more on the HP/UX thread-support in linux_threads.c. It
now appears to work in the absence of incremental collection. Renamed
hpux_irix_threads.c back to irix_threads.c, and removed the attempt to
support HPUX there.
* Changed gc.h to define _REENTRANT in cases in which it should already
have been defined. It is still safer to also define it on the command
line.
== [6.0alpha4] ==
* Moved up the detection of mostly full blocks to the initiation of the
sweep phase. This eliminates some lock contention in the PARALLEL_MARK case,
as multiple threads try to look at mostly full blocks concurrently.
* Restored the code in GC_malloc_many that grabs a prefix of the global
free list. This avoids the case in which every GC_malloc_many call
tries and fails to allocate a new heap block, and the returns a single
object from the global free list.
* Some minor fixes in new_hblk.c. (Attempted to build free lists in order
of increasing addresses instead of decreasing addresses for cache performance
reasons. But this seems to be only a very minor gain with -DEAGER_SWEEP,
and a loss in other cases. So the change was backed out.)
* Fixed some of the documentation (thanks in large part to Fergus Henderson).
* Fixed the Linux USE_PROC_FOR_LIBRARIES code to deal with apps that perform
large numbers of mmaps (thanks to Eric Benson). Also fixed that code to
deal with short reads.
* Added GC_get_total_bytes().
* Fixed leak detection mode to avoid spurious messages under linuxthreads.
(This should also now be easy for the other supported threads packages.
But the code is tricky enough that I'm hesitant to do it without being able
to test. Everything allocated in the GC thread support itself should be
explicitly deallocated.)
* Made it possible (with luck) to redirect malloc to GC_local_malloc.
== [6.0alpha3] 2000-09-26 ==
* Fixed the /proc/self/maps code to not seek, since that apparently is not
reliable across all interesting kernels.
* Fixed some compilation problems in the absence of PARALLEL_MARK
(introduced in alpha2).
* Fixed an algorithmic problem with PARALLEL_MARK. If work needs to
be given back to the main mark "stack", the BOTTOM entries of the local
stack should be given away, not the top ones. This has substantial
performance impact, especially for > 2 processors, from what I can tell.
* Extracted gc_lock.h from gc_priv.h. This should eventually make it a
bit easier to avoid including gc_priv.h in clients.
* Moved all include files to include/ and removed duplicate links to the
same file. The old scheme was a bad idea because it was too easy to get the
copies out of sync, and many systems don't support hard links.
Unfortunately, it's likely that I broke some of the non-Unix Makefiles in
the process, although I tried to update them appropriately.
* Removed the partial support for a copied nursery. It's not clear that
this would be a tremendous win, since we don't consistently lose to
generational copying collectors. And it would significantly complicate
many things. May be reintroduced if/when it really turns out to win.
* Removed references to IRIX_JDK_THREADS, since I believe there never
were and never will be any clients.
* Added some code to linux_threads.c to possibly support HPUX threads
using the Linux code. Unfortunately, it doesn't work yet, and is
currently disabled.
* Added support under Linux/X86 for saving the call chain, both in (debug)
objects for client debugging, and in GC_arrays._last_stack for GC
debugging. This was previously supported only under Solaris. It is
not enabled by default under X86, since it requires that code be compiled
to explicitly gave frame pointers on the call stack. (With gcc this
currently happens by default, but is often turned off explicitly.)
To turn it on, define SAVE_CALL_CHAIN.
== [6.0alpha2] ==
* Added USE_MARK_BYTES to reduce the need for compare-and-swap on platforms
for which that's expensive.
* Fixed a locking bug ib GC_gcj_malloc and some locking assertion problems.
* Added a missing volatile to OR_WORD and renamed the parameter to
GC_compare_and_swap so it's not a C++ reserved word (thanks to
Toshio Endo for pointing out both of those).
* Changed Linux dynamic library registration code to look at /proc/self/maps
instead of the rld data structures when REDIRECT_MALLOC is defined.
Otherwise some of the rld data data structures may be prematurely garbage
collected.
* Fixed USE_LD_WRAP a bit more, so it should now work without threads.
* Renamed XXX_THREADS macros to GC_XXX_THREADS for namespace correctness.
Temporarily added some backward compatibility definitions. Renamed
USE_LD_WRAP to GC_USE_LD_WRAP.
* Many MACOSX POWERPC changes, some additions to the gctest output, and
a few minor generic bug fixes (thanks to Dietmar Planitzer).
== [6.0alpha1] ==
* Added HP/PA prefetch support.
* Added -DDBG_HDRS_ALL and -DSHORT_DBG_HDRS to reduce the cost and improve
the reliability of generating pointer backtrace information, e.g. in
the Bigloo environment.
* Added parallel marking support (-DPARALLEL_MARK). This currently
works only under IA32 and IA64 Linux, but it shouldn't be hard to adapt
to other platforms. This is intended to be a lighter-weight (less
new code, probably not as scalable) solution than the work by Toshio Endo
et al, at the University of Tokyo. A number of their ideas were
reused, though the code wasn't, and the underlying data structure
is significantly different. In particular, we keep the global mark
stack as a single shared data structure, but most of the work is done
on smaller thread-local mark stacks.
* Changed GC_malloc_many to be cheaper, and to require less mutual exclusion
with -DPARALLEL_MARK.
* Added full support for thread local allocation under Linux
(-DTHREAD_LOCAL_ALLOC). This is a thin veneer on GC_malloc_many, and
should be easily portable to other platforms, especially those that
support pthreads.
* CLEAR_DOUBLE was not always getting invoked when it should have been.
* GC_gcj_malloc and friends used different out of memory handling than
everything else, probably because I forgot about one when I implemented
the other. They now both call GC_oom_fn(), not GC_oom_action().
* Integrated Jakub Jelinek's fixes for Linux/SPARC.
* Moved GC_objfreelist, GC_aobjfreelist, and GC_words_allocd out of
GC_arrays, and separately registered the first two as excluded roots.
This makes code compiled with gc_inl.h less dependent on the
collector version. (It would be nice to remove the inclusion of
gc_priv.h by gc_inl.h completely, but we're not there yet. The
locking definitions in gc_priv.h are still referenced.)
This change was later conditioned on SEPARATE_GLOBALS, which
is not defined by default, since it involves a performance hit.
* Register GC_obj_kinds separately as an excluded root region. The
attempt to register it with GC_arrays was usually failing. (This wasn't
serious, but seemed to generate some confusion.)
* Moved backptr.h to gc_backptr.h.
== [5.4] ==
* Fixed a typo that prevented compilation with -DUSE_3DNOW_PREFETCH (thanks to
Shawn Wagner for actually testing this).
* Fixed GC_is_thread_stack in solaris_threads.c. It forgot to return a value
in the common case.
* Fixed another silly syntax problem in GC_double_descr (thanks to
Fergus Henderson for finding it).
* Fixed a GC_gcj_malloc bug: It tended to release the allocator lock twice.
== [5.3] 2000-09-24 ==
* Fixed _end declaration for OSF1.
* There were lots of spurious leak reports in leak detection mode, caused
by the fact that some pages were not being swept, and hence unmarked
objects weren't making it onto free lists. (This bug dated back to 5.0.)
* Fixed a typo in the liblinuxgc.so Makefile rule.
* Added the GetExitCodeThread to Win32 GC_stop_world to (mostly) work
around a Windows 95 GetOpenFileName problem (thanks to Jacob Navia).
== [5.2] ==
* dyn_load.c declared GC_scratch_last_end_ptr as an extern even if it
was defined as a macro. This prevented the collector from building on
Irix.
* We quietly assumed that indirect mark descriptors were never 0.
Our own typed allocation interface violated that. This could result
in segmentation faults in the marker with typed allocation.
* Fixed a _DUSE_MUNMAP bug in the heap block allocation code (thanks to
Ben Hutchings for the patch).
* Taught the collector about VC++ handling array operator new (thanks to
Ben Hutchings for the patch).
* The two copies of gc_hdrs.h had diverged. Made one a link to the other
again.
== [5.1] ==
* Fixed a gc.h header bug which showed up under Irix (thanks to Dan Sullivan).
* Fixed a typo in GC_double_descr in typd_mlc.c.
This probably could result in objects described by array descriptors not
getting traced correctly (thanks to Ben Hutchings for pointing this out).
* The block nearly full tests in reclaim.c were not correct for 64 bit
environments. This could result in unnecessary heap growth under unlikely
conditions.
== [5.0] ==
* Fixed threadlibs.c for linux threads. -DUSE_LD_WRAP was broken and
-ldl was omitted. Fixed Linux stack finding code to handle
-DUSE_LD_WRAP correctly.
* Added MSWIN32 exception handler around marker, so that the collector
can recover from root segments that are unmapped during the collection.
This caused occasional failures under Windows 98, and may also be
an issue under Windows NT/2000.
== [5.0alpha7] ==
* -DREDIRECT_MALLOC was broken in alpha6. Fixed.
* Cleaned up gc_ccp.h slightly, thus also causing the HP C++ compiler to
accept it.
* Removed accidental reference to dbg_mlc.c, which caused dbg_mlc.o to be
linked into every executable.
* Added PREFETCH to bitmap marker. Changed it to use the header cache.
* GC_push_marked sometimes pushed one object too many, resulting in a
segmentation fault in GC_mark_from_mark_stack. This was probably an old
bug. It finally showed up in gctest on win32.
* Gc_priv.h erroneously #defined GC_incremental to be TRUE instead of FALSE
when SMALL_CONFIG was defined. This was no doubt a major performance bug for
the default win32 configuration.
* Removed -DSMALL_CONFIG from NT_MAKEFILE. It seemed like an anachronism now
that the average PC has 64MB or so.
* Integrated Bryce McKinlay's patches for linux threads and dynamic loading
from the libgcj tree. Turned on dynamic loading support for Linux/PPC.
* Changed the stack finding code to use environ on HP/UX (thanks
to Gustavo Rodriguez-Rivera for the suggestion). This should
probably be done on other platforms, too. Since I can't test those, that'll
wait until after 5.0.
== [5.0alpha6] ==
* GC_malloc_explicitly_typed and friends sometimes failed to
initialize first word.
* Added allocation routines and support in the marker for mark descriptors
in a type structure referenced by the first word of an object. This was
introduced to support gcj, but hopefully in a way that makes it
generically useful.
* Added GC_requested_heapsize, and inhibited collections in non-incremental
mode if the actual used heap size is less than what was explicitly
requested.
* The Solaris pthreads version of GC_pthread_create didn't handle a NULL
attribute pointer. Solaris thread support used the wrong default thread
stack size (thanks to Melissa O'Neill for the patch).
* Changed PUSH_CONTENTS macro to no longer modify first parameter.
This usually doesn't matter, but it was certainly an accident waiting
to happen ...
* Added GC_register_finalizer_no_order and friends to gc.h. They're
needed by Java implementations.
* Integrated a fix for a win32 deadlock resulting from clock() calling
malloc (thanks to Chris Dodd).
* Integrated Hiroshi Kawashima's port to Linux/MIPS. This was designed
for a handheld platform, and may or may not be sufficient for other
machines.
* Fixed a va_arg problem with the %c specifier in cordprnt.c. It appears
that this was always broken, but recent versions of gcc are the first to
report the (statically detectable) bug.
* Added an attempt at a more general solution to dlopen races/deadlocks.
GC_dlopen now temporarily disables collection. Still not ideal, but ...
* Added -DUSE_I686_PREFETCH, -DUSE_3DNOW_PREFETCH, and support for IA64
prefetch instructions. May improve performance measurably, but I'm not
sure the code will run correctly on processors that don't support the
instruction. Won't build except with very recent gcc.
* Added caching for header lookups in the marker. This seems to result
in a barely measurable performance gain. Added support for interleaved
lookups of two pointers, but unconfigured that since the performance
gain is currently near zero, and it adds to code size.
* Changed Linux DATASTART definition to check both data_start and
__data_start, since nothing else seems to be portable.
* Added -DUSE_LD_WRAP to optionally take advantage of the GNU ld function
wrapping mechanism. Probably currently useful only on Linux.
* Moved some variables for the scratch allocator into GC_arrays (suggested
by Martin Hirzel).
* Fixed a win32 threads bug that caused the collector to not look for
interior pointers from one of the thread stacks without
ALL_INTERIOR_POINTERS (thanks to Jeff Sturm).
* Added Mingw32 support (thanks to Jeff Sturm for the patch).
* Changed the alpha port to use the generic register scanning code instead
of alpha_mach_dep.s. Alpha_mach_dep.s doesn't look for pointers in fp
registers, but gcc sometimes spills pointers there (thanks to Manuel Serrano
for helping debug this). Changed the IA64 code to
do something similar for similar reasons.
== [5.0alpha4] 1999-10-30 ==
* Added protection fault handling patch for Linux/M68K from Fergus
Henderson and Roman Hodek.
* Removed the tests for SGI_SOURCE in new_gc_alloc.h. This was causing that
interface to fail on non-SGI platforms.
* Changed the Linux stack finding code to use /proc, after changing it
to use HEURISTIC1 (thanks to David Mossberger for pointing out /proc hook).
* Added HP/UX incremental GC support and HP/UX 11 thread support.
Thread support is currently still flaky.
* Added basic Linux/IA64 support.
* Integrated Anthony Green's PicoJava support.
* Integrated Scott Ananian's StrongARM/NetBSD support.
* Fixed some fairly serious performance bugs in the incremental
collector. These have probably been there essentially forever.
(Mark bits were sometimes set before scanning dirty pages.
The reclaim phase unnecessarily dirtied full small object pages.)
* Changed the reclaim phase to ignore nearly full pages to avoid
touching them.
* Limited GC_black_list_spacing to roughly the heap growth increment.
* Changed full collection triggering heuristic to decrease full GC
frequency by default, but to explicitly trigger full GCs during
heap growth. This doesn't always improve things, but on average it's
probably a win.
* GC_debug_free(0, ...) failed (thanks to Fergus Henderson for the
bug report and fix).
== [5.0alpha3] 1999-09-15 ==
(Also known as 4.15alpha3.)
* Added some highly incomplete code to support a copied young generation.
Comments on nursery.h are appreciated.
* Changed -DFIND_LEAK, -DJAVA_FINALIZATION, and -DFINALIZE_ON_DEMAND,
so the same effect could be obtained with a runtime switch. This is
a step towards standardizing on a single dynamic GC library.
* Significantly changed the way leak detection is handled, as a consequence
of the above.
== [5.0alpha2] 1999-07-23 ==
* Fixed bugs introduced in alpha1 (OpenBSD & large block initialization).
* Added -DKEEP_BACK_PTRS and backptr.h interface. (The implementation
idea came from Alan Demers.)
== [5.0alpha1] 1999-06-30 ==
(Also known as 4.15alpha1.)
* Reworked large block allocator. Now uses multiple doubly linked free
lists to approximate best fit.
* Changed heap expansion heuristic. Entirely free blocks are no longer
counted towards the heap size. This seems to have a major impact on
heap size stability; the old version could expand the heap way too
much in the presence of large block fragmentation.
* added -DGC_ASSERTIONS and some simple assertions inside the collector.
This is mainlyt for collector debugging.
* added -DUSE_MUNMAP to allow the heap to shrink. Supported on only
a few UNIX-like platforms for now.
* added GC_dump_regions() for debugging of fragmentation issues.
* Changed PowerPC pointer alignment under Linux to 4.
* Changed the Linux/Alpha port to walk the data segment backwards until
it encounters a SIGSEGV. The old way to find the start of the data
segment broke with a recent release.
* cordxtra.c needed to call GC_REGISTER_FINALIZER instead of
GC_register_finalizer, so that it would continue to work with GC_DEBUG.
* allochblk sometimes cleared the wrong block for debugging purposes
when it dropped blacklisted blocks. This could result in spurious
error reports with GC_DEBUG.
* added MACOS X Server support (thanks to Andrew Stone).
* Changed the Solaris threads code to ignore stack limits > 8 MB with
a warning. Empirically, it is not safe to access arbitrary pages
in such large stacks. And the dirty bit implementation does not
guarantee that none of them will be accessed.
* Integrated Martin Tauchmann's Amiga changes.
* Integrated James Dominy's OpenBSD/SPARC port.
== [4.14] 1999-04-16 ==
* changed STACKBOTTOM for DJGPP (thanks to Salvador Eduardo Tropea).
== [4.14alpha2] 1999-03-26 ==
* -DSMALL_CONFIG did not work reliably with large (> 4K) pages.
Recycling the mark stack during expansion could result in a size
zero heap segment, which confused things. (This was probably also an
issue with the normal config and huge pages.)
* Did more work to make sure that callee-save registers were scanned
completely, even with the setjmp-based code. Added USE_GENERIC_PUSH_REGS
macro to facilitate testing on machines I have access to.
* Added code to explicitly push register contents for win32 threads.
This seems to be necessary. (Thanks to Pierre de Rop.)
== [4.14alpha1] 1999-03-10 ==
* Fixed GC_print_source_ptr to not use a prototype.
* generalized CYGWIN test.
* gc::new did the wrong thing with PointerFreeGC placement (thanks to
Rauli Ruohonen).
* In the ALL_INTERIOR_POINTERS (default) case, some callee-save register
values could fail to be scanned if the register was saved and
reused in a GC frame. This showed up in verbose mode with gctest
compiled with an unreleased SGI compiler. I vaguely recall an old
bug report that may have been related. The bug was probably quite old.
(The problem was that the stack scanning could be deferred until
after the relevant frame was overwritten, and the new save location
might be outside the scanned area. Fixed by more eager stack scanning.)
* PRINT_BLACK_LIST had some problems. A few source addresses were garbage.
* Replaced Makefile.dj and added -I flags to cord make targets (thanks to
Gary Leavens).
* GC_try_to_collect was broken with the non-incremental collector.
* gc_cleanup destructors could pass the wrong address to
GC_register_finalizer_ignore_self in the presence of multiple
inheritance (thanks to Darrell Schiebel).
* Changed PowerPC Linux stack finding code.
== [4.13] 1999-02-19 ==
* Fixed a crucial bug in the Watcom port. There was a redundant declaration
of GC_push_one in gc_priv.h.
* Added FINALIZE_ON_DEMAND.
* Fixed some pre-ANSI cc problems in test.c.
* Removed getpagesize() use for Solaris. It seems to be missing in one
or two versions.
* Fixed bool handling for SPARCCompiler version 4.2.
* Fixed some files in include that had gotten unlinked from the main
copy.
* Some RS/6000 fixes (missing casts). (Thanks to Toralf Foerster.)
* Fixed several problems in GC_debug_realloc, affecting mostly the
FIND_LEAK case.
* GC_exclude_static_roots contained a buggy unsigned comparison to
terminate a loop (thanks to Wilson Ho).
* CORD_str failed if the substring occurred at the last possible position.
(Only affects cord users.)
* Fixed Linux code to deal with RedHat 5.0 and integrated Peter Bigot's
os_dep.c code for dealing with various Linux versions.
* Added workaround for Irix pthreads sigaction bug and possible signal
misdirection problems.
== [4.13alpha3] 1998-12-08 ==
* Fixed MSWIN32 recognition test, which interfered with cygwin.
* Removed unnecessary gc_watcom.asm from distribution. Removed
some obsolete README.win32 text.
* Added Alpha Linux incremental GC support (thanks to Philipp Tomsich
for code for retrieving the fault address in a signal handler).
Changed Linux signal handler context argument to be a pointer.
* Took care of some new warnings generated by the 7.3 SGI compiler.
* Integrated Phillip Musumeci's FreeBSD/ELF fixes.
* -DIRIX_THREADS was broken with the -o32 ABI (typo in gc_priv.h).
== [4.13alpha2] 1998-08-08 ==
* Fixed more Linux threads problems.
* Changed default GC_free_space_divisor to 3 with new large block allocation
(thanks to Matthew Flatt for some measurements that suggest the old
value sometimes favors space too much over time).
* More CYGWIN32 fixes.
* Integrated Tyson Dowd's Linux-M68K port.
* Minor HP PA and DEC UNIX fixes from Fergus Henderson.
* Integrated Christoffe Raffali's Linux-SPARC changes.
* Allowed for one more GC fixup iteration after a full GC in incremental
mode. Some quick measurements suggested that this significantly
reduces pause times even with smaller GC_RATE values.
* Moved some more GC data structures into GC_arrays. This decreases
pause times and GC overhead, but makes debugging slightly less convenient.
* Fixed namespace pollution problem ("excl_table").
* Made GC_incremental a constant for -DSMALL_CONFIG, hopefully shrinking
that slightly.
* Added some win32 threads fixes.
* Integrated Ivan Demakov and David Stes' Watcom fixes.
* Various other minor fixes contributed by many people.
* Renamed config.h to gcconfig.h, since config.h tends to be used for
many other things.
* Integrated Matthew Flatt's support for 68K MacOS "far globals".
* Fixed up some of the dynamic library Makefile targets for consistency
across platforms.
* Fixed a USE_MMAP typo that caused out-of-memory handling to fail
on Solaris.
* Added code to test.c to test thread creation a bit more.
* Integrated GC_win32_free_heap (as suggested by Ivan Demakov).
* Fixed Solaris 2.7 stack base finding problem. (This may actually
have been done in an earlier alpha release.)
== [4.13alpha1] 1998-02-17 ==
* Changed RS6000 STACKBOTTOM.
* Integrated Patrick Beard's Mac changes.
* Alpha1 didn't compile on Irix m.n, m < 6.
* Replaced Makefile.dj with a new one from Gary Leavens.
* Added Andrew Stitcher's changes to support SCO OpenServer.
* Added PRINT_BLACK_LIST, to allow debugging of high densities of false
pointers.
* Added code to debug allocator to keep track of return address
in GC_malloc caller, thus giving a bit more context.
* Changed default behavior of large block allocator to more
aggressively avoid fragmentation. This is likely to slow down the
collector when it succeeds at reducing space cost.
* Integrated Fergus Henderson's CYGWIN32 changes. They are untested,
but needed for newer versions.
* USE_MMAP had some serious bugs. This caused the collector to fail
consistently on Solaris with -DSMALL_CONFIG.
* Added Linux threads support (thanks to Fergus Henderson).
== [4.12] 1997-08-26 ==
* Fixed ElfW definition in dyn_load.c.
This prevented the dynamic library support from compiling on some
older ELF Linux systems.
* Fixed UTS4 port (which I apparently mangled during the integration).
(Thanks to Alistair Crooks.)
* "Make C++" failed on Suns with SC4.0, due to a problem with "bool".
Fixed in gc_priv.h.
* Added more pieces for GNU win32 (thanks to Timothy N. Newsham).
The current state of things should suffice for at least some
applications.
* Changed the out of memory retry count handling. (This matters only
if GC_max_retries > 0, which is no longer the default.)
* If a /proc read failed repeatedly, GC_written_pages was not updated
correctly (thanks to Peter Chubb for diagnosing this).
* Under unlikely circumstances, the allocator could infinite loop in
an out of memory situation (thanks to Kenjiro Taura for
identifying the problem and supplying a fix).
* Fixed a syntactic error in the DJGPP code. Also fixed a test program
problem with DJGPP (thanks to Fergus Henderson and Peter Monks).
* Atomic uncollectible objects were not treated correctly by the
incremental collector. This resulted in weird log statistics and
occasional performance problems (thanks to Peter Chubb for pointing this out).
* Fixed some problems resulting from compilers that don't define
__STDC__. In this case void * and char * were used inconsistently
in some cases. (Void * should not have been used at all. If
you have an ANSI superset compiler that does not define __STDC__,
please compile with -D__STDC__=0. Thanks to Manuel Serrano and others
for pointing out the problem.)
* Fixed a compilation problem on Irix with -n32 and -DIRIX_THREADS.
Also fixed some other IRIX_THREADS problems which may or may not have
had observable symptoms.
* Fixed an HP PA compilation problem in dyn_load.c (thanks to
Philippe Queinnec).
* SEGV fault handlers sometimes did not get reset correctly (thanks
to David Pickens).
* Added a fix for SOLARIS_THREADS on Intel (thanks to David Pickens).
This probably needs more work to become functional.
* Fixed struct sigcontext_struct in os_dep.c for compilation under
Linux 2.1.X (thanks to Fergus Henderson).
* Changed the DJGPP STACKBOTTOM and DATASTART values to those ones suggested
(by Kristian Kristensen). These may still not be right, but it is
it is likely to work more often than what was there before. They may
even be exactly right.
* Added a #include <string.h> to test_cpp.cc. This appears to help
with HP/UX and gcc (thanks to Assar Westerlund).
* Version 4.11 failed to run in incremental mode on recent 64-bit Irix
kernels. This was a problem related to page unaligned heap segments.
Changed the code to page align heap sections on all platforms.
(I had mistakenly identified this as a kernel problem earlier.
It was not.)
* Version 4.11 did not make allocated storage executable, except on
one or two platforms, due to a bug in a #if test (thanks to David Grove
for pointing this out).
* Added sparc_sunos4_mach_dep.s to support Sun's compilers under SunOS4.
* Added GC_exclude_static_roots.
* Fixed the object size mapping algorithm. This shouldn't matter,
but the old code was ugly.
* Heap checking code could die if one of the allocated objects was
larger than its base address. (Unsigned underflow problem. Thanks
to Clay Spence for isolating the problem.)
* Added RS6000 (AIX) dynamic library support and fixed STACK_BOTTOM (thanks
to Fred Stearns).
* Added Fergus Henderson's patches for improved robustness with large
heaps and lots of blacklisting.
* Added Peter Chubb's changes to support Solaris Pthreads, to support
MMAP allocation in Solaris, to allow Solaris to find dynamic libraries
through /proc, to add malloc_typed_ignore_off_page, and a few other
minor features and bug fixes.
* The Solaris 2 port should not use sbrk. I received confirmation from
Sun that the use of sbrk and malloc in the same program is not
supported. The collector now defines USE_MMAP by default on Solaris.
* Replaced the djgpp makefile with Gary Leavens' version.
* Fixed MSWIN32 detection test.
* Added Fergus Henderson's patches to allow putting the collector into
a DLL under GNU win32.
* Added Ivan V. Demakov's port to Watcom C on X86.
* Added Ian Piumarta's Linux/PowerPC port.
* Added PointerFreeGC to the placement options in gc_cpp.h (suggested by
Brian Burton). This is of course unsafe, and may be controversial.
On the other hand, it seems to be needed often enough that it's worth
adding as a standard facility.
* Add Lars Farm's suggestions on building the collector for MacOS.
== [4.12alpha2] ==
(Changes not specified.)
== [4.11] 1996-12-03 ==
* Rationalized (hopefully) GC_try_to_collect in an incremental collection
environment. It appeared to not handle a call while a collection was in
progress, and was otherwise too conservative.
* Merged GC_reclaim_or_delete_all into GC_reclaim_all to get rid of some
code.
* Added Patrick Beard's Mac fixes, with substantial completely untested
modifications.
* Fixed the MPROTECT_VDB code to deal with large pages and imprecise
fault addresses (as on an UltraSPARC running Solaris 2.5). Note that this
was not a problem in the default configuration, which uses PROC_VDB.
* The DEC Alpha assembly code needed to restore $gp between calls (thanks to
Fergus Henderson for tracking this down and supplying a patch).
* The write command for "de" was completely broken for large files.
I used the easiest portable fix, which involved changing the semantics
so that f.new is written instead of overwriting f. That's safer anyway.
* Added README.solaris2 with a discussion of the possible problems of
mixing the collector's sbrk allocation with malloc/realloc.
* Changed the data segment starting address for SGI machines. The
old code failed under IRIX6.
* Required double word alignment for MIPS.
* Various minor fixes to remove warnings.
* Attempted to fix some Solaris threads problems (reported by Zhiying Chen).
In particular, the collector could try to fork a thread with the
world stopped as part of GC_thr_init. It also failed to deal with
the case in which the original thread terminated before the whole
process did.
* Added -DNO_EXECUTE_PERMISSION. This has a major performance impact
on the incremental collector under Irix, and perhaps under other
operating systems.
* Added some code to support allocating the heap with mmap. This may
be preferable under some circumstances.
* Integrated dynamic library support for HP (thanks to Knut Tvedten).
* Integrated James Clark's win32 threads support, and made a number
of changes to it (many of which suggested by Pontus Rydin). This is still
not 100% solid.
* Integrated Alistair G. Crooks' support for UTS4 running on an Amdahl
370-class machine.
* Fixed a serious bug in explicitly typed allocation. Objects requiring
large descriptors where handled in a way that usually resulted in
a segmentation fault in the marker (thanks to Jeremy Fitzhardinge
for helping to track this down).
* Added partial support for GNU win32 development (thanks to
Fergus Henderson).
* Added optional support for Java-style finalization semantics (thanks to
Patrick Bridges). This is recommended only for Java implementations.
* GC_malloc_uncollectable faulted instead of returning 0 when out of
memory (thanks to Daniel R. Grayson for noticing).
* Calls to GC_base before the collector was initialized failed on a
DEC Alpha (thanks to Matthew Flatt).
* Added base pointer checking to GC_REGISTER_FINALIZER in debugging mode
(thanks to Jeremy Fitzhardinge).
* GC_debug_realloc failed for uncollectible objects (thanks to
Jeremy Fitzhardinge).
* Explicitly typed allocation could crash if it ran out of memory (thanks to
Jeremy Fitzhardinge).
* Added minimal support for a DEC Alpha running Linux.
* Fixed a problem with allocation of objects whose size overflowed
ptrdiff_t. (This now fails unconditionally, as it should.)
* Added the beginning of Irix pthread support.
* Integrated Xiaokun Zhu's fixes for djgpp 2.01.
* Added SGI-style STL allocator support (gc_alloc.h).
* Fixed a serious bug in README.solaris2.
Multi-threaded programs must include
gc.h with SOLARIS_THREADS defined.
* Changed GC_free so it actually deallocates uncollectible objects (thanks
to Peter Chubb for pointing out the problem).
* Added Linux ELF support for dynamic libraries (thanks to Patrick Bridges).
* Changed the Borland cc configuration so that the assembler is not
required.
* Fixed a bug in the C++ test that caused it to fail in 64-bit
environments.
== [4.10t3] 1996-11-18 ==
Some changes related to threads support.
== [4.10] 1996-02-19 ==
* Fixed a typo around a call to GC_collect_or_expand in alloc.c. It broke
handling of out of memory. (Thanks to Patrick C. Beard for noticing.)
== [4.9] 1996-02-12 ==
* More README.debugging fixes.
* Objects ready for finalization, but not finalized in the same GC
cycle, could be prematurely collected. This occasionally happened
in test_cpp.
* Too little memory was obtained from the system for very large
objects. That could cause a heap explosion if these objects were
not contiguous (e.g. under PCR), and too much of them was blacklisted.
* Due to an improper initialization, the collector was too hesitant to
allocate blacklisted objects immediately after system startup.
* Moved GC_arrays from the data into the bss segment by not explicitly
initializing it to zero. This significantly
reduces the size of executables, and probably avoids some disk accesses
on program startup. It's conceivable that it might break a port that I
didn't test.
* Fixed EMX_MAKEFILE to reflect the gc_c++.h to gc_cpp.h renaming which
occurred a while ago.
== [4.8] 1995-11-20 ==
* Changed a "comment" in a MacOS specific part of mach_dep.c that caused
gcc to fail on other platforms.
== [4.7] 1995-11-18 ==
* Fixed some compilation problems with -DCHECKSUMS (thanks to Ian Searle).
* Updated some Mac specific files (to synchronize with Patrick C. Beard).
* Fixed a serious bug for machines with non-word-aligned pointers.
(Thanks to Patrick C. Beard for pointing out the problem. The collector
should fail almost any conceivable test immediately on such machines.)
== [4.6] 1995-11-09 ==
* Added Linux ELF support (thanks to Arrigo Triulzi).
* GC_base crashed if it was called before any other GC_ routines.
This could happen if a gc_cleanup object was allocated outside the heap
before any heap allocation.
* The heap expansion heuristic was not stable if all objects had finalization
enabled. Fixed finalize.c to count memory in finalization queue and
avoid explicit deallocation. Changed alloc.c to also consider this count.
(This is still not recommended. It's expensive if nothing else. Thanks
to John Ellis for pointing this out.)
* GC_malloc_uncollectable(0) was broken (thanks to Phong Vo for pointing
this out).
* The collector didn't compile under Linux 1.3.X (thanks to Fred Gilham for
pointing this out). The current workaround is ugly, but expected to be
temporary.
* Fixed a formatting problem for SPARC stack traces.
* Fixed some '=='s in os_dep.c that should have been assignments.
Fortunately these were in code that should never be executed anyway (thanks
to Fergus Henderson).
* Fixed the heap block allocator to only drop blacklisted blocks in small
chunks. Made BL_LIMIT self adjusting. (Both of these were in response
to heap growth observed by Paul Graham.)
* Fixed the Metrowerks/68K Mac code to also mark from a6 (thanks to
Patrick C. Beard).
* Significantly updated README.debugging.
* Fixed some problems with longjmps out of signal handlers, especially under
Solaris. Added a workaround for the fact that siglongjmp doesn't appear to
do the right thing with -lthread under Solaris.
* Added MSDOS/djgpp port (thanks to Mitch Harris).
* Added "make reserved_namespace" and "make user_namespace". The
first renames ALL "GC_xxx" identifiers as "_GC_xxx". The second is the
inverse transformation. Note that doing this is guaranteed to break all
clients written for the other names.
* descriptor field for kind NORMAL in GC_obj_kinds with ADD_BYTE_AT_END
defined should be -ALIGNMENT not WORDS_TO_BYTES(-1). This is
a serious bug on machines with pointer alignment of less than a word.
* GC_ignore_self_finalize_mark_proc didn't handle pointers to very near the
end of the object correctly. Caused failures of the C++ test on a DEC Alpha
with g++.
* gc_inl.h still had problems. Partially fixed. Added warnings at the
beginning to hopefully specify the remaining dangers.
* Added DATAEND definition to config.h.
* Fixed some of the .h file organization. Fixed "make floppy".
== [4.5] 1995-06-14 ==
* Fixed many minor and one major README bugs (thanks to Franklin Chen
for pointing out many of them).
* Fixed ALPHA/OSF/1 dynamic library support (thanks to Jonathan Bachrach).
* Added incremental GC support (MPROTECT_VDB) for Linux (with some
help from Bruno Haible).
* Altered SPARC recognition tests in gc.h and config.h (mostly as
suggested by Fergus Henderson).
* Added basic incremental GC support for win32, as implemented by
Windows NT and Windows 95. GC_enable_incremental is a no-op
under win32s, which doesn't implement enough of the VM interface.
* Added -DLARGE_CONFIG.
* Fixed GC_..._ignore_off_page to also function without
-DALL_INTERIOR_POINTERS.
* (Hopefully) fixed RS/6000 port. (Only the test was broken.)
* Fixed a performance bug in the non-incremental collector running
on machines supporting incremental collection with MPROTECT_VDB
(e.g. SunOS 4, DEC AXP). This turned into a correctness bug under
win32s with win32 incremental collection. (Not all memory protection
was disabled.)
* Fixed some ppcr related bit rot.
* Caused dynamic libraries to be unregistered before re-registering.
The old way turned out to be a performance bug on some machines.
* GC_root_size was not properly maintained under MSWIN32.
* Added -DNO_DEBUGGING and GC_dump.
* Fixed a couple of bugs arising with SOLARIS_THREADS +
REDIRECT_MALLOC.
* Added NetBSD/M68K port (thanks to Peter Seebach).
* Fixed a serious realloc bug. For certain object sizes, the collector
wouldn't scan the expanded part of the object. (Thanks to Clay Spence
for noticing the problem, and helping me to track it down.)
== [4.4] 1995-02-18 ==
* ASM_CLEAR_CODE was erroneously defined for HP
PA machines, resulting in a compile error.
* Fixed OS/2 Makefile to create a library (thanks to Mark Boulter).
* Gc_cleanup objects didn't work if they were created on
the stack. Fixed.
* One copy of Gc_cpp.h in the distribution was out of
synch, and failed to document some known compiler
problems with explicit destructor invocation. Partially
fixed. There are probably other compilers on which
gc_cleanup is miscompiled.
* Fixed Makefile to pass C compiler flags to C++ compiler.
* Added Mac fixes.
* Fixed os_dep.c to work around what appears to be
a new and different VirtualQuery bug under newer
versions of win32S.
* GC_non_gc_bytes was not correctly maintained by
GC_free. Fixed (thanks to James Clark).
* Added GC_set_max_heap_size.
* Changed allocation code to ignore blacklisting if it is preventing
use of a very large block of memory. This has the advantage
that naive code allocating very large objects is much more
likely to work. The downside is you might no
longer find out that such code should really use
GC_malloc_ignore_off_page.
* Changed GC_printf under win32 to close and reopen the file
between calls. FAT file systems otherwise make the log file
useless for debugging.
* Added GC_try_to_collect and GC_get_bytes_since_gc. These
allow starting an abortable collection during idle times.
This facility does not require special OS support. (Thanks to
Michael Spertus of Geodesic Systems for suggesting this. It was
actually an easy addition. Kumar Srikantan previously added a similar
facility to a now ancient version of the collector. At the time
this was much harder, and the result was less convincing.)
* Added some support for the Borland development environment (thanks
to John Ellis and Michael Spertus).
* Removed a misfeature from checksums.c that caused unexpected
heap growth (thanks to Scott Schwartz).
* Changed finalize.c to call WARN if it encounters a finalization cycle.
WARN is defined in gc_priv.h to write a message, usually to stdout.
In many environments, this may be inappropriate.
* Renamed NO_PARAMS in gc.h to GC_NO_PARAMS, thus adhering to my own
naming convention.
* Added GC_set_warn_proc to intercept warnings.
* Fixed Amiga port (thanks to Michel Schinz).
* Fixed a bug in mark.c that could result in an access to unmapped
memory from GC_mark_from_mark_stack on machines with unaligned
pointers.
* Fixed a win32 specific performance bug that could result in scanning of
objects allocated with the system malloc.
* Added REDIRECT_MALLOC.
== [4.3] 1994-12-23 ==
* Fixed SPARC alignment problem with GC_DEBUG.
* Fixed Solaris threads /proc workaround. The real
problem was an interaction with mprotect.
* Incorporated fix from Patrick Beard for gc_c++.h (now gc_cpp.h).
* Slightly improved allocator space utilization by
fixing the GC_size_map mechanism.
* Integrated some Sony News and MIPS RISCos 4.51
patches (thanks to Nobuyuki Hikichi at Software Research Associates,
Inc., Japan).
* Fixed HP_PA alignment problem (thanks to Brian F. Dennis).
* Added GC_same_obj and friends. Changed GC_base
to return 0 for pointers past the end of large objects.
Improved GC_base performance with ALL_INTERIOR_POINTERS
on machines with a slow integer mod operation.
Added GC_PTR_ADD, GC_PTR_STORE, etc. to prepare
for preprocessor.
* changed the default on most UNIX machines to be that
signals are not disabled during critical GC operations.
This is still ANSI-conforming, though somewhat dangerous
in the presence of signal handlers. But the performance
cost of the alternative is sometimes problematic.
Can be changed back with a minor Makefile edit.
* renamed IS_STRING in gc.h, to CORD_IS_STRING, thus
following my own naming convention. Added the function
CORD_to_const_char_star.
* Fixed a gross bug in GC_finalize. Symptom: occasional
address faults in that function (thanks to Anselm Baird-Smith).
* Added port to ICL DRS6000 running DRS/NX. Restructured
things a bit to factor out common code, and remove obsolete
code. Collector should now run under SUNOS5 with either
mprotect or /proc dirty bits. (Thanks to Douglas Steel.)
* More bug fixes and workarounds for Solaris 2.X. (These were
mostly related to putting the collector in a dynamic library,
which didn't really work before. Also SOLARIS_THREADS
didn't interact well with dl_open.) (Thanks to Brian Lewis.)
* Fixed a serious performance bug on the DEC Alpha. The text
segment was getting registered as part of the root set.
(Amazingly, the result was still fast enough that the bug
was not conspicuous.) The fix works on OSF/1, version 1.3.
Hopefully it also works on other versions of OSF/1 ...
* Fixed a bug in GC_clear_roots.
* Fixed a bug in GC_generic_malloc_words_small that broke
gc_inl.h (reported by Antoine de Maricourt).
* Fixed some problems with cord/de under Linux.
* Fixed some cord problems, notably with CORD_riter4.
* Added DG/UX port (thanks to Ben A. Mesander).
* Added finalization registration routines with weaker ordering
constraints. (This is necessary for C++ finalization with
multiple inheritance, since the compiler often adds self-cycles.)
* Filled the holes in the SCO port (thanks to Michael Arnoldus).
* Completely rewritten the documentation in the interface gc_c++.h
(later renamed gc_cpp.h) making it both clearer and more precise (done by
John Ellis).
* The definition of accessibility now ignores pointers from a finalizable
object (an object with a clean-up function) to itself (done by John Ellis).
This allows objects with virtual base classes to be finalizable by the
collector. Compilers typically implement virtual base classes using
pointers from an object to itself, which under the old definition of
accessibility prevented objects with virtual base classes from ever
being collected or finalized.
* gc_cleanup now includes gc as a virtual base. This was enabled by
the change in the definition of accessibility (by John Ellis).
* Added support for operator new[] (by John Ellis). Since most compilers
don't yet support operator new[], it is conditionalized on
-DOPERATOR_NEW_ARRAY. The code is untested, but its trivial and looks
correct.
* The test program test_gc_c++ (later renamed test_cpp.cc)
tries to test for the C++-specific functionality not tested by the
other programs.
* Added unistd.h include to misc.c. (Needed for ppcr.)
* Added PowerMac port (thanks to Patrick C. Beard).
* Fixed "srcdir"-related Makefile problems. Changed things so
that all externally visible include files always appear in the
include subdirectory of the source. Made gc.h directly
includable from C++ code (thanks to Per Bothner).
* Changed Intel code to also mark from ebp (thanks to Kevin Warne).
* Renamed C++ related files so they could live in a FAT
file system (thanks to Charles Fiterman).
* Changed Windows NT Makefile to include C++ support in
gc.lib. Added C++ test as Makefile target.
== [4.2] 1994-08-03 ==
* Multiple bug fixes/workarounds in the Solaris threads version.
(It occasionally failed to locate some register contents for
marking. It also turns out that thr_suspend and friends are
unreliable in Solaris 2.3. Dirty bit reads appear
to be unreliable under some weird
circumstances. My stack marking code
contained a serious performance bug. The new code is
extremely defensive, and has not failed in several CPU
hours of testing. But no guarantees ...)
* Added MacOS support. (Thanks to Patrick C. Beard.
David Chase suggested several improvements.)
* Fixed several syntactic bugs in gc_c++.h and friends. (These
didn't bother g++, but did bother most other compilers.)
Fixed gc_c++.h finalization interface.
* 64 bit alignment for allocated objects was not guaranteed in a
few cases in which it should have been.
* Added GC_malloc_atomic_ignore_off_page.
* Added GC_collect_a_little.
* Added some prototypes to gc.h.
* Some other minor bug fixes (notably in Makefile).
* Fixed OS/2 / EMX port (thanks to Ari Huttunen).
* Fixed AmigaDOS port (thanks to Michel Schinz).
* Fixed the DATASTART definition under Solaris. There
was a 1 in 16K chance of the collector missing the first
64K of static data (and thus crashing).
* Fixed some blatant anachronisms in the README file.
* Fixed PCR-Makefile for upcoming PPCR release.
== [4.1] 1994-05-20 ==
* Changed finalization implementation to guarantee that
finalization procedures are called outside of the allocation
lock, making direct use of the interface a little less dangerous.
MAY BREAK EXISTING CLIENTS that assume finalizers
are protected by a lock. Since there seem to be few multi-threaded
clients that use finalization, this is hopefully not much of
a problem.
* Fixed a gross bug in CORD_prev.
* Fixed a bug in blacklst.c that could result in unbounded
heap growth during startup on machines that do not clear
memory obtained from the OS (e.g. win32S).
* Ported de editor to win32/win32S. (This is now the only
version with a mouse-sensitive UI. Thanks to Rob Haack for the
implementation based on the generic Windows application template.)
* Added GC_malloc_ignore_off_page to allocate large arrays
in the presence of ALL_INTERIOR_POINTERS.
* Changed GC_call_with_alloc_lock to not disable signals in
the single-threaded case.
* Reduced retry count in GC_collect_or_expand for garbage
collecting when out of memory.
* Made uncollectible allocations bypass black-listing, as they
should.
* Fixed a bug in typed_test in test.c that could cause (legitimate)
GC crashes.
* Fixed some potential synchronization problems in finalize.c
* Fixed a real locking problem in typd_mlc.c.
* Worked around an AIX 3.2 compiler feature that results in
out of bounds memory references.
* Partially worked around an IRIX5.2 beta problem (which may
or may not persist to the final release).
* Fixed a bug in the heap integrity checking code that could
result in explicitly deallocated objects being identified as
smashed. Fixed a bug in the dbg_mlc stack saving code
that caused old argument pointers to be considered live.
* Fixed a bug in CORD_ncmp (and hence CORD_str).
* Repaired the OS2 port, which had suffered from bit rot
in 4.0. Worked around what appears to be CSet/2 V1.0
optimizer bug.
* Fixed a Makefile bug for target "c++".
== [4.0] 1994-04-07 ==
* Added support for Solaris threads (which was possible
only by reimplementing some fraction of Solaris threads,
since Sun doesn't currently make the thread debugging
interface available).
* Added non-threads win32 and win32S support.
* (Grudgingly, with suitable muttering of obscenities) renamed
files so that the collector distribution could live on a FAT
file system. Files that are guaranteed to be useless on
a PC still have long names. Gc_inline.h and gc_private.h
still exist, but now just include gc_inl.h and gc_priv.h.
* Fixed a really obscure bug in finalization that could cause
undetected mark stack overflows. (I would be surprised if
any real code ever tickled this one.)
* Changed finalization code to dynamically resize the hash
tables it maintains. (This probably does not matter for well-
-written code. It no doubt does for C++ code that overuses
destructors.)
* Added typed allocation primitives. Rewrote the marker to
accommodate them with more reasonable efficiency. This
change should also speed up marking for GC_malloc allocated
objects a little. See gc_typed.h for new primitives. (Thanks to
Zhong Shao performed much of the experimentation that led to the
current typed allocation facility.)
* Improved debugging facilities slightly. Allocation time
stack traces are now kept by default on SPARC/SUNOS4. (Thanks to
Scott Schwartz.)
* Added better support for small heap applications.
* Significantly extended cord package. Fixed a bug in the
implementation of lazily read files. Printf and friends now
have cord variants. Cord traversals are a bit faster.
* Made ALL_INTERIOR_POINTERS recognition the default.
* Fixed de so that it can run in constant space, independent
of file size. Added simple string searching to cords and de.
* Added the Hull-Ellis C++ interface (supplied by Jesse Hull and John Ellis).
* Added dynamic library support for OSF/1 (thanks to Alan Dosser and
Tim Bingham at DEC).
* Changed argument to GC_expand_hp to be expressed
in units of bytes instead of heap blocks. (Necessary
since the heap block size now varies depending on
configuration. The old version was never very clean.)
* Added GC_get_heap_size(). The previous "equivalent"
was broken.
* Restructured the Makefile a bit.
* Added FreeBSD port (provided by Jeffrey Hsu).
== [3.7] 1994-03-15 ==
* Added a workaround for an HP/UX compiler bug.
* Fixed another stack clearing performance bug. Reworked
that code once more.
== [3.6] 1994-01-14 ==
* fixed a bug in the mark stack growth code that was introduced
in 3.4.
* fixed Makefile to work around DEC AXP compiler tail recursion
bug.
== [3.5] ==
* Minor collections now mark from roots only once, if that
doesn't cause an excessive pause.
* The stack clearing heuristic was refined to prevent anomalies
with very heavily recursive programs and sparse stacks.
* Fixed a bug that prevented mark stack growth in some cases.
GC_objects_are_marked should be set to TRUE after a call
to GC_push_roots and as part of GC_push_marked, since
both can now set mark bits. I think this is only a performance
bug, but I wouldn't bet on it. It's certainly very hard to argue
that the old version was correct.
* Fixed an incremental collection bug that prevented it from
working at all when HBLKSIZE != getpagesize()
* Changed dynamic_loading.c to include gc_priv.h before testing
DYNAMIC_LOADING. SunOS dynamic library scanning
must have been broken in 3.4.
* Object size rounding now adapts to program behavior.
* Added a workaround (provided by Manuel Serrano and
colleagues) to a long-standing SunOS 4.X (and 3.X) ld bug
that I had incorrectly assumed to have been squished.
The collector was broken if the text segment size was within
32 bytes of a multiple of 8K bytes, and if the beginning of
the data segment contained interesting roots. The workaround
assumes a demand-loadable executable. The original may have
have "worked" in some other cases.
* Added dynamic library support under IRIX5.
* Added support for EMX under OS/2 (thanks to Ari Huttunen).
* Added support of Motorola 88K processor running CX/UX (by Brent Benson).
== [3.4] ==
* Fixed a performance bug in GC_realloc.
* Updated the amiga port.
* Added NetBSD and 386BSD ports (supplied by Alistair G. Crooks).
* Added cord library.
* Added trivial performance enhancement for
ALL_INTERIOR_POINTERS (do not scan last word).
== [3.3] 1993-10-02 ==
* PCR-specific bugs (thanks to Neil Sharman).
* Missing locking in GC_free, redundant FASTUNLOCK
in GC_malloc_stubborn, and 2 bugs in
GC_unregister_disappearing_link (pointed out by Neil Sharman).
* Common symbols allocated by the SunOS4.X dynamic loader
were not included in the root set.
* Bug in GC_finalize (reported by Brian Beuning and Alan Dosser).
* Merged Amiga port from Jesper Peterson (untested).
* Merged NeXT port from Thomas Funke (significantly
modified and untested). (Also thanks to Brian D. Carlstrom for
the supplied the NeXT ports.)
== [3.2] ==
Fixed a serious and not entirely repeatable bug in
the incremental collector. It appeared only when dirty bit info
on the roots was available, which is normally only under Solaris.
It also added GC_general_register_disappearing_link, and some
testing code. Interface.c disappeared.
== [3.1] ==
* A workaround for a SunOS 4.X SPARC C compiler
misfeature that caused problems when the collector was turned into
a dynamic library.
* A fix for a bug in GC_base that could result in a memory fault.
* A fix for a performance bug (and several other misfeatures) pointed
out by Dave Detlefs and Alan Dosser.
* Use of dirty bit information for static data under Solaris 2.X.
* DEC Alpha/OSF1 support (thanks to Alan Dosser).
* Incremental collection on more platforms.
* A more refined heap expansion policy. Less space usage by default.
* Various minor enhancements to reduce space usage, and to reduce
the amount of memory scanned by the collector.
* Uncollectible allocation without per object overhead.
* More conscientious handling of out-of-memory conditions.
* Fixed a bug in debugging stubborn allocation.
* Fixed a bug that resulted in occasional erroneous reporting of smashed
objects with debugging allocation.
* Fixed bogus leak reports of size 4096 blocks with FIND_LEAK.
== [3.0] ==
Added generational/incremental collection and stubborn objects.
== [2.6] 1993-04-27 ==
(Changes not specified.)
== [2.5] ==
* Removed an explicit call to exit(1)
* Fixed calls to GC_printf and GC_err_printf, so the correct number of
arguments are always supplied. The OS/2 C compiler gets confused if
the number of actuals and the number of formals differ. (ANSI C
doesn't require this to work. The ANSI sanctioned way of doing things
causes too many compatibility problems.)
== [2.4] 1993-01-26 ==
Added GC_free_space_divisor as a tuning knob, added
support for OS/2 and linux, and fixed the following bugs:
* On machines with unaligned pointers (e.g. Sun 3), every 128th word could
fail to be considered for marking.
* Dynamic_load.c erroneously added 4 bytes to the length of the data and
bss sections of the dynamic library. This could result in a bad memory
reference if the actual length was a multiple of a page. (Observed on
Sun 3. Can probably also happen on a Sun 4.)
(Thanks to Robert Brazile for pointing out that the Sun 3 version
was broken. Dynamic library handling is still broken on Sun 3s
under 4.1.1U1, but apparently not 4.1.1. If you have such a machine,
use -Bstatic.)
== [2.3] ==
* Added ALL_INTERIOR_POINTERS.
* Missing declaration of etext in the A/UX version.
* Some PCR root-finding problems.
* Blacklisting was not 100% effective, because the plausible future
heap bounds were being miscalculated.
* GC_realloc didn't handle out-of-memory correctly.
* GC_base could return a nonzero value for addresses inside free blocks.
* test.c wasn't really thread safe, and could erroneously report failure
in a multi-threaded environment. (The locking primitives need to be
replaced for other threads packages.)
* GC_CONS was thoroughly broken.
* On a SPARC with dynamic linking, signals stayed disabled while the
client code was running (thanks to Manuel Serrano).
== [2.2] ==
* GC_realloc could fail to extend the size of the object for certain large
object sizes.
* A blatant subscript range error in GC_printf, which unfortunately
wasn't exercised on machines with sufficient stack alignment constraints.
* GC_register_displacement did the wrong thing if it was called after
any allocation had taken place.
* The leak finding code would eventually break after 2048 byte
byte objects leaked.
* interface.c didn't compile.
* The heap size remained much too small for large stacks.
* The stack clearing code behaved badly for large stacks, and perhaps
on HP/PA machines.
== [2.1] ==
* The first stable version since 1.9.
* Added support for PPCR.
== [2.0] ==
* Introduced a consistent naming convention for collector
routines and added support for registering dynamic library data segments
in the standard mark_roots.c (original code supporting the SunOS dynamic
loader provided by Bill Janssen). Most of the data structures were revamped.
The treatment of interior pointers was completely changed. Finalization
was added. Support for locking was added. Object kinds were added.
We added a black listing facility to avoid allocating at addresses known
to occur as integers somewhere in the address space. Much of this
was accomplished by adapting ideas and code from the PCR collector.
The test program was changed and expanded.
== [1.9] 1992-01-29 ==
* fixed a major bug in gc_realloc.
== [1.8] ==
* added ULTRIX support in gc_private.h. (Robert Brazile originally supplied
the ULTRIX code. Alan Dosser and Regis Cridlig subsequently provided updates
and information on variation between ULTRIX systems.)
== [1.5] ==
* ensure 8 byte alignment for objects allocated on a sparc based machine.
== [1.4] ==
* Does not use compile time determined values
for the stack base. This no longer works on Sun 3s, since Sun 3/80s use
a different stack base. We now use a straightforward heuristic on all
machines on which it is known to work (incl. Sun 3s) and compile-time
determined values for the rest. There should really be library calls
to determine such values.
== [1.3] ==
* Fixed spurious
assembly language assignments to TMP_SP. Only the assignment in the PC/RT
code is necessary. On other machines, with certain compiler options,
the assignments can lead to an unsaved register being overwritten.
Known to cause problems under SunOS 3.5 WITHOUT the -O option. (With
-O the compiler recognizes it as dead code. It probably shouldn't,
but that's another story.)
The SPARC-specific code was originally contributed by Mark Weiser.
The Encore Multimax modifications were supplied by Kevin Kenny.
The adaptation to the IBM PC/RT is largely
due to Vernon Lee, on machines made available to Rice by IBM.
Much of the HP specific code and a number of good suggestions for improving
the generic code are due to Walter Underwood.
Parag Patel supplied the A/UX code.
Manuel Serrano supplied linux and Sony News specific code.
|