Commit 36425ece authored by Tomas Vondra's avatar Tomas Vondra

Change MemoryContextMemAllocated to return Size

Commit f2369bc6 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
parent e800bd74
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment