8000 ee: Use memory context instead of malloc in ATX handling by funny-falcon · Pull Request #14 · postgrespro/mmts · GitHub
[go: up one dir, main page]

Skip to content

ee: Use memory context instead of malloc in ATX handling #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
ee: Use memory context instead of malloc in ATX handling
PGPRO-5692 / PGPRO-5336
  • Loading branch information
funny-falcon committed Oct 21, 2021
commit fdb4d415d105ec65538bd27d2e3645b1b792445c
4 changes: 2 additions & 2 deletions src/multimaster.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ MtmDeserializeTransactionState(void *ctx)
static void *
MtmSuspendTransaction(void)
{
MtmCurrentTrans *ctx = malloc(sizeof(MtmCurrentTrans));
MtmCurrentTrans *ctx = MemoryContextAlloc(CurTransactionContext, sizeof(MtmCurrentTrans));

*ctx = MtmTx;
return ctx;
Expand All @@ -376,7 +376,7 @@ static void
MtmResumeTransaction(void *ctx)
{
MtmTx = *(MtmCurrentTrans *) ctx;
free(ctx);
pfree(ctx);
}
#endif

Expand Down
0