mirror of
https://github.com/postgres/postgres.git
synced 2025-05-02 11:44:50 +03:00
Change MemoryContextMemAllocated to return Size
Commit f2369bc610 switched most of the memory accounting from int64 to Size, but it forgot to change the MemoryContextMemAllocated return type. So this fixes that omission. Discussion: https://www.postgresql.org/message-id/11238.1570200198%40sss.pgh.pa.us
This commit is contained in:
parent
e800bd7414
commit
36425ece5d
@ -466,10 +466,10 @@ MemoryContextIsEmpty(MemoryContext context)
|
||||
* Find the memory allocated to blocks for this memory context. If recurse is
|
||||
* true, also include children.
|
||||
*/
|
||||
int64
|
||||
Size
|
||||
MemoryContextMemAllocated(MemoryContext context, bool recurse)
|
||||
{
|
||||
int64 total = context->mem_allocated;
|
||||
Size total = context->mem_allocated;
|
||||
|
||||
AssertArg(MemoryContextIsValid(context));
|
||||
|
||||
|
@ -82,7 +82,7 @@ extern void MemoryContextSetParent(MemoryContext context,
|
||||
extern Size GetMemoryChunkSpace(void *pointer);
|
||||
extern MemoryContext MemoryContextGetParent(MemoryContext context);
|
||||
extern bool MemoryContextIsEmpty(MemoryContext context);
|
||||
extern int64 MemoryContextMemAllocated(MemoryContext context, bool recurse);
|
||||
extern Size MemoryContextMemAllocated(MemoryContext context, bool recurse);
|
||||
extern void MemoryContextStats(MemoryContext context);
|
||||
extern void MemoryContextStatsDetail(MemoryContext context, int max_children);
|
||||
extern void MemoryContextAllowInCriticalSection(MemoryContext context,
|
||||
|
Loading…
x
Reference in New Issue
Block a user