forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit543852f
committed
Allocate freechunks bitmap as part of SlabContext
The bitmap used by SlabCheck to cross-check free chunks in a block usedto be allocated for each SlabCheck call, and was never freed. The memoryleak could be fixed by simply adding a pfree call, but it's actually abad idea to do any allocations in SlabCheck at all as it assumes thestate of the memory management as a whole is sane.So instead we allocate the bitmap as part of SlabContext, which meanswe don't need to do any allocations in SlabCheck and the bitmap goesaway together with the SlabContext.Backpatch to 10, where the Slab context was introduced.Author: Tomas VondraReported-by: Andres FreundReviewed-by: Tom LaneBackpatch-through: 10Discussion:https://www.postgresql.org/message-id/20200116044119.g45f7pmgz4jmodxj%40alap3.anarazel.de1 parent4b0e0f6 commit543852f
1 file changed
+21
-7
lines changedLines changed: 21 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
70 | 70 |
| |
71 | 71 |
| |
72 | 72 |
| |
| 73 | + | |
| 74 | + | |
| 75 | + | |
73 | 76 |
| |
74 | 77 |
| |
75 | 78 |
| |
| |||
229 | 232 |
| |
230 | 233 |
| |
231 | 234 |
| |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
232 | 244 |
| |
233 | 245 |
| |
234 | 246 |
| |
| |||
258 | 270 |
| |
259 | 271 |
| |
260 | 272 |
| |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
261 | 279 |
| |
262 | 280 |
| |
263 | 281 |
| |
| |||
701 | 719 |
| |
702 | 720 |
| |
703 | 721 |
| |
704 |
| - | |
705 | 722 |
| |
706 | 723 |
| |
707 | 724 |
| |
708 | 725 |
| |
709 |
| - | |
710 |
| - | |
711 |
| - | |
712 | 726 |
| |
713 | 727 |
| |
714 | 728 |
| |
| |||
731 | 745 |
| |
732 | 746 |
| |
733 | 747 |
| |
734 |
| - | |
| 748 | + | |
735 | 749 |
| |
736 | 750 |
| |
737 | 751 |
| |
| |||
748 | 762 |
| |
749 | 763 |
| |
750 | 764 |
| |
751 |
| - | |
| 765 | + | |
752 | 766 |
| |
753 | 767 |
| |
754 | 768 |
| |
| |||
759 | 773 |
| |
760 | 774 |
| |
761 | 775 |
| |
762 |
| - | |
| 776 | + | |
763 | 777 |
| |
764 | 778 |
| |
765 | 779 |
| |
|
0 commit comments
Comments
(0)