forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb70d4a6
committed
Remove an "optimization" I installed in 2001, to make repalloc() attempt to
enlarge the memory chunk in-place when it was feasible to do so. This turnsout to not work well at all for scenarios involving repeated cycles ofpalloc/repalloc/pfree: the eventually freed chunks go into the wrong freelistfor the next initial palloc request, and so we consume memory indefinitely.While that could be defended against, the number of cases where theoptimization can still be applied drops significantly, and adjusting theinitial sizes of StringInfo buffers makes it drop to almost nothing.Seems better to just remove the extra complexity.Per recent discussion and testing.1 parent70868c0 commitb70d4a6
1 file changed
+10
-49
lines changedLines changed: 10 additions & 49 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
14 |
| - | |
| 14 | + | |
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
| |||
932 | 932 |
| |
933 | 933 |
| |
934 | 934 |
| |
935 |
| - | |
936 |
| - | |
937 |
| - | |
938 |
| - | |
939 |
| - | |
940 |
| - | |
941 |
| - | |
942 |
| - | |
943 |
| - | |
944 |
| - | |
945 |
| - | |
946 |
| - | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
947 | 944 |
| |
948 | 945 |
| |
949 | 946 |
| |
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 | 947 |
| |
987 | 948 |
| |
988 | 949 |
| |
|
0 commit comments
Comments
(0)