测试下1K个宏和程序运行空间大小的关系

Posted micoblog

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了测试下1K个宏和程序运行空间大小的关系相关的知识,希望对你有一定的参考价值。

结果自己试验,不贴。

首先用代码生成下代码:

#include <stdio.h>
#include <unistd.h>
#include <assert.h>
#include <sys/types.h> 
#include <string.h>
#include <stdlib.h>

#define DF1 "#define TEST"
#define VALUE " "
#define CRLF  "\r\n"
int main ()
{
	FILE *fp;
	int i;
	int j=0;
	char *ps;
	int vl = 1000;
	
	if((fp = fopen("./test2.c", "w")) ==  NULL){
		printf("fopen failed\n");		
	}
	ps = malloc(1024);
	if(!ps){
		printf("malloc failed\n");
		return 0;
	}
		
	for(i=0; i<1024; i++){
		sprintf(ps, "%s%d%s%d%s", DF1, i, VALUE, vl, CRLF);
		fputs(ps, fp);
		vl++;
	}
	fclose(fp);
	printf("done\n");
	return 1;
} 

  然后生成了1K个宏定义,然后加点东西运行:

#include <stdio.h>
#include <unistd.h>
#include <assert.h>
#include <sys/types.h> 
#include <string.h>
#include <stdlib.h>

