diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2022-10-06 13:35:31 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2022-10-06 13:35:31 -0400 |
commit | 9543eff5e015b6f6f832da2d95d659629a2022f3 (patch) | |
tree | b5c27a4eaa8720dbf932ec3409df1cb9e1e62b07 /src/include/utils/memutils.h | |
parent | 42b746d4c982257bf3f924176632b04dc288174b (diff) | |
download | postgresql-9543eff5e015b6f6f832da2d95d659629a2022f3.tar.gz postgresql-9543eff5e015b6f6f832da2d95d659629a2022f3.zip |
Remove MemoryContextContains().
MemoryContextContains is no longer reliable in the wake of c6e0fe1f2,
because there's no longer very much redundancy in chunk headers.
(It wasn't *completely* reliable even before that, as there was a
chance of a false positive if you passed it something that didn't
point to an mcxt chunk at all. But it was generally good enough.)
Hence, remove it. There is no remaining core code that requires it.
Extensions that have been using it might be able to substitute a
test like "GetMemoryChunkContext(ptr) == context", recognizing that
this explicitly requires that the pointer point to some chunk.
Tom Lane and David Rowley
Discussion: https://postgr.es/m/1913788.1664898906@sss.pgh.pa.us
Diffstat (limited to 'src/include/utils/memutils.h')
-rw-r--r-- | src/include/utils/memutils.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/include/utils/memutils.h b/src/include/utils/memutils.h index 52bc41ec53b..4f6c5435cae 100644 --- a/src/include/utils/memutils.h +++ b/src/include/utils/memutils.h @@ -96,7 +96,6 @@ extern void MemoryContextAllowInCriticalSection(MemoryContext context, #ifdef MEMORY_CONTEXT_CHECKING extern void MemoryContextCheck(MemoryContext context); #endif -extern bool MemoryContextContains(MemoryContext context, void *pointer); /* Handy macro for copying and assigning context ID ... but note double eval */ #define MemoryContextCopyAndSetIdentifier(cxt, id) \ |