- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit40d3f82
committed
Add more assertions in palloc0() and palloc_extended()
palloc() includes an assertion checking that an alloc() implementationnever returns NULL for all MemoryContextMethods.This commit adds a similar assertion in palloc0(). In palloc_extend(),a different assertion is added, checking that MCXT_ALLOC_NO_OOM is setwhen an alloc() routine returns NULL. These additions can be useful tocatch errors when implementing a new set of MemoryContextMethodsroutines.Author: Andreas Karlsson <andreas@proxel.se>Discussion:https://postgr.es/m/507e8eba-2035-4a12-a777-98199a66beb8@proxel.se1 parentba57dcf commit40d3f82
1 file changed
+4
-1
lines changedLines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1356 | 1356 |
| |
1357 | 1357 |
| |
1358 | 1358 |
| |
1359 |
| - | |
| 1359 | + | |
| 1360 | + | |
1360 | 1361 |
| |
1361 | 1362 |
| |
1362 | 1363 |
| |
| |||
1379 | 1380 |
| |
1380 | 1381 |
| |
1381 | 1382 |
| |
| 1383 | + | |
| 1384 | + | |
1382 | 1385 |
| |
1383 | 1386 |
| |
1384 | 1387 |
| |
|
0 commit comments
Comments
(0)