gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] gawk branch, gawk-5.2-stable, updated. gawk-4.1.0-4970-gdf616f66


From: Arnold Robbins
Subject: [SCM] gawk branch, gawk-5.2-stable, updated. gawk-4.1.0-4970-gdf616f66
Date: Sun, 4 Dec 2022 14:34:30 -0500 (EST)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, gawk-5.2-stable has been updated
       via  df616f664859ed9e9f71e66641e84f9f12d8d7b3 (commit)
      from  8ef27c83a23fea93cca0b4efc12521a5bb5b186f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=df616f664859ed9e9f71e66641e84f9f12d8d7b3

commit df616f664859ed9e9f71e66641e84f9f12d8d7b3
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Sun Dec 4 21:33:56 2022 +0200

    Save/restore freelists to/from the root pointer struct.

diff --git a/ChangeLog b/ChangeLog
index 01923d60..2384ec2c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2022-12-04         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * NEWS: Updated.
+       * awk.h (nextfree): Include dimension so we know how big it is.
+       (pma_save_free_lists): Declare new function.
+       * main.c (main): Call pma_save_free_lists() via atexit() upon exit.
+       (parse_args): Call pma_mpfr_check() unconditionally.
+       * symbol.c (struct root pointer): Add copy of nextfree[] array.
+       (init_symbol_table): On first alloc, zero out the root_pointers
+       struct. On subsequent uses, copy saved nextfree into real nextfree.
+       (pma_mpfr_check): Check using_persistent_malloc and return early if
+       not using it.
+       (pma_save_free_lists): New function to save nextfree.
+
 2022-12-01         Arnold D. Robbins     <arnold@skeeve.com>
 
        Disallow using / not using -M across invocations of gawk with
diff --git a/NEWS b/NEWS
index 6d52e17d..47527e56 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,19 @@
    are permitted in any medium without royalty provided the copyright
    notice and this notice are preserved.
 
+Changes from 5.2.1 to 5.2.2
+---------------------------
+
+1. Gawk no longer builds an x86_64 executable on M1 macOS systems.
+   This means that PMA is unavailable on those systems.
+
+2. Gawk will now diagnose if a heap file was created with a different
+   setting of -M/--bignum than in the current invocation and exit with
+   a fatal message if so.
+
+3. Gawk no longer "leaks" its free list of NODEs in the heap file, resulting
+   in much more efficient usage of persistent storage.
+
 Changes from 5.2.0 to 5.2.1
 ---------------------------
 
@@ -21,7 +34,7 @@ Changes from 5.2.0 to 5.2.1
 5. The rwarray extension's readall() function has had some bugs fixed.
 
 6. The PMA allocator is now supported on FreeBSD, OpenBSD and Linux on S/390x.
-   Is is now supported also on both Intel and M1 macOS systems.
+   It is now supported also on both Intel and M1 macOS systems.
 
 7. There have been several minor code cleanups and bug fixes. See the
    ChangeLog for details.
diff --git a/awk.h b/awk.h
index 221634dd..79cdd85f 100644
--- a/awk.h
+++ b/awk.h
@@ -1147,7 +1147,7 @@ extern const array_funcs_t int_array_func;
 /* special node used to indicate success in array routines (not NULL) */
 extern NODE *success_node;
 
-extern struct block_header nextfree[];
+extern struct block_header nextfree[BLOCK_MAX];
 extern bool field0_valid;
 
 extern bool do_itrace; /* separate so can poke from a debugger */
@@ -1795,6 +1795,7 @@ extern void print_vars(NODE **table, Func_print 
print_func, FILE *fp);
 extern bool check_param_names(void);
 extern bool is_all_upper(const char *name);
 extern void pma_mpfr_check(void);
+extern void pma_save_free_lists(void);
 
 /* floatcomp.c */
 #ifdef HAVE_UINTMAX_T
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 1d753f97..48ead504 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,8 @@
+2022-12-04         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * gawktexi.in (Persistent Memory): Update version stuff in sample
+       output.
+
 2022-12-01         Arnold D. Robbins     <arnold@skeeve.com>
 
        * gawktexi.in (Persistent Memory): Document that using / not using
