- Notifications
You must be signed in to change notification settings - Fork5
Commitee01d84
committed
In bms_add_member(), use repalloc() if the bms needs to be enlarged.
Previously bms_add_member() would palloc a whole-new copy of the existingset, copy the words, and pfree the old one. repalloc() is potentially muchfaster, and more importantly, this is less surprising if CurrentMemoryContextis not the same as the context the old set is in. bms_add_member() stillallocates a new bitmapset in CurrentMemoryContext if NULL is passed asargument, but that is a lot less likely to induce bugs.Nicholas White.1 parent357f752 commitee01d84
1 file changed
+9
-10
lines changedLines changed: 9 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
632 | 632 |
| |
633 | 633 |
| |
634 | 634 |
| |
| 635 | + | |
| 636 | + | |
635 | 637 |
| |
636 | 638 |
| |
637 |
| - | |
638 |
| - | |
639 |
| - | |
| 639 | + | |
640 | 640 |
| |
641 | 641 |
| |
642 |
| - | |
643 |
| - | |
644 |
| - | |
645 |
| - | |
646 |
| - | |
647 |
| - | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
648 | 647 |
| |
649 |
| - | |
| 648 | + | |
650 | 649 |
| |
651 | 650 |
| |
652 | 651 |
| |
|
0 commit comments
Comments
(0)