#define TEST0 1000
#define TEST1 1001
#define TEST2 1002
#define TEST3 1003
#define TEST4 1004
#define TEST5 1005
#define TEST6 1006
#define TEST7 1007
#define TEST8 1008
#define TEST9 1009
#define TEST10 1010
#define TEST11 1011
#define TEST12 1012
#define TEST13 1013
#define TEST14 1014
#define TEST15 1015
#define TEST16 1016
#define TEST17 1017
#define TEST18 1018
#define TEST19 1019
#define TEST20 1020
#define TEST21 1021
#define TEST22 1022
#define TEST23 1023
#define TEST24 1024
#define TEST25 1025
#define TEST26 1026
#define TEST27 1027
#define TEST28 1028
#define TEST29 1029
#define TEST30 1030
#define TEST31 1031
#define TEST32 1032
#define TEST33 1033
#define TEST34 1034
#define TEST35 1035
#define TEST36 1036
#define TEST37 1037
#define TEST38 1038
#define TEST39 1039
#define TEST40 1040
#define TEST41 1041
#define TEST42 1042
#define TEST43 1043
#define TEST44 1044
#define TEST45 1045
#define TEST46 1046
#define TEST47 1047
#define TEST48 1048
#define TEST49 1049
#define TEST50 1050
#define TEST51 1051
#define TEST52 1052
#define TEST53 1053
#define TEST54 1054
#define TEST55 1055
#define TEST56 1056
#define TEST57 1057
#define TEST58 1058
#define TEST59 1059
#define TEST60 1060
#define TEST61 1061
#define TEST62 1062
#define TEST63 1063
#define TEST64 1064
#define TEST65 1065
#define TEST66 1066
#define TEST67 1067
#define TEST68 1068
#define TEST69 1069
#define TEST70 1070
#define TEST71 1071
#define TEST72 1072
#define TEST73 1073
#define TEST74 1074
#define TEST75 1075
#define TEST76 1076
#define TEST77 1077
#define TEST78 1078
#define TEST79 1079
#define TEST80 1080
#define TEST81 1081
#define TEST82 1082
#define TEST83 1083
#define TEST84 1084
#define TEST85 1085
#define TEST86 1086
#define TEST87 1087
#define TEST88 1088
#define TEST89 1089
#define TEST90 1090
#define TEST91 1091
#define TEST92 1092
#define TEST93 1093
#define TEST94 1094
#define TEST95 1095
#define TEST96 1096
#define TEST97 1097
#define TEST98 1098
#define TEST99 1099
#define TEST100 1100
#define TEST101 1101
#define TEST102 1102
#define TEST103 1103
#define TEST104 1104
#define TEST105 1105
#define TEST106 1106
#define TEST107 1107
#define TEST108 1108
#define TEST109 1109
#define TEST110 1110
#define TEST111 1111
#define TEST112 1112
#define TEST113 1113
#define TEST114 1114
#define TEST115 1115
#define TEST116 1116
#define TEST117 1117
#define TEST118 1118
#define TEST119 1119
#define TEST120 1120
#define TEST121 1121
#define TEST122 1122
#define TEST123 1123
#define TEST124 1124
#define TEST125 1125
#define TEST126 1126
#define TEST127 1127
#define TEST128 1128
#define TEST129 1129
#define TEST130 1130
#define TEST131 1131
#define TEST132 1132
#define TEST133 1133
#define TEST134 1134
#define TEST135 1135
#define TEST136 1136
#define TEST137 1137
#define TEST138 1138
#define TEST139 1139
#define TEST140 1140
#define TEST141 1141
#define TEST142 1142
#define TEST143 1143
#define TEST144 1144
#define TEST145 1145
#define TEST146 1146
#define TEST147 1147
#define TEST148 1148
#define TEST149 1149
#define TEST150 1150
#define TEST151 1151
#define TEST152 1152
#define TEST153 1153
#define TEST154 1154
#define TEST155 1155
#define TEST156 1156
#define TEST157 1157
#define TEST158 1158
#define TEST159 1159
#define TEST160 1160
#define TEST161 1161
#define TEST162 1162
#define TEST163 1163
#define TEST164 1164
#define TEST165 1165
#define TEST166 1166
#define TEST167 1167
#define TEST168 1168
#define TEST169 1169
#define TEST170 1170
#define TEST171 1171
#define TEST172 1172
#define TEST173 1173
#define TEST174 1174
#define TEST175 1175
#define TEST176 1176
#define TEST177 1177
#define TEST178 1178
#define TEST179 1179
#define TEST180 1180
#define TEST181 1181
#define TEST182 1182
#define TEST183 1183
#define TEST184 1184
#define TEST185 1185
#define TEST186 1186
#define TEST187 1187
#define TEST188 1188
#define TEST189 1189
#define TEST190 1190
#define TEST191 1191
#define TEST192 1192
#define TEST193 1193
#define TEST194 1194
#define TEST195 1195
#define TEST196 1196
#define TEST197 1197
#define TEST198 1198
#define TEST199 1199
#define TEST200 1200
#define TEST201 1201
#define TEST202 1202
#define TEST203 1203
#define TEST204 1204
#define TEST205 1205
#define TEST206 1206
#define TEST207 1207
#define TEST208 1208
#define TEST209 1209
#define TEST210 1210
#define TEST211 1211
#define TEST212 1212
#define TEST213 1213
#define TEST214 1214
#define TEST215 1215
#define TEST216 1216
#define TEST217 1217
#define TEST218 1218
#define TEST219 1219
#define TEST220 1220
#define TEST221 1221
#define TEST222 1222
#define TEST223 1223
#define TEST224 1224
#define TEST225 1225
#define TEST226 1226
#define TEST227 1227
#define TEST228 1228
#define TEST229 1229
#define TEST230 1230
#define TEST231 1231
#define TEST232 1232
#define TEST233 1233
#define TEST234 1234
#define TEST235 1235
#define TEST236 1236
#define TEST237 1237
#define TEST238 1238
#define TEST239 1239
#define TEST240 1240
#define TEST241 1241
#define TEST242 1242
#define TEST243 1243
#define TEST244 1244
#define TEST245 1245
#define TEST246 1246
#define TEST247 1247
#define TEST248 1248
#define TEST249 1249
#define TEST250 1250
#define TEST251 1251
#define TEST252 1252
#define TEST253 1253
#define TEST254 1254
#define TEST255 1255
#define TEST256 1256
#define TEST257 1257
#define TEST258 1258
#define TEST259 1259
#define TEST260 1260
#define TEST261 1261
#define TEST262 1262
#define TEST263 1263
#define TEST264 1264
#define TEST265 1265
#define TEST266 1266
#define TEST267 1267
#define TEST268 1268
#define TEST269 1269
#define TEST270 1270
#define TEST271 1271
#define TEST272 1272
#define TEST273 1273
#define TEST274 1274
#define TEST275 1275
#define TEST276 1276
#define TEST277 1277
#define TEST278 1278
#define TEST279 1279
#define TEST280 1280
#define TEST281 1281
#define TEST282 1282
#define TEST283 1283
#define TEST284 1284
#define TEST285 1285
#define TEST286 1286
#define TEST287 1287
#define TEST288 1288
#define TEST289 1289
#define TEST290 1290
#define TEST291 1291
#define TEST292 1292
#define TEST293 1293
#define TEST294 1294
#define TEST295 1295
#define TEST296 1296
#define TEST297 1297
#define TEST298 1298
#define TEST299 1299
#define TEST300 1300
#define TEST301 1301
#define TEST302 1302
#define TEST303 1303
#define TEST304 1304
#define TEST305 1305
#define TEST306 1306
#define TEST307 1307
#define TEST308 1308
#define TEST309 1309
#define TEST310 1310
#define TEST311 1311
#define TEST312 1312
#define TEST313 1313
#define TEST314 1314
#define TEST315 1315
#define TEST316 1316
#define TEST317 1317
#define TEST318 1318
#define TEST319 1319
#define TEST320 1320
#define TEST321 1321
#define TEST322 1322
#define TEST323 1323
#define TEST324 1324
#define TEST325 1325
#define TEST326 1326
#define TEST327 1327
#define TEST328 1328
#define TEST329 1329
#define TEST330 1330
#define TEST331 1331
#define TEST332 1332
#define TEST333 1333
#define TEST334 1334
#define TEST335 1335
#define TEST336 1336
#define TEST337 1337
#define TEST338 1338
#define TEST339 1339
#define TEST340 1340
#define TEST341 1341
#define TEST342 1342
#define TEST343 1343
#define TEST344 1344
#define TEST345 1345
#define TEST346 1346
#define TEST347 1347
#define TEST348 1348
#define TEST349 1349
#define TEST350 1350
#define TEST351 1351
#define TEST352 1352
#define TEST353 1353
#define TEST354 1354
#define TEST355 1355
#define TEST356 1356
#define TEST357 1357
#define TEST358 1358
#define TEST359 1359
#define TEST360 1360
#define TEST361 1361
#define TEST362 1362
#define TEST363 1363
#define TEST364 1364
#define TEST365 1365
#define TEST366 1366
#define TEST367 1367
#define TEST368 1368
#define TEST369 1369
#define TEST370 1370
#define TEST371 1371
#define TEST372 1372
#define TEST373 1373
#define TEST374 1374
#define TEST375 1375
#define TEST376 1376
#define TEST377 1377
#define TEST378 1378
#define TEST379 1379
#define TEST380 1380
#define TEST381 1381
#define TEST382 1382
#define TEST383 1383
#define TEST384 1384
#define TEST385 1385
#define TEST386 1386
#define TEST387 1387
#define TEST388 1388
#define TEST389 1389
#define TEST390 1390
#define TEST391 1391
#define TEST392 1392
#define TEST393 1393
#define TEST394 1394
#define TEST395 1395
#define TEST396 1396
#define TEST397 1397
#define TEST398 1398
#define TEST399 1399
#define TEST400 1400
#define TEST401 1401
#define TEST402 1402
#define TEST403 1403
#define TEST404 1404
#define TEST405 1405
#define TEST406 1406
#define TEST407 1407
#define TEST408 1408
#define TEST409 1409
#define TEST410 1410
#define TEST411 1411
#define TEST412 1412
#define TEST413 1413
#define TEST414 1414
#define TEST415 1415
#define TEST416 1416
#define TEST417 1417
#define TEST418 1418
#define TEST419 1419
#define TEST420 1420
#define TEST421 1421
#define TEST422 1422
#define TEST423 1423
#define TEST424 1424
#define TEST425 1425
#define TEST426 1426
#define TEST427 1427
#define TEST428 1428
#define TEST429 1429
#define TEST430 1430
#define TEST431 1431
#define TEST432 1432
#define TEST433 1433
#define TEST434 1434
#define TEST435 1435
#define TEST436 1436
#define TEST437 1437
#define TEST438 1438
#define TEST439 1439
#define TEST440 1440
#define TEST441 1441
#define TEST442 1442
#define TEST443 1443
#define TEST444 1444
#define TEST445 1445
#define TEST446 1446
#define TEST447 1447
#define TEST448 1448
#define TEST449 1449
#define TEST450 1450
#define TEST451 1451
#define TEST452 1452
#define TEST453 1453
#define TEST454 1454
#define TEST455 1455
#define TEST456 1456
#define TEST457 1457
#define TEST458 1458
#define TEST459 1459
#define TEST460 1460
#define TEST461 1461
#define TEST462 1462
#define TEST463 1463
#define TEST464 1464
#define TEST465 1465
#define TEST466 1466
#define TEST467 1467
#define TEST468 1468
#define TEST469 1469
#define TEST470 1470
#define TEST471 1471
#define TEST472 1472
#define TEST473 1473
#define TEST474 1474
#define TEST475 1475
#define TEST476 1476
#define TEST477 1477
#define TEST478 1478
#define TEST479 1479
#define TEST480 1480
#define TEST481 1481
#define TEST482 1482
#define TEST483 1483
#define TEST484 1484
#define TEST485 1485
#define TEST486 1486
#define TEST487 1487
#define TEST488 1488
#define TEST489 1489
#define TEST490 1490
#define TEST491 1491
#define TEST492 1492
#define TEST493 1493
#define TEST494 1494
#define TEST495 1495
#define TEST496 1496
#define TEST497 1497
#define TEST498 1498
#define TEST499 1499
#define TEST500 1500
#define TEST501 1501
#define TEST502 1502
#define TEST503 1503
#define TEST504 1504
#define TEST505 1505
#define TEST506 1506
#define TEST507 1507
#define TEST508 1508
#define TEST509 1509
#define TEST510 1510
#define TEST511 1511
#define TEST512 1512
#define TEST513 1513
#define TEST514 1514
#define TEST515 1515
#define TEST516 1516
#define TEST517 1517
#define TEST518 1518
#define TEST519 1519
#define TEST520 1520
#define TEST521 1521
#define TEST522 1522
#define TEST523 1523
#define TEST524 1524
#define TEST525 1525
#define TEST526 1526
#define TEST527 1527
#define TEST528 1528
#define TEST529 1529
#define TEST530 1530
#define TEST531 1531
#define TEST532 1532
#define TEST533 1533
#define TEST534 1534
#define TEST535 1535
#define TEST536 1536
#define TEST537 1537
#define TEST538 1538
#define TEST539 1539
#define TEST540 1540
#define TEST541 1541
#define TEST542 1542
#define TEST543 1543
#define TEST544 1544
#define TEST545 1545
#define TEST546 1546
#define TEST547 1547
#define TEST548 1548
#define TEST549 1549
#define TEST550 1550
#define TEST551 1551
#define TEST552 1552
#define TEST553 1553
#define TEST554 1554
#define TEST555 1555
#define TEST556 1556
#define TEST557 1557
#define TEST558 1558
#define TEST559 1559
#define TEST560 1560
#define TEST561 1561
#define TEST562 1562
#define TEST563 1563
#define TEST564 1564
#define TEST565 1565
#define TEST566 1566
#define TEST567 1567
#define TEST568 1568
#define TEST569 1569
#define TEST570 1570
#define TEST571 1571
#define TEST572 1572
#define TEST573 1573
#define TEST574 1574
#define TEST575 1575
#define TEST576 1576
#define TEST577 1577
#define TEST578 1578
#define TEST579 1579
#define TEST580 1580
#define TEST581 1581
#define TEST582 1582
#define TEST583 1583
#define TEST584 1584
#define TEST585 1585
#define TEST586 1586
#define TEST587 1587
#define TEST588 1588
#define TEST589 1589
#define TEST590 1590
#define TEST591 1591
#define TEST592 1592
#define TEST593 1593
#define TEST594 1594
#define TEST595 1595
#define TEST596 1596
#define TEST597 1597
#define TEST598 1598
#define TEST599 1599
#define TEST600 1600
#define TEST601 1601
#define TEST602 1602
#define TEST603 1603
#define TEST604 1604
#define TEST605 1605
#define TEST606 1606
#define TEST607 1607
#define TEST608 1608
#define TEST609 1609
#define TEST610 1610
#define TEST611 1611
#define TEST612 1612
#define TEST613 1613
#define TEST614 1614
#define TEST615 1615
#define TEST616 1616
#define TEST617 1617
#define TEST618 1618
#define TEST619 1619
#define TEST620 1620
#define TEST621 1621
#define TEST622 1622
#define TEST623 1623
#define TEST624 1624
#define TEST625 1625
#define TEST626 1626
#define TEST627 1627
#define TEST628 1628
#define TEST629 1629
#define TEST630 1630
#define TEST631 1631
#define TEST632 1632
#define TEST633 1633
#define TEST634 1634
#define TEST635 1635
#define TEST636 1636
#define TEST637 1637
#define TEST638 1638
#define TEST639 1639
#define TEST640 1640
#define TEST641 1641
#define TEST642 1642
#define TEST643 1643
#define TEST644 1644
#define TEST645 1645
#define TEST646 1646
#define TEST647 1647
#define TEST648 1648
#define TEST649 1649
#define TEST650 1650
#define TEST651 1651
#define TEST652 1652
#define TEST653 1653
#define TEST654 1654
#define TEST655 1655
#define TEST656 1656
#define TEST657 1657
#define TEST658 1658
#define TEST659 1659
#define TEST660 1660
#define TEST661 1661
#define TEST662 1662
#define TEST663 1663
#define TEST664 1664
#define TEST665 1665
#define TEST666 1666
#define TEST667 1667
#define TEST668 1668
#define TEST669 1669
#define TEST670 1670
#define TEST671 1671
#define TEST672 1672
#define TEST673 1673
#define TEST674 1674
#define TEST675 1675
#define TEST676 1676
#define TEST677 1677
#define TEST678 1678
#define TEST679 1679
#define TEST680 1680
#define TEST681 1681
#define TEST682 1682
#define TEST683 1683
#define TEST684 1684
#define TEST685 1685
#define TEST686 1686
#define TEST687 1687
#define TEST688 1688
#define TEST689 1689
#define TEST690 1690
#define TEST691 1691
#define TEST692 1692
#define TEST693 1693
#define TEST694 1694
#define TEST695 1695
#define TEST696 1696
#define TEST697 1697
#define TEST698 1698
#define TEST699 1699
#define TEST700 1700
#define TEST701 1701
#define TEST702 1702
#define TEST703 1703
#define TEST704 1704
#define TEST705 1705
#define TEST706 1706
#define TEST707 1707
#define TEST708 1708
#define TEST709 1709
#define TEST710 1710
#define TEST711 1711
#define TEST712 1712
#define TEST713 1713
#define TEST714 1714
#define TEST715 1715
#define TEST716 1716
#define TEST717 1717
#define TEST718 1718
#define TEST719 1719
#define TEST720 1720
#define TEST721 1721
#define TEST722 1722
#define TEST723 1723
#define TEST724 1724
#define TEST725 1725
#define TEST726 1726
#define TEST727 1727
#define TEST728 1728
#define TEST729 1729
#define TEST730 1730
#define TEST731 1731
#define TEST732 1732
#define TEST733 1733
#define TEST734 1734
#define TEST735 1735
#define TEST736 1736
#define TEST737 1737
#define TEST738 1738
#define TEST739 1739
#define TEST740 1740
#define TEST741 1741
#define TEST742 1742
#define TEST743 1743
#define TEST744 1744
#define TEST745 1745
#define TEST746 1746
#define TEST747 1747
#define TEST748 1748
#define TEST749 1749
#define TEST750 1750
#define TEST751 1751
#define TEST752 1752
#define TEST753 1753
#define TEST754 1754
#define TEST755 1755
#define TEST756 1756
#define TEST757 1757
#define TEST758 1758
#define TEST759 1759
#define TEST760 1760
#define TEST761 1761
#define TEST762 1762
#define TEST763 1763
#define TEST764 1764
#define TEST765 1765
#define TEST766 1766
#define TEST767 1767
#define TEST768 1768
#define TEST769 1769
#define TEST770 1770
#define TEST771 1771
#define TEST772 1772
#define TEST773 1773
#define TEST774 1774
#define TEST775 1775
#define TEST776 1776
#define TEST777 1777
#define TEST778 1778
#define TEST779 1779
#define TEST780 1780
#define TEST781 1781
#define TEST782 1782
#define TEST783 1783
#define TEST784 1784
#define TEST785 1785
#define TEST786 1786
#define TEST787 1787
#define TEST788 1788
#define TEST789 1789
#define TEST790 1790
#define TEST791 1791
#define TEST792 1792
#define TEST793 1793
#define TEST794 1794
#define TEST795 1795
#define TEST796 1796
#define TEST797 1797
#define TEST798 1798
#define TEST799 1799
#define TEST800 1800
#define TEST801 1801
#define TEST802 1802
#define TEST803 1803
#define TEST804 1804
#define TEST805 1805
#define TEST806 1806
#define TEST807 1807
#define TEST808 1808
#define TEST809 1809
#define TEST810 1810
#define TEST811 1811
#define TEST812 1812
#define TEST813 1813
#define TEST814 1814
#define TEST815 1815
#define TEST816 1816
#define TEST817 1817
#define TEST818 1818
#define TEST819 1819
#define TEST820 1820
#define TEST821 1821
#define TEST822 1822
#define TEST823 1823
#define TEST824 1824
#define TEST825 1825
#define TEST826 1826
#define TEST827 1827
#define TEST828 1828
#define TEST829 1829
#define TEST830 1830
#define TEST831 1831
#define TEST832 1832
#define TEST833 1833
#define TEST834 1834
#define TEST835 1835
#define TEST836 1836
#define TEST837 1837
#define TEST838 1838
#define TEST839 1839
#define TEST840 1840
#define TEST841 1841
#define TEST842 1842
#define TEST843 1843
#define TEST844 1844
#define TEST845 1845
#define TEST846 1846
#define TEST847 1847
#define TEST848 1848
#define TEST849 1849
#define TEST850 1850
#define TEST851 1851
#define TEST852 1852
#define TEST853 1853
#define TEST854 1854
#define TEST855 1855
#define TEST856 1856
#define TEST857 1857
#define TEST858 1858
#define TEST859 1859
#define TEST860 1860
#define TEST861 1861
#define TEST862 1862
#define TEST863 1863
#define TEST864 1864
#define TEST865 1865
#define TEST866 1866
#define TEST867 1867
#define TEST868 1868
#define TEST869 1869
#define TEST870 1870
#define TEST871 1871
#define TEST872 1872
#define TEST873 1873
#define TEST874 1874
#define TEST875 1875
#define TEST876 1876
#define TEST877 1877
#define TEST878 1878
#define TEST879 1879
#define TEST880 1880
#define TEST881 1881
#define TEST882 1882
#define TEST883 1883
#define TEST884 1884
#define TEST885 1885
#define TEST886 1886
#define TEST887 1887
#define TEST888 1888
#define TEST889 1889
#define TEST890 1890
#define TEST891 1891
#define TEST892 1892
#define TEST893 1893
#define TEST894 1894
#define TEST895 1895
#define TEST896 1896
#define TEST897 1897
#define TEST898 1898
#define TEST899 1899
#define TEST900 1900
#define TEST901 1901
#define TEST902 1902
#define TEST903 1903
#define TEST904 1904
#define TEST905 1905
#define TEST906 1906
#define TEST907 1907
#define TEST908 1908
#define TEST909 1909
#define TEST910 1910
#define TEST911 1911
#define TEST912 1912
#define TEST913 1913
#define TEST914 1914
#define TEST915 1915
#define TEST916 1916
#define TEST917 1917
#define TEST918 1918
#define TEST919 1919
#define TEST920 1920
#define TEST921 1921
#define TEST922 1922
#define TEST923 1923
#define TEST924 1924
#define TEST925 1925
#define TEST926 1926
#define TEST927 1927
#define TEST928 1928
#define TEST929 1929
#define TEST930 1930
#define TEST931 1931
#define TEST932 1932
#define TEST933 1933
#define TEST934 1934
#define TEST935 1935
#define TEST936 1936
#define TEST937 1937
#define TEST938 1938
#define TEST939 1939
#define TEST940 1940
#define TEST941 1941
#define TEST942 1942
#define TEST943 1943
#define TEST944 1944
#define TEST945 1945
#define TEST946 1946
#define TEST947 1947
#define TEST948 1948
#define TEST949 1949
#define TEST950 1950
#define TEST951 1951
#define TEST952 1952
#define TEST953 1953
#define TEST954 1954
#define TEST955 1955
#define TEST956 1956
#define TEST957 1957
#define TEST958 1958
#define TEST959 1959
#define TEST960 1960
#define TEST961 1961
#define TEST962 1962
#define TEST963 1963
#define TEST964 1964
#define TEST965 1965
#define TEST966 1966
#define TEST967 1967
#define TEST968 1968
#define TEST969 1969
#define TEST970 1970
#define TEST971 1971
#define TEST972 1972
#define TEST973 1973
#define TEST974 1974
#define TEST975 1975
#define TEST976 1976
#define TEST977 1977
#define TEST978 1978
#define TEST979 1979
#define TEST980 1980
#define TEST981 1981
#define TEST982 1982
#define TEST983 1983
#define TEST984 1984
#define TEST985 1985
#define TEST986 1986
#define TEST987 1987
#define TEST988 1988
#define TEST989 1989
#define TEST990 1990
#define TEST991 1991
#define TEST992 1992
#define TEST993 1993
#define TEST994 1994
#define TEST995 1995
#define TEST996 1996
#define TEST997 1997
#define TEST998 1998
#define TEST999 1999
#define TEST1000 2000
#define TEST1001 2001
#define TEST1002 2002
#define TEST1003 2003
#define TEST1004 2004
#define TEST1005 2005
#define TEST1006 2006
#define TEST1007 2007
#define TEST1008 2008
#define TEST1009 2009
#define TEST1010 2010
#define TEST1011 2011
#define TEST1012 2012
#define TEST1013 2013
#define TEST1014 2014
#define TEST1015 2015
#define TEST1016 2016
#define TEST1017 2017
#define TEST1018 2018
#define TEST1019 2019
#define TEST1020 2020
#define TEST1021 2021
#define TEST1022 2022
#define TEST1023 2023

void main(){
	
	while(1);
}

  

以上是关于测试下1K个宏和程序运行空间大小的关系的主要内容,如果未能解决你的问题,请参考以下文章

运行/调试你的PHP代码

MFC常用的类详细介绍

进程和线程和协程之间的关系

编译器之WIN64预定义宏和数据对齐设置对结构体大小的影响

Python基础知识(运行pycharm使用注释)

调整SWAP分区大小