diff --git a/doc/gawk.info b/doc/gawk.info
index 937784cc..9ec77834 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -22164,7 +22164,7 @@ use the same 'gawk' executable from run to run.
 so:
 
      $ gawk --version
-     -| GNU Awk 5.2.0, API 3.2, PMA Avon 7, (GNU MPFR 4.0.1, GNU MP 6.1.2)
+     -| GNU Awk 5.2.1, API 3.2, PMA Avon 8-g1, (GNU MPFR 4.0.1, GNU MP 6.1.2)
      -| Copyright (C) 1989, 1991-2022 Free Software Foundation.
      ...
 
@@ -39624,244 +39624,244 @@ Ref: Two-way I/O-Footnote-2885054
 Node: TCP/IP Networking885136
 Node: Profiling888212
 Node: Persistent Memory897518
-Ref: Persistent Memory-Footnote-1905781
-Node: Extension Philosophy905908
-Node: Advanced Features Summary907395
-Node: Internationalization909567
-Node: I18N and L10N911241
-Node: Explaining gettext911928
-Ref: Explaining gettext-Footnote-1917820
-Ref: Explaining gettext-Footnote-2918005
-Node: Programmer i18n918170
-Ref: Programmer i18n-Footnote-1923119
-Node: Translator i18n923168
-Node: String Extraction923962
-Ref: String Extraction-Footnote-1925094
-Node: Printf Ordering925180
-Ref: Printf Ordering-Footnote-1927966
-Node: I18N Portability928030
-Ref: I18N Portability-Footnote-1930486
-Node: I18N Example930549
-Ref: I18N Example-Footnote-1933824
-Ref: I18N Example-Footnote-2933897
-Node: Gawk I18N934006
-Node: I18N Summary934628
-Node: Debugger935969
-Node: Debugging936969
-Node: Debugging Concepts937410
-Node: Debugging Terms939219
-Node: Awk Debugging941794
-Ref: Awk Debugging-Footnote-1942739
-Node: Sample Debugging Session942871
-Node: Debugger Invocation943405
-Node: Finding The Bug944791
-Node: List of Debugger Commands951265
-Node: Breakpoint Control952598
-Node: Debugger Execution Control956292
-Node: Viewing And Changing Data959654
-Node: Execution Stack963195
-Node: Debugger Info964832
-Node: Miscellaneous Debugger Commands968903
-Node: Readline Support973965
-Node: Limitations974861
-Node: Debugging Summary977415
-Node: Namespaces978694
-Node: Global Namespace979805
-Node: Qualified Names981203
-Node: Default Namespace982202
-Node: Changing The Namespace982943
-Node: Naming Rules984557
-Node: Internal Name Management986405
-Node: Namespace Example987447
-Node: Namespace And Features990009
-Node: Namespace Summary991444
-Node: Arbitrary Precision Arithmetic992921
-Node: Computer Arithmetic994408
-Ref: table-numeric-ranges998174
-Ref: table-floating-point-ranges998668
-Ref: Computer Arithmetic-Footnote-1999327
-Node: Math Definitions999384
-Ref: table-ieee-formats1002360
-Node: MPFR features1002928
-Node: MPFR On Parole1003373
-Ref: MPFR On Parole-Footnote-11004202
-Node: MPFR Intro1004357
-Node: FP Math Caution1006008
-Ref: FP Math Caution-Footnote-11007080
-Node: Inexactness of computations1007449
-Node: Inexact representation1008480
-Node: Comparing FP Values1009840
-Node: Errors accumulate1011081
-Node: Strange values1012537
-Ref: Strange values-Footnote-11015125
-Node: Getting Accuracy1015230
-Node: Try To Round1017940
-Node: Setting precision1018839
-Ref: table-predefined-precision-strings1019536
-Node: Setting the rounding mode1021367
-Ref: table-gawk-rounding-modes1021741
-Ref: Setting the rounding mode-Footnote-11025673
-Node: Arbitrary Precision Integers1025852
-Ref: Arbitrary Precision Integers-Footnote-11029027
-Node: Checking for MPFR1029176
-Node: POSIX Floating Point Problems1030650
-Ref: POSIX Floating Point Problems-Footnote-11035303
-Node: Floating point summary1035341
-Node: Dynamic Extensions1037531
-Node: Extension Intro1039084
-Node: Plugin License1040350
-Node: Extension Mechanism Outline1041147
-Ref: figure-load-extension1041586
-Ref: figure-register-new-function1043152
-Ref: figure-call-new-function1044245
-Node: Extension API Description1046308
-Node: Extension API Functions Introduction1048021
-Ref: table-api-std-headers1049857
-Node: General Data Types1054107
-Ref: General Data Types-Footnote-11062813
-Node: Memory Allocation Functions1063112
-Ref: Memory Allocation Functions-Footnote-11067613
-Node: Constructor Functions1067712
-Node: API Ownership of MPFR and GMP Values1071365
-Node: Registration Functions1072898
-Node: Extension Functions1073598
-Node: Exit Callback Functions1078920
-Node: Extension Version String1080170
-Node: Input Parsers1080833
-Node: Output Wrappers1093554
-Node: Two-way processors1098066
-Node: Printing Messages1100331
-Ref: Printing Messages-Footnote-11101502
-Node: Updating ERRNO1101655
-Node: Requesting Values1102394
-Ref: table-value-types-returned1103131
-Node: Accessing Parameters1104240
-Node: Symbol Table Access1105477
-Node: Symbol table by name1105989
-Ref: Symbol table by name-Footnote-11109014
-Node: Symbol table by cookie1109142
-Ref: Symbol table by cookie-Footnote-11113327
-Node: Cached values1113391
-Ref: Cached values-Footnote-11116927
-Node: Array Manipulation1117080
-Ref: Array Manipulation-Footnote-11118171
-Node: Array Data Types1118208
-Ref: Array Data Types-Footnote-11120866
-Node: Array Functions1120958
-Node: Flattening Arrays1125743
-Node: Creating Arrays1132719
-Node: Redirection API1137486
-Node: Extension API Variables1140319
-Node: Extension Versioning1141030
-Ref: gawk-api-version1141459
-Node: Extension GMP/MPFR Versioning1143191
-Node: Extension API Informational Variables1144819
-Node: Extension API Boilerplate1145892
-Node: Changes from API V11149866
-Node: Finding Extensions1151438
-Node: Extension Example1151997
-Node: Internal File Description1152795
-Node: Internal File Ops1156875
-Ref: Internal File Ops-Footnote-11168225
-Node: Using Internal File Ops1168365
-Ref: Using Internal File Ops-Footnote-11170748
-Node: Extension Samples1171022
-Node: Extension Sample File Functions1172551
-Node: Extension Sample Fnmatch1180200
-Node: Extension Sample Fork1181687
-Node: Extension Sample Inplace1182905
-Node: Extension Sample Ord1186531
-Node: Extension Sample Readdir1187367
-Ref: table-readdir-file-types1188256
-Node: Extension Sample Revout1189324
-Node: Extension Sample Rev2way1189913
-Node: Extension Sample Read write array1190653
-Node: Extension Sample Readfile1193839
-Node: Extension Sample Time1194934
-Node: Extension Sample API Tests1196686
-Node: gawkextlib1197178
-Node: Extension summary1200096
-Node: Extension Exercises1203798
-Node: Language History1205040
-Node: V7/SVR3.11206696
-Node: SVR41208848
-Node: POSIX1210282
-Node: BTL1211663
-Node: POSIX/GNU1212392
-Node: Feature History1218309
-Node: Common Extensions1236048
-Node: Ranges and Locales1237331
-Ref: Ranges and Locales-Footnote-11241947
-Ref: Ranges and Locales-Footnote-21241974
-Ref: Ranges and Locales-Footnote-31242209
-Node: Contributors1242432
-Node: History summary1248429
-Node: Installation1249809
-Node: Gawk Distribution1250753
-Node: Getting1251237
-Node: Extracting1252200
-Node: Distribution contents1253838
-Node: Unix Installation1261336
-Node: Quick Installation1262140
-Node: Compiling with MPFR1264560
-Node: Shell Startup Files1265250
-Node: Additional Configuration Options1266339
-Node: Configuration Philosophy1268654
-Node: Compiling from Git1271050
-Node: Building the Documentation1271605
-Node: Non-Unix Installation1272989
-Node: PC Installation1273453
-Node: PC Binary Installation1274298
-Node: PC Compiling1275171
-Node: PC Using1276277
-Node: Cygwin1279773
-Node: MSYS1280997
-Node: OpenVMS Installation1281599
-Node: OpenVMS Compilation1282260
-Ref: OpenVMS Compilation-Footnote-11283683
-Node: OpenVMS Dynamic Extensions1283741
-Node: OpenVMS Installation Details1285353
-Node: OpenVMS Running1287648
-Node: OpenVMS GNV1291649
-Node: Bugs1292392
-Node: Bug definition1293304
-Node: Bug address1296806
-Node: Usenet1300325
-Node: Performance bugs1301514
-Node: Asking for help1304435
-Node: Maintainers1306402
-Node: Other Versions1307409
-Node: Installation summary1315988
-Node: Notes1317328
-Node: Compatibility Mode1318122
-Node: Additions1318904
-Node: Accessing The Source1319829
-Node: Adding Code1321266
-Node: New Ports1328081
-Node: Derived Files1332456
-Ref: Derived Files-Footnote-11338115
-Ref: Derived Files-Footnote-21338150
-Ref: Derived Files-Footnote-31338745
-Node: Future Extensions1338859
-Node: Implementation Limitations1339517
-Node: Extension Design1340727
-Node: Old Extension Problems1341871
-Ref: Old Extension Problems-Footnote-11343389
-Node: Extension New Mechanism Goals1343446
-Ref: Extension New Mechanism Goals-Footnote-11346810
-Node: Extension Other Design Decisions1346999
-Node: Extension Future Growth1349112
-Node: Notes summary1349718
-Node: Basic Concepts1350876
-Node: Basic High Level1351557
-Ref: figure-general-flow1351839
-Ref: figure-process-flow1352525
-Ref: Basic High Level-Footnote-11355827
-Node: Basic Data Typing1356012
-Node: Glossary1359340
-Node: Copying1391227
-Node: GNU Free Documentation License1428770
-Node: Index1453890
+Ref: Persistent Memory-Footnote-1905784
+Node: Extension Philosophy905911
+Node: Advanced Features Summary907398
+Node: Internationalization909570
+Node: I18N and L10N911244
+Node: Explaining gettext911931
+Ref: Explaining gettext-Footnote-1917823
+Ref: Explaining gettext-Footnote-2918008
+Node: Programmer i18n918173
+Ref: Programmer i18n-Footnote-1923122
+Node: Translator i18n923171
+Node: String Extraction923965
+Ref: String Extraction-Footnote-1925097
+Node: Printf Ordering925183
+Ref: Printf Ordering-Footnote-1927969
+Node: I18N Portability928033
+Ref: I18N Portability-Footnote-1930489
+Node: I18N Example930552
+Ref: I18N Example-Footnote-1933827
+Ref: I18N Example-Footnote-2933900
+Node: Gawk I18N934009
+Node: I18N Summary934631
+Node: Debugger935972
+Node: Debugging936972
+Node: Debugging Concepts937413
+Node: Debugging Terms939222
+Node: Awk Debugging941797
+Ref: Awk Debugging-Footnote-1942742
+Node: Sample Debugging Session942874
+Node: Debugger Invocation943408
+Node: Finding The Bug944794
+Node: List of Debugger Commands951268
+Node: Breakpoint Control952601
+Node: Debugger Execution Control956295
+Node: Viewing And Changing Data959657
+Node: Execution Stack963198
+Node: Debugger Info964835
+Node: Miscellaneous Debugger Commands968906
+Node: Readline Support973968
+Node: Limitations974864
+Node: Debugging Summary977418
+Node: Namespaces978697
+Node: Global Namespace979808
+Node: Qualified Names981206
+Node: Default Namespace982205
+Node: Changing The Namespace982946
+Node: Naming Rules984560
+Node: Internal Name Management986408
+Node: Namespace Example987450
+Node: Namespace And Features990012
+Node: Namespace Summary991447
+Node: Arbitrary Precision Arithmetic992924
+Node: Computer Arithmetic994411
+Ref: table-numeric-ranges998177
+Ref: table-floating-point-ranges998671
+Ref: Computer Arithmetic-Footnote-1999330
+Node: Math Definitions999387
+Ref: table-ieee-formats1002363
+Node: MPFR features1002931
+Node: MPFR On Parole1003376
+Ref: MPFR On Parole-Footnote-11004205
+Node: MPFR Intro1004360
+Node: FP Math Caution1006011
+Ref: FP Math Caution-Footnote-11007083
+Node: Inexactness of computations1007452
+Node: Inexact representation1008483
+Node: Comparing FP Values1009843
+Node: Errors accumulate1011084
+Node: Strange values1012540
+Ref: Strange values-Footnote-11015128
+Node: Getting Accuracy1015233
+Node: Try To Round1017943
+Node: Setting precision1018842
+Ref: table-predefined-precision-strings1019539
+Node: Setting the rounding mode1021370
+Ref: table-gawk-rounding-modes1021744
+Ref: Setting the rounding mode-Footnote-11025676
+Node: Arbitrary Precision Integers1025855
+Ref: Arbitrary Precision Integers-Footnote-11029030
+Node: Checking for MPFR1029179
+Node: POSIX Floating Point Problems1030653
+Ref: POSIX Floating Point Problems-Footnote-11035306
+Node: Floating point summary1035344
+Node: Dynamic Extensions1037534
+Node: Extension Intro1039087
+Node: Plugin License1040353
+Node: Extension Mechanism Outline1041150
+Ref: figure-load-extension1041589
+Ref: figure-register-new-function1043155
+Ref: figure-call-new-function1044248
+Node: Extension API Description1046311
+Node: Extension API Functions Introduction1048024
+Ref: table-api-std-headers1049860
+Node: General Data Types1054110
+Ref: General Data Types-Footnote-11062816
+Node: Memory Allocation Functions1063115
+Ref: Memory Allocation Functions-Footnote-11067616
+Node: Constructor Functions1067715
+Node: API Ownership of MPFR and GMP Values1071368
+Node: Registration Functions1072901
+Node: Extension Functions1073601
+Node: Exit Callback Functions1078923
+Node: Extension Version String1080173
+Node: Input Parsers1080836
+Node: Output Wrappers1093557
+Node: Two-way processors1098069
+Node: Printing Messages1100334
+Ref: Printing Messages-Footnote-11101505
+Node: Updating ERRNO1101658
+Node: Requesting Values1102397
+Ref: table-value-types-returned1103134
+Node: Accessing Parameters1104243
+Node: Symbol Table Access1105480
+Node: Symbol table by name1105992
+Ref: Symbol table by name-Footnote-11109017
+Node: Symbol table by cookie1109145
+Ref: Symbol table by cookie-Footnote-11113330
+Node: Cached values1113394
+Ref: Cached values-Footnote-11116930
+Node: Array Manipulation1117083
+Ref: Array Manipulation-Footnote-11118174
+Node: Array Data Types1118211
+Ref: Array Data Types-Footnote-11120869
+Node: Array Functions1120961
+Node: Flattening Arrays1125746
+Node: Creating Arrays1132722
+Node: Redirection API1137489
+Node: Extension API Variables1140322
+Node: Extension Versioning1141033
+Ref: gawk-api-version1141462
+Node: Extension GMP/MPFR Versioning1143194
+Node: Extension API Informational Variables1144822
+Node: Extension API Boilerplate1145895
+Node: Changes from API V11149869
+Node: Finding Extensions1151441
+Node: Extension Example1152000
+Node: Internal File Description1152798
+Node: Internal File Ops1156878
+Ref: Internal File Ops-Footnote-11168228
+Node: Using Internal File Ops1168368
+Ref: Using Internal File Ops-Footnote-11170751
+Node: Extension Samples1171025
+Node: Extension Sample File Functions1172554
+Node: Extension Sample Fnmatch1180203
+Node: Extension Sample Fork1181690
+Node: Extension Sample Inplace1182908
+Node: Extension Sample Ord1186534
+Node: Extension Sample Readdir1187370
+Ref: table-readdir-file-types1188259
+Node: Extension Sample Revout1189327
+Node: Extension Sample Rev2way1189916
+Node: Extension Sample Read write array1190656
+Node: Extension Sample Readfile1193842
+Node: Extension Sample Time1194937
+Node: Extension Sample API Tests1196689
+Node: gawkextlib1197181
+Node: Extension summary1200099
+Node: Extension Exercises1203801
+Node: Language History1205043
+Node: V7/SVR3.11206699
+Node: SVR41208851
+Node: POSIX1210285
+Node: BTL1211666
+Node: POSIX/GNU1212395
+Node: Feature History1218312
+Node: Common Extensions1236051
+Node: Ranges and Locales1237334
+Ref: Ranges and Locales-Footnote-11241950
+Ref: Ranges and Locales-Footnote-21241977
+Ref: Ranges and Locales-Footnote-31242212
+Node: Contributors1242435
+Node: History summary1248432
+Node: Installation1249812
+Node: Gawk Distribution1250756
+Node: Getting1251240
+Node: Extracting1252203
+Node: Distribution contents1253841
+Node: Unix Installation1261339
+Node: Quick Installation1262143
+Node: Compiling with MPFR1264563
+Node: Shell Startup Files1265253
+Node: Additional Configuration Options1266342
+Node: Configuration Philosophy1268657
+Node: Compiling from Git1271053
+Node: Building the Documentation1271608
+Node: Non-Unix Installation1272992
+Node: PC Installation1273456
+Node: PC Binary Installation1274301
+Node: PC Compiling1275174
+Node: PC Using1276280
+Node: Cygwin1279776
+Node: MSYS1281000
+Node: OpenVMS Installation1281602
+Node: OpenVMS Compilation1282263
+Ref: OpenVMS Compilation-Footnote-11283686
+Node: OpenVMS Dynamic Extensions1283744
+Node: OpenVMS Installation Details1285356
+Node: OpenVMS Running1287651
+Node: OpenVMS GNV1291652
+Node: Bugs1292395
+Node: Bug definition1293307
+Node: Bug address1296809
+Node: Usenet1300328
+Node: Performance bugs1301517
+Node: Asking for help1304438
+Node: Maintainers1306405
+Node: Other Versions1307412
+Node: Installation summary1315991
+Node: Notes1317331
+Node: Compatibility Mode1318125
+Node: Additions1318907
+Node: Accessing The Source1319832
+Node: Adding Code1321269
+Node: New Ports1328084
+Node: Derived Files1332459
+Ref: Derived Files-Footnote-11338118
+Ref: Derived Files-Footnote-21338153
+Ref: Derived Files-Footnote-31338748
+Node: Future Extensions1338862
+Node: Implementation Limitations1339520
+Node: Extension Design1340730
+Node: Old Extension Problems1341874
+Ref: Old Extension Problems-Footnote-11343392
+Node: Extension New Mechanism Goals1343449
+Ref: Extension New Mechanism Goals-Footnote-11346813
+Node: Extension Other Design Decisions1347002
+Node: Extension Future Growth1349115
+Node: Notes summary1349721
+Node: Basic Concepts1350879
+Node: Basic High Level1351560
+Ref: figure-general-flow1351842
+Ref: figure-process-flow1352528
+Ref: Basic High Level-Footnote-11355830
+Node: Basic Data Typing1356015
+Node: Glossary1359343
+Node: Copying1391230
+Node: GNU Free Documentation License1428773
+Node: Index1453893
 
 End Tag Table
 
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 5ff6b507..807f7cea 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -31065,7 +31065,7 @@ memory like so:
 
 @example
 $ @kbd{gawk --version}
