* Standard routine for creating cache context if it doesn't exist yet * * There are a lot of places (probably far more than necessary) that check * whether CacheMemoryContext exists yet and want to create it if not. * We centralize knowledge of exactly how to create it here. */
| 618 | * We centralize knowledge of exactly how to create it here. |
| 619 | */ |
| 620 | void |
| 621 | CreateCacheMemoryContext(void) |
| 622 | { |
| 623 | /* |
| 624 | * Purely for paranoia, check that context doesn't exist; caller probably |
| 625 | * did so already. |
| 626 | */ |
| 627 | if (!CacheMemoryContext) |
| 628 | CacheMemoryContext = AllocSetContextCreate(TopMemoryContext, |
| 629 | "CacheMemoryContext", |
| 630 | ALLOCSET_DEFAULT_SIZES); |
| 631 | } |
| 632 | |
| 633 | |
| 634 | /* |
no outgoing calls
no test coverage detected