forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit16be2fd
committed
Make dsa_allocate interface more like MemoryContextAlloc.
A new function dsa_allocate_extended now takes flags which indicatethat huge allocations should be permitted, that out-of-memoryconditions should not throw an error, and/or that the returned memoryshould be zero-filled, just like MemoryContextAllocateExtended.Commit9acb855, which addeddsa_allocate0, was broken because it failed to account for thepossibility that dsa_allocate() might return InvalidDsaPointer.This fixes that problem along the way.Thomas Munro, with some comment changes by me.Discussion:http://postgr.es/m/CA+Tgmobt7CcF_uQP2UQwWmu4K9qCHehMJP9_9m1urwP8hbOeHQ@mail.gmail.com1 parent1a16af8 commit16be2fd
2 files changed
+69
-23
lines changedLines changed: 55 additions & 21 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
642 | 642 |
| |
643 | 643 |
| |
644 | 644 |
| |
645 |
| - | |
646 |
| - | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
647 | 662 |
| |
648 | 663 |
| |
649 |
| - | |
| 664 | + | |
650 | 665 |
| |
651 | 666 |
| |
652 | 667 |
| |
653 | 668 |
| |
| 669 | + | |
654 | 670 |
| |
655 | 671 |
| |
656 | 672 |
| |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
657 | 678 |
| |
658 | 679 |
| |
659 | 680 |
| |
| |||
684 | 705 |
| |
685 | 706 |
| |
686 | 707 |
| |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
687 | 716 |
| |
688 | 717 |
| |
689 | 718 |
| |
| |||
710 | 739 |
| |
711 | 740 |
| |
712 | 741 |
| |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
713 | 746 |
| |
714 | 747 |
| |
715 | 748 |
| |
| |||
748 | 781 |
| |
749 | 782 |
| |
750 | 783 |
| |
751 |
| - | |
752 |
| - | |
753 |
| - | |
754 |
| - | |
755 |
| - | |
756 |
| - | |
| 784 | + | |
| 785 | + | |
757 | 786 |
| |
758 |
| - | |
759 |
| - | |
760 |
| - | |
761 |
| - | |
762 |
| - | |
763 |
| - | |
764 |
| - | |
765 |
| - | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
766 | 800 |
| |
767 |
| - | |
768 |
| - | |
769 |
| - | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
770 | 804 |
| |
771 |
| - | |
| 805 | + | |
772 | 806 |
| |
773 | 807 |
| |
774 | 808 |
| |
|
Lines changed: 14 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
71 | 71 |
| |
72 | 72 |
| |
73 | 73 |
| |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
74 | 79 |
| |
75 | 80 |
| |
76 | 81 |
| |
77 | 82 |
| |
78 | 83 |
| |
79 | 84 |
| |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
80 | 93 |
| |
81 | 94 |
| |
82 | 95 |
| |
| |||
105 | 118 |
| |
106 | 119 |
| |
107 | 120 |
| |
108 |
| - | |
109 |
| - | |
| 121 | + | |
110 | 122 |
| |
111 | 123 |
| |
112 | 124 |
| |
|
0 commit comments
Comments
(0)