-@print{} GNU Awk 5.2.0, API 3.2, PMA Avon 7, (GNU MPFR 4.0.1, GNU MP 6.1.2)
+@print{} GNU Awk 5.2.1, API 3.2, PMA Avon 8-g1, (GNU MPFR 4.0.1, GNU MP 6.1.2)
 @print{} Copyright (C) 1989, 1991-2022 Free Software Foundation.
 @dots{}
 @end example
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index 8ef44e19..161c90db 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -29947,7 +29947,7 @@ memory like so:
 
 @example
 $ @kbd{gawk --version}
-@print{} GNU Awk 5.2.0, API 3.2, PMA Avon 7, (GNU MPFR 4.0.1, GNU MP 6.1.2)
+@print{} GNU Awk 5.2.1, API 3.2, PMA Avon 8-g1, (GNU MPFR 4.0.1, GNU MP 6.1.2)
 @print{} Copyright (C) 1989, 1991-2022 Free Software Foundation.
 @dots{}
 @end example
diff --git a/main.c b/main.c
index 9443f5bc..421311ca 100644
--- a/main.c
+++ b/main.c
@@ -461,6 +461,9 @@ main(int argc, char **argv)
        if (os_isatty(fileno(stdout)))
                output_is_tty = true;
 
+       /* arrange to save free lists if using PMA */
+       atexit(pma_save_free_lists);
+
        /* initialize API before loading extension libraries */
        init_ext_api();
 
