- Notifications
You must be signed in to change notification settings - Fork5
Commitf7d54f4
committed
Fix accounting of memory needed for merge heap.
We allegedly allocated all remaining memory for the read buffers of thesort tapes, but we allocated the merge heap only after that. That meansthat the allocation of the merge heap was guaranteed to go over the memorylimit. Fix by allocating the merge heap first. This makes little differencein practice, because the merge heap is tiny, but let's tidy.While we're at it, add a safeguard for the case that we are already overthe limit when allocating the read buffers. That shouldn't happen, butbetter safe than sorry.The memory accounting error was reported off-list by Peter Geoghegan.1 parentcd5d3af commitf7d54f4
1 file changed
+11
-11
lines changedLines changed: 11 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2637 | 2637 |
| |
2638 | 2638 |
| |
2639 | 2639 |
| |
2640 |
| - | |
2641 |
| - | |
| 2640 | + | |
| 2641 | + | |
| 2642 | + | |
| 2643 | + | |
| 2644 | + | |
| 2645 | + | |
| 2646 | + | |
| 2647 | + | |
| 2648 | + | |
| 2649 | + | |
2642 | 2650 |
| |
2643 | 2651 |
| |
2644 | 2652 |
| |
| |||
2661 | 2669 |
| |
2662 | 2670 |
| |
2663 | 2671 |
| |
2664 |
| - | |
| 2672 | + | |
2665 | 2673 |
| |
2666 | 2674 |
| |
2667 |
| - | |
2668 |
| - | |
2669 |
| - | |
2670 |
| - | |
2671 |
| - | |
2672 |
| - | |
2673 |
| - | |
2674 |
| - | |
2675 | 2675 |
| |
2676 | 2676 |
| |
2677 | 2677 |
| |
|
0 commit comments
Comments
(0)