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:
Tomas Vondra 2019-10-05 20:49:39 +02:00
parent e800bd7414
commit 36425ece5d
2 changed files with 3 additions and 3 deletions

View File

@ -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));

View File

@ -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,