@@ -1854,8 +1857,7 @@ parse_args(int argc, char **argv)
 out:
        do_optimize = (do_optimize && ! do_pretty_print);
 
-       if (using_persistent_malloc)
-               pma_mpfr_check();
+       pma_mpfr_check();
 
        return;
 }
diff --git a/symbol.c b/symbol.c
index 65e710e4..e7e49c2b 100644
--- a/symbol.c
+++ b/symbol.c
@@ -47,6 +47,17 @@ NODE *symbol_table, *func_table;
 /* Use a flag to avoid a strcmp() call inside install() */
 static bool installing_specials = false;
 
+// Using persistent memory, manage the root pointer
+// which holds this struct:
+struct root_pointers {
+       NODE *global_table;
+       NODE *func_table;
+       NODE *symbol_table;
+       struct block_header nextfree[BLOCK_MAX];
+       int mpfr;
+       bool first;
+} *root_pointers = NULL;
+
 /* init_the_tables --- deal with the tables for in memory use */
 
 static void
@@ -66,16 +77,6 @@ init_the_tables(void)
        installing_specials = false;
 }
 
-// using persistent memory, manage the root pointer
-// which holds this struct:
-struct root_pointers {
-       NODE *global_table;
-       NODE *func_table;
-       NODE *symbol_table;
-       bool first;
-       int mpfr;
-} *root_pointers = NULL;
-
 /* init_symbol_table --- make sure the symbol tables are initialized */
 
 void
@@ -97,6 +98,7 @@ init_symbol_table()
 
                // save the pointers for the next time.
                emalloc(root_pointers, struct root_pointers *, sizeof(struct 
root_pointers), "init_symbol_table");
+               memset(root_pointers, 0, sizeof(struct root_pointers));
                root_pointers->global_table = global_table;
                root_pointers->func_table = func_table;
                root_pointers->symbol_table = symbol_table;
@@ -108,6 +110,7 @@ init_symbol_table()
                global_table = root_pointers->global_table;
                func_table = root_pointers->func_table;
                symbol_table = root_pointers->symbol_table;
+               memcpy(nextfree, root_pointers->nextfree, sizeof(nextfree));
 
                // still need to set this one up as usual
                getnode(param_table);
@@ -121,10 +124,12 @@ init_symbol_table()
 void
 pma_mpfr_check(void)
 {
+       if (! using_persistent_malloc)
+               return;
+
        if (root_pointers->first) {
                root_pointers->first = false;
                root_pointers->mpfr = do_mpfr;
-               pma_set_root(root_pointers);
                return;
        }
 
@@ -132,6 +137,19 @@ pma_mpfr_check(void)
                fatal(_("current setting of -M/--bignum does not match saved 
setting in PMA backing file"));
 }
 
+/* pma_save_free_lists --- save the free lists in the root pointer */
+
+void
+pma_save_free_lists(void)
+{
+       if (! using_persistent_malloc)
+               return;
+
+       assert(! root_pointers->first);
+
+       memcpy(root_pointers->nextfree, nextfree, sizeof(nextfree));
+}
+
 /*
  * install_symbol:
  * Install a global name in the symbol table, even if it is already there.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog       |  14 ++
 NEWS            |  15 +-
 awk.h           |   3 +-
 doc/ChangeLog   |   5 +
 doc/gawk.info   | 478 ++++++++++++++++++++++++++++----------------------------
 doc/gawk.texi   |   2 +-
 doc/gawktexi.in |   2 +-
 main.c          |   6 +-
 symbol.c        |  40 +++--
 9 files changed, 309 insertions(+), 256 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]