Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit36425ec

Browse files
committed
Change MemoryContextMemAllocated to return Size
Commitf2369bc switched most of the memory accounting from int64 toSize, 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
1 parente800bd7 commit36425ec

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎src/backend/utils/mmgr/mcxt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,10 +466,10 @@ MemoryContextIsEmpty(MemoryContext context)
466466
* Find the memory allocated to blocks for this memory context. If recurse is
467467
* true, also include children.
468468
*/
469-
int64
469+
Size
470470
MemoryContextMemAllocated(MemoryContextcontext,boolrecurse)
471471
{
472-
int64total=context->mem_allocated;
472+
Sizetotal=context->mem_allocated;
473473

474474
AssertArg(MemoryContextIsValid(context));
475475

‎src/include/utils/memutils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ extern void MemoryContextSetParent(MemoryContext context,
8282
externSizeGetMemoryChunkSpace(void*pointer);
8383
externMemoryContextMemoryContextGetParent(MemoryContextcontext);
8484
externboolMemoryContextIsEmpty(MemoryContextcontext);
85-
externint64MemoryContextMemAllocated(MemoryContextcontext,boolrecurse);
85+
externSizeMemoryContextMemAllocated(MemoryContextcontext,boolrecurse);
8686
externvoidMemoryContextStats(MemoryContextcontext);
8787
externvoidMemoryContextStatsDetail(MemoryContextcontext,intmax_children);
8888
externvoidMemoryContextAllowInCriticalSection(MemoryContextcontext,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp