Header And Logo

PostgreSQL
| The world's most advanced open source database.

Defines | Functions | Variables

mcxt.c File Reference

#include "postgres.h"
#include "utils/memutils.h"
Include dependency graph for mcxt.c:

Go to the source code of this file.

Defines

#define MCXT_INCLUDE_DEFINITIONS

Functions

static void MemoryContextStatsInternal (MemoryContext context, int level)
void MemoryContextInit (void)
void MemoryContextReset (MemoryContext context)
void MemoryContextResetChildren (MemoryContext context)
void MemoryContextDelete (MemoryContext context)
void MemoryContextDeleteChildren (MemoryContext context)
void MemoryContextResetAndDeleteChildren (MemoryContext context)
void MemoryContextSetParent (MemoryContext context, MemoryContext new_parent)
Size GetMemoryChunkSpace (void *pointer)
MemoryContext GetMemoryChunkContext (void *pointer)
MemoryContext MemoryContextGetParent (MemoryContext context)
bool MemoryContextIsEmpty (MemoryContext context)
void MemoryContextStats (MemoryContext context)
bool MemoryContextContains (MemoryContext context, void *pointer)
MemoryContext MemoryContextCreate (NodeTag tag, Size size, MemoryContextMethods *methods, MemoryContext parent, const char *name)
void * MemoryContextAlloc (MemoryContext context, Size size)
void * MemoryContextAllocZero (MemoryContext context, Size size)
void * MemoryContextAllocZeroAligned (MemoryContext context, Size size)
void * palloc (Size size)
void * palloc0 (Size size)
void pfree (void *pointer)
void * repalloc (void *pointer, Size size)
char * MemoryContextStrdup (MemoryContext context, const char *string)
char * pstrdup (const char *in)
char * pnstrdup (const char *in, Size len)

Variables

MemoryContext CurrentMemoryContext = NULL
MemoryContext TopMemoryContext = NULL
MemoryContext ErrorContext = NULL
MemoryContext PostmasterContext = NULL
MemoryContext CacheMemoryContext = NULL
MemoryContext MessageContext = NULL
MemoryContext TopTransactionContext = NULL
MemoryContext CurTransactionContext = NULL
MemoryContext PortalContext = NULL

Define Documentation

#define MCXT_INCLUDE_DEFINITIONS

Definition at line 23 of file mcxt.c.


Function Documentation

MemoryContext GetMemoryChunkContext ( void *  pointer  ) 

Definition at line 325 of file mcxt.c.

References Assert, AssertArg, StandardChunkHeader::context, MAXALIGN, MemoryContextIsValid, and NULL.

Referenced by mark_dummy_rel().

{
    StandardChunkHeader *header;

    /*
     * Try to detect bogus pointers handed to us, poorly though we can.
     * Presumably, a pointer that isn't MAXALIGNED isn't pointing at an
     * allocated chunk.
     */
    Assert(pointer != NULL);
    Assert(pointer == (void *) MAXALIGN(pointer));

    /*
     * OK, it's probably safe to look at the chunk header.
     */
    header = (StandardChunkHeader *)
        ((char *) pointer - STANDARDCHUNKHEADERSIZE);

    AssertArg(MemoryContextIsValid(header->context));

    return header->context;
}

Size GetMemoryChunkSpace ( void *  pointer  ) 

Definition at line 295 of file mcxt.c.

References Assert, AssertArg, StandardChunkHeader::context, MemoryContextMethods::get_chunk_space, MAXALIGN, MemoryContextIsValid, MemoryContextData::methods, and NULL.

Referenced by copytup_cluster(), copytup_heap(), copytup_index(), free_sort_tuple(), getDatumCopy(), ginAllocEntryAccumulator(), ginCombineData(), ginInsertBAEntry(), grow_memtuples(), inittapes(), readtup_cluster(), readtup_datum(), readtup_heap(), readtup_index(), tuplesort_begin_common(), tuplesort_gettuple_common(), tuplesort_putdatum(), tuplestore_begin_common(), tuplestore_clear(), tuplestore_puttupleslot(), tuplestore_putvalues(), tuplestore_trim(), writetup_cluster(), writetup_datum(), writetup_heap(), and writetup_index().

{
    StandardChunkHeader *header;

    /*
     * Try to detect bogus pointers handed to us, poorly though we can.
     * Presumably, a pointer that isn't MAXALIGNED isn't pointing at an
     * allocated chunk.
     */
    Assert(pointer != NULL);
    Assert(pointer == (void *) MAXALIGN(pointer));

    /*
     * OK, it's probably safe to look at the chunk header.
     */
    header = (StandardChunkHeader *)
        ((char *) pointer - STANDARDCHUNKHEADERSIZE);

    AssertArg(MemoryContextIsValid(header->context));

    return (*header->context->methods->get_chunk_space) (header->context,
                                                         pointer);
}

void* MemoryContextAlloc ( MemoryContext  context,
Size  size 
)

Definition at line 570 of file mcxt.c.

References MemoryContextMethods::alloc, AllocSizeIsValid, AssertArg, elog, ERROR, MemoryContextData::isReset, MemoryContextIsValid, and MemoryContextData::methods.

Referenced by _bt_getroot(), _bt_getrootheight(), _fdvec_alloc(), _hash_regscan(), AddInvalidationMessage(), afterTriggerAddEvent(), AfterTriggerBeginXact(), array_fill_internal(), array_in(), array_out(), array_push(), array_recv(), array_send(), array_to_text_internal(), AtSubCommit_childXids(), BackendRun(), BuildTupleHashTable(), compute_array_stats(), CopySnapshot(), create_singleton_array(), dblink_connect(), do_compile(), domain_check(), domain_in(), domain_recv(), DynaHashAlloc(), EventTriggerBeginCompleteQuery(), ExecHashBuildSkewHash(), ExecHashSkewTableInsert(), ExecHashTableInsert(), ExecSetSlotDescriptor(), fmgr_info_copy(), get_attribute_options(), get_range_io_data(), get_tablespace(), get_tabstat_stack_level(), GetComboCommandId(), GetFdwRoutineForRelation(), GetLocalBufferStorage(), GetLockConflicts(), gistAllocateNewPageBuffer(), gtrgm_consistent(), gtrgm_distance(), gtrgm_penalty(), hstore_from_record(), hstore_populate_record(), initialize_reloptions(), insertStatEntry(), inv_open(), json_populate_record(), json_populate_recordset(), load_relcache_init_file(), LockAcquireExtended(), lookup_ts_config_cache(), MemoryContextCreate(), MemoryContextStrdup(), mXactCachePut(), packGraph(), pg_column_size(), pg_stat_get_backend_idset(), pgstat_read_current_status(), plpgsql_create_econtext(), PLy_malloc(), PortalSetResultFormat(), pq_init(), PrepareClientEncoding(), PrepareSortSupportComparisonShim(), PrepareTempTablespaces(), PushActiveSnapshot(), record_cmp(), record_eq(), record_in(), record_out(), record_recv(), record_send(), RegisterExprContextCallback(), RegisterResourceReleaseCallback(), RegisterSubXactCallback(), RegisterXactCallback(), RelationBuildRuleLock(), RelationBuildTupleDesc(), RelationCreateStorage(), RelationDropStorage(), RelationInitIndexAccessInfo(), RelationParseRelOptions(), ResourceOwnerEnlargeBuffers(), ResourceOwnerEnlargeCatCacheListRefs(), ResourceOwnerEnlargeCatCacheRefs(), ResourceOwnerEnlargeFiles(), ResourceOwnerEnlargePlanCacheRefs(), ResourceOwnerEnlargeRelationRefs(), ResourceOwnerEnlargeSnapshots(), ResourceOwnerEnlargeTupleDescs(), SPI_connect(), tbm_begin_iterate(), tsa_rewrite_accum(), tstoreStartupReceiver(), and txid_snapshot_xip().

{
    AssertArg(MemoryContextIsValid(context));

    if (!AllocSizeIsValid(size))
        elog(ERROR, "invalid memory alloc request size %lu",
             (unsigned long) size);

    context->isReset = false;

    return (*context->methods->alloc) (context, size);
}

void* MemoryContextAllocZero ( MemoryContext  context,
Size  size 
)
void* MemoryContextAllocZeroAligned ( MemoryContext  context,
Size  size 
)

Definition at line 618 of file mcxt.c.

References MemoryContextMethods::alloc, AllocSizeIsValid, AssertArg, elog, ERROR, MemoryContextData::isReset, MemoryContextIsValid, MemSetLoop, and MemoryContextData::methods.

{
    void       *ret;

    AssertArg(MemoryContextIsValid(context));

    if (!AllocSizeIsValid(size))
        elog(ERROR, "invalid memory alloc request size %lu",
             (unsigned long) size);

    context->isReset = false;

    ret = (*context->methods->alloc) (context, size);

    MemSetLoop(ret, 0, size);

    return ret;
}

bool MemoryContextContains ( MemoryContext  context,
void *  pointer 
)

Definition at line 436 of file mcxt.c.

References AllocSizeIsValid, StandardChunkHeader::context, MAXALIGN, NULL, and StandardChunkHeader::size.

Referenced by eval_windowfunction(), finalize_aggregate(), and finalize_windowaggregate().

{
    StandardChunkHeader *header;

    /*
     * Try to detect bogus pointers handed to us, poorly though we can.
     * Presumably, a pointer that isn't MAXALIGNED isn't pointing at an
     * allocated chunk.
     */
    if (pointer == NULL || pointer != (void *) MAXALIGN(pointer))
        return false;

    /*
     * OK, it's probably safe to look at the chunk header.
     */
    header = (StandardChunkHeader *)
        ((char *) pointer - STANDARDCHUNKHEADERSIZE);

    /*
     * If the context link doesn't match then we certainly have a non-member
     * chunk.  Also check for a reasonable-looking size as extra guard against
     * being fooled by bogus pointers.
     */
    if (header->context == context && AllocSizeIsValid(header->size))
        return true;
    return false;
}

MemoryContext MemoryContextCreate ( NodeTag  tag,
Size  size,
MemoryContextMethods methods,
MemoryContext  parent,
const char *  name 
)

Definition at line 513 of file mcxt.c.

References Assert, MemoryContextData::firstchild, MemoryContextMethods::init, MemoryContextData::isReset, malloc, MemoryContextAlloc(), MemSet, MemoryContextData::methods, MemoryContextData::name, MemoryContextData::nextchild, NULL, MemoryContextData::parent, and MemoryContextData::type.

Referenced by AllocSetContextCreate().

{
    MemoryContext node;
    Size        needed = size + strlen(name) + 1;

    /* Get space for node and name */
    if (TopMemoryContext != NULL)
    {
        /* Normal case: allocate the node in TopMemoryContext */
        node = (MemoryContext) MemoryContextAlloc(TopMemoryContext,
                                                  needed);
    }
    else
    {
        /* Special case for startup: use good ol' malloc */
        node = (MemoryContext) malloc(needed);
        Assert(node != NULL);
    }

    /* Initialize the node as best we can */
    MemSet(node, 0, size);
    node->type = tag;
    node->methods = methods;
    node->parent = NULL;        /* for the moment */
    node->firstchild = NULL;
    node->nextchild = NULL;
    node->isReset = true;
    node->name = ((char *) node) + size;
    strcpy(node->name, name);

    /* Type-specific routine finishes any other essential initialization */
    (*node->methods->init) (node);

    /* OK to link node to parent (if any) */
    /* Could use MemoryContextSetParent here, but doesn't seem worthwhile */
    if (parent)
    {
        node->parent = parent;
        node->nextchild = parent->firstchild;
        parent->firstchild = node;
    }

    /* Return to type-specific creation routine to finish up */
    return node;
}

void MemoryContextDelete ( MemoryContext  context  ) 

Definition at line 169 of file mcxt.c.

References Assert, AssertArg, MemoryContextMethods::delete_context, MemoryContextDeleteChildren(), MemoryContextIsValid, MemoryContextSetParent(), MemoryContextData::methods, NULL, and pfree().

Referenced by AfterTriggerEndXact(), afterTriggerInvokeEvents(), AtCleanup_Memory(), AtCommit_Memory(), AtEOSubXact_SPI(), AtEOXact_LargeObject(), AtSubCleanup_Memory(), AtSubCommit_Memory(), btendscan(), btvacuumscan(), cluster(), compute_index_stats(), CopyTo(), createTrgmNFA(), do_analyze_rel(), do_start_worker(), DropCachedPlan(), end_heap_rewrite(), EndCopy(), EventTriggerEndCompleteQuery(), EventTriggerInvoke(), exec_replication_command(), ExecEndAgg(), ExecEndRecursiveUnion(), ExecEndSetOp(), ExecEndUnique(), ExecEndWindowAgg(), ExecHashTableDestroy(), file_acquire_sample_rows(), fmgr_sql(), FreeExecutorState(), FreeExprContext(), freeGISTstate(), geqo_eval(), gin_xlog_cleanup(), ginbuild(), ginendscan(), gininsert(), ginInsertCleanup(), gist_xlog_cleanup(), gistbuild(), hash_destroy(), inline_function(), inline_set_returning_function(), load_hba(), load_ident(), load_tzoffsets(), makeMdArrayResult(), MemoryContextDeleteChildren(), NIFinishBuild(), pgstat_clear_snapshot(), plperl_spi_freeplan(), plperl_spi_prepare(), plpgsql_free_function_memory(), PLy_pop_execution_context(), PortalDrop(), PostgresMain(), rebuild_database_list(), ReindexDatabase(), RelationBuildRuleLock(), RelationDestroyRelation(), ReleaseCachedPlan(), ResetUnloggedRelations(), RevalidateCachedQuery(), shutdown_MultiFuncCall(), spg_xlog_cleanup(), spgbuild(), spgendscan(), spginsert(), SPI_finish(), SPI_freeplan(), SPI_freetuptable(), StartChildProcess(), tokenize_inc_file(), tuplesort_end(), and vacuum().

{
    AssertArg(MemoryContextIsValid(context));
    /* We had better not be deleting TopMemoryContext ... */
    Assert(context != TopMemoryContext);
    /* And not CurrentMemoryContext, either */
    Assert(context != CurrentMemoryContext);

    MemoryContextDeleteChildren(context);

    /*
     * We delink the context from its parent before deleting it, so that if
     * there's an error we won't have deleted/busted contexts still attached
     * to the context tree.  Better a leak than a crash.
     */
    MemoryContextSetParent(context, NULL);

    (*context->methods->delete_context) (context);
    pfree(context);
}

void MemoryContextDeleteChildren ( MemoryContext  context  ) 

Definition at line 196 of file mcxt.c.

References AssertArg, MemoryContextData::firstchild, MemoryContextDelete(), MemoryContextIsValid, and NULL.

Referenced by AtAbort_Portals(), AtSubAbort_Portals(), MemoryContextDelete(), MemoryContextResetAndDeleteChildren(), PersistHoldablePortal(), and PortalRunMulti().

{
    AssertArg(MemoryContextIsValid(context));

    /*
     * MemoryContextDelete will delink the child from me, so just iterate as
     * long as there is a child.
     */
    while (context->firstchild != NULL)
        MemoryContextDelete(context->firstchild);
}

MemoryContext MemoryContextGetParent ( MemoryContext  context  ) 

Definition at line 353 of file mcxt.c.

References AssertArg, MemoryContextIsValid, and MemoryContextData::parent.

Referenced by GetCachedPlan().

{
    AssertArg(MemoryContextIsValid(context));

    return context->parent;
}

void MemoryContextInit ( void   ) 

Definition at line 79 of file mcxt.c.

References AllocSetContextCreate(), AssertState, and NULL.

Referenced by AuxiliaryProcessMain(), PostgresMain(), and PostmasterMain().

{
    AssertState(TopMemoryContext == NULL);

    /*
     * Initialize TopMemoryContext as an AllocSetContext with slow growth rate
     * --- we don't really expect much to be allocated in it.
     *
     * (There is special-case code in MemoryContextCreate() for this call.)
     */
    TopMemoryContext = AllocSetContextCreate((MemoryContext) NULL,
                                             "TopMemoryContext",
                                             0,
                                             8 * 1024,
                                             8 * 1024);

    /*
     * Not having any other place to point CurrentMemoryContext, make it point
     * to TopMemoryContext.  Caller should change this soon!
     */
    CurrentMemoryContext = TopMemoryContext;

    /*
     * Initialize ErrorContext as an AllocSetContext with slow growth rate ---
     * we don't really expect much to be allocated in it. More to the point,
     * require it to contain at least 8K at all times. This is the only case
     * where retained memory in a context is *essential* --- we want to be
     * sure ErrorContext still has some memory even if we've run out
     * elsewhere!
     */
    ErrorContext = AllocSetContextCreate(TopMemoryContext,
                                         "ErrorContext",
                                         8 * 1024,
                                         8 * 1024,
                                         8 * 1024);
}

bool MemoryContextIsEmpty ( MemoryContext  context  ) 

Definition at line 365 of file mcxt.c.

References AssertArg, MemoryContextData::firstchild, MemoryContextMethods::is_empty, MemoryContextIsValid, MemoryContextData::methods, and NULL.

Referenced by AtSubCommit_Memory().

{
    AssertArg(MemoryContextIsValid(context));

    /*
     * For now, we consider a memory context nonempty if it has any children;
     * perhaps this should be changed later.
     */
    if (context->firstchild != NULL)
        return false;
    /* Otherwise use the type-specific inquiry */
    return (*context->methods->is_empty) (context);
}

void MemoryContextReset ( MemoryContext  context  ) 

Definition at line 125 of file mcxt.c.

References AssertArg, MemoryContextData::firstchild, MemoryContextData::isReset, MemoryContextIsValid, MemoryContextResetChildren(), MemoryContextData::methods, NULL, and MemoryContextMethods::reset.

Referenced by _bt_preprocess_array_keys(), AfterTriggerExecute(), btvacuumpage(), buildSubPlanHash(), CopyOneRowTo(), each_object_field_end(), elements_array_element_end(), errstart(), EventTriggerInvoke(), ExecHashTableReset(), ExecRecursiveUnion(), execTuplesMatch(), execTuplesUnequal(), fetch_more_data(), file_acquire_sample_rows(), gin_redo(), gin_xlog_cleanup(), ginBuildCallback(), ginHeapTupleBulkInsert(), ginInsertCleanup(), gist_redo(), gistBuildCallback(), gistProcessEmptyingQueue(), gistrescan(), gistScanPage(), IndexBuildHeapScan(), IndexCheckExclusion(), keyGetItem(), load_hba(), load_ident(), make_tuple_from_result_row(), MemoryContextResetAndDeleteChildren(), MemoryContextResetChildren(), plperl_return_next(), PLyDict_FromTuple(), postgresExecForeignDelete(), postgresExecForeignInsert(), postgresExecForeignUpdate(), process_ordered_aggregate_multi(), process_ordered_aggregate_single(), ReScanExprContext(), scanPendingInsert(), sepgsql_avc_reset(), setop_fill_hash_table(), spg_redo(), spgistBuildCallback(), spgWalk(), storeRow(), and validate_index_heapscan().

{
    AssertArg(MemoryContextIsValid(context));

    /* save a function call in common case where there are no children */
    if (context->firstchild != NULL)
        MemoryContextResetChildren(context);

    /* Nothing to do if no pallocs since startup or last reset */
    if (!context->isReset)
    {
        (*context->methods->reset) (context);
        context->isReset = true;
    }
}

void MemoryContextResetAndDeleteChildren ( MemoryContext  context  ) 
void MemoryContextResetChildren ( MemoryContext  context  ) 

Definition at line 148 of file mcxt.c.

References AssertArg, MemoryContextData::firstchild, MemoryContextIsValid, MemoryContextReset(), MemoryContextData::nextchild, and NULL.

Referenced by MemoryContextReset().

{
    MemoryContext child;

    AssertArg(MemoryContextIsValid(context));

    for (child = context->firstchild; child != NULL; child = child->nextchild)
        MemoryContextReset(child);
}

void MemoryContextSetParent ( MemoryContext  context,
MemoryContext  new_parent 
)

Definition at line 244 of file mcxt.c.

References AssertArg, MemoryContextData::firstchild, MemoryContextIsValid, MemoryContextData::nextchild, and MemoryContextData::parent.

Referenced by _SPI_save_plan(), CachedPlanSetParentContext(), CompleteCachedPlan(), exec_parse_message(), GetCachedPlan(), MemoryContextDelete(), RevalidateCachedQuery(), SaveCachedPlan(), and SPI_keepplan().

{
    AssertArg(MemoryContextIsValid(context));
    AssertArg(context != new_parent);

    /* Delink from existing parent, if any */
    if (context->parent)
    {
        MemoryContext parent = context->parent;

        if (context == parent->firstchild)
            parent->firstchild = context->nextchild;
        else
        {
            MemoryContext child;

            for (child = parent->firstchild; child; child = child->nextchild)
            {
                if (context == child->nextchild)
                {
                    child->nextchild = context->nextchild;
                    break;
                }
            }
        }
    }

    /* And relink */
    if (new_parent)
    {
        AssertArg(MemoryContextIsValid(new_parent));
        context->parent = new_parent;
        context->nextchild = new_parent->firstchild;
        new_parent->firstchild = context;
    }
    else
    {
        context->parent = NULL;
        context->nextchild = NULL;
    }
}

void MemoryContextStats ( MemoryContext  context  ) 
static void MemoryContextStatsInternal ( MemoryContext  context,
int  level 
) [static]

Definition at line 393 of file mcxt.c.

References AssertArg, MemoryContextData::firstchild, MemoryContextIsValid, MemoryContextData::methods, MemoryContextData::nextchild, NULL, and MemoryContextMethods::stats.

Referenced by MemoryContextStats().

{
    MemoryContext child;

    AssertArg(MemoryContextIsValid(context));

    (*context->methods->stats) (context, level);
    for (child = context->firstchild; child != NULL; child = child->nextchild)
        MemoryContextStatsInternal(child, level + 1);
}

char* MemoryContextStrdup ( MemoryContext  context,
const char *  string 
)
void* palloc ( Size  size  ) 

Definition at line 638 of file mcxt.c.

Referenced by _bt_blnewpage(), _bt_mkscankey(), _bt_mkscankey_nodata(), _bt_newroot(), _bt_pagedel(), _bt_preprocess_array_keys(), _bt_search(), _bt_uppershutdown(), _lca(), _ltq_extract_regex(), _ltree_compress(), _ltree_extract_isparent(), _ltree_extract_risparent(), _ltree_picksplit(), _ltree_union(), _ltxtq_extract_exec(), _mdfd_segpath(), _metaphone(), _PG_init(), _SPI_convert_params(), _SPI_make_plan_non_temp(), _SPI_save_plan(), AbsorbFsyncRequests(), accumArrayResult(), aclexplode(), aclitemin(), aclitemout(), aclmembers(), acquire_inherited_sample_rows(), add_exact_object_address_extra(), add_new_cell(), add_one_float8(), add_reloption(), add_unique_group_var(), addArc(), addArcs(), addCompiledLexeme(), AddEnumLabel(), addKey(), addKeyToQueue(), addNode(), addNorm(), addRangeClause(), AddRelationNewConstraints(), addRTEtoQuery(), addWrd(), AfterTriggerBeginSubXact(), AggregateCreate(), alloc_chromo(), alloc_city_table(), alloc_edge_table(), alloc_pool(), allocate_reloption(), AllocateRelationDesc(), anybit_typmodout(), anychar_typmodout(), anytime_typmodout(), anytimestamp_typmodout(), array_cat(), array_create_iterator(), array_in(), array_map(), array_out(), array_recv(), array_replace_internal(), array_set(), array_typanalyze(), array_unnest(), arrayconst_startup_fn(), arrayexpr_startup_fn(), ArrayGetIntegerTypmods(), assign_record_type_typmod(), AssignTransactionId(), Async_Notify(), ATExecAddColumn(), ATExecColumnDefault(), ATRewriteTable(), autoinc(), AuxiliaryProcessMain(), begin_heap_rewrite(), begin_tup_output_tupdesc(), BeginCopyFrom(), big5_to_euc_tw(), binary_decode(), binary_encode(), binaryheap_allocate(), bit_and(), bit_catenate(), bit_or(), bit_out(), bit_recv(), bitfromint4(), bitfromint8(), bitnot(), bits_to_text(), bitsetbit(), bitshiftleft(), bitshiftright(), bitsubstring(), bitxor(), bms_copy(), boolout(), BootStrapXLOG(), box_center(), box_circle(), box_construct(), box_copy(), box_diagonal(), box_in(), box_intersect(), box_poly(), box_recv(), bpchar(), bpchar_input(), bqarr_in(), bqarr_out(), bt_metap(), bt_page_items(), bt_page_stats(), btbeginscan(), btbuild(), btbuildempty(), btgettuple(), btrescan(), build_datatype(), build_dummy_tuple(), build_function_result_tupdesc_d(), build_minmax_path(), build_regtype_array(), build_row_from_class(), build_row_from_vars(), build_subplan(), build_tlist_index(), build_tlist_index_other_vars(), build_tuplestore_recursively(), BuildCachedPlan(), BuildTupleFromCStrings(), bytea_catenate(), bytea_string_agg_finalfn(), byteain(), byteaout(), bytearecv(), byteaSetBit(), byteaSetByte(), byteatrim(), cached_scansel(), calc_distr(), calc_hist(), calc_hist_selectivity(), cash_out(), CatalogCacheCreateEntry(), char_bpchar(), char_text(), charout(), check_foreign_key(), check_ident_usermap(), check_primary_key(), check_temp_tablespaces(), CheckAffix(), checkAllTheSame(), CheckIndexCompatible(), CheckPointTwoPhase(), CheckRADIUSAuth(), checkSharedDependencies(), chkpass_in(), chkpass_out(), choose_bitmap_and(), chr(), cidout(), cidr_set_masklen(), circle_box(), circle_center(), circle_copy(), circle_in(), circle_out(), circle_recv(), classify_index_clause_usage(), close_pl(), close_ps(), compileTheLexeme(), compileTheSubstitute(), CompleteCachedPlan(), complex_add(), complex_in(), complex_out(), complex_recv(), compute_array_stats(), compute_index_stats(), compute_minimal_stats(), compute_range_stats(), compute_scalar_stats(), compute_tsvector_stats(), ComputeIndexAttrs(), concat_text(), connect_pg_server(), convert_prep_stmt_params(), convert_string_datum(), convert_tuples_by_name(), convert_tuples_by_position(), copy_file(), copy_heap_data(), copy_ltree(), copy_plpgsql_datum(), copy_relation_data(), CopyCachedPlan(), CopyErrorData(), CopyFrom(), CopyIndexTuple(), CopyOverrideSearchPath(), copyParamList(), copytext(), CopyTo(), CopyTriggerDesc(), copyTSLexeme(), copytup_index(), CopyVar(), copyVar(), count_agg_clauses_walker(), count_usable_fds(), cr_circle(), create_mergejoin_plan(), create_tablespace_directories(), create_unique_plan(), CreateConstraintEntry(), CreateCopyDestReceiver(), CreateQueryDesc(), CreateTemplateTupleDesc(), CreateTrigger(), CreateTupleDesc(), CreateTupleDescCopyConstr(), CreateUtilityQueryDesc(), cstring_to_text_with_len(), current_database(), current_schemas(), currtid_byrelname(), currtid_byreloid(), datetime_to_char_body(), datumCopy(), dblink_get_pkey(), debackslash(), decodePageSplitRecord(), DecodeTextArrayToCString(), deconstruct_array(), defGetString(), DefineAggregate(), DefineIndex(), DefineRelation(), deserialize_deflist(), destroy_tablespace_directories(), do_analyze_rel(), do_compile(), do_pg_stop_backup(), do_to_timestamp(), doPickSplit(), dotrim(), downcase_convert(), downcase_truncate_identifier(), DropRelFileNodesAllBuffers(), dsynonym_init(), dxsyn_lexize(), entry_dealloc(), enum_range_internal(), EnumValuesCreate(), euc_tw_to_big5(), EvaluateParams(), examine_attribute(), examine_parameter_list(), exec_assign_value(), exec_bind_message(), exec_eval_using_params(), exec_move_row(), exec_stmt_return_next(), ExecBuildProjectionInfo(), ExecEvalArray(), ExecEvalFieldStore(), ExecEvalRow(), ExecEvalWholeRowFast(), ExecEvalWholeRowSlow(), ExecHashJoinGetSavedTuple(), ExecHashTableCreate(), ExecIndexBuildScanKeys(), ExecInitAgg(), ExecInitExpr(), ExecInitJunkFilter(), ExecInitSubPlan(), ExecInitValuesScan(), ExecMakeTableFunctionResult(), ExecOpenIndices(), ExecRelCheck(), execTuplesHashPrepare(), execTuplesMatchPrepare(), ExecuteTruncate(), expand_dynamic_library_name(), extract_autovac_opts(), extract_grouping_cols(), extract_grouping_ops(), extract_mb_char(), fallbackSplit(), fetch_finfo_record(), file_acquire_sample_rows(), fileBeginForeignScan(), fileGetForeignRelSize(), filter_list_to_array(), find_in_dynamic_libpath(), find_inheritance_children(), find_window_functions(), findeq(), float4_to_char(), Float4GetDatum(), float4out(), float8_to_char(), Float8GetDatum(), float8out(), format_operator_internal(), format_procedure_internal(), formTextDatum(), fsm_extend(), FuncnameGetCandidates(), funny_dup17(), g_cube_decompress(), g_cube_picksplit(), g_int_compress(), g_int_decompress(), g_int_picksplit(), g_intbig_compress(), g_intbig_picksplit(), g_intbig_union(), gbt_bit_xfrm(), gbt_cash_union(), gbt_date_union(), gbt_float4_union(), gbt_float8_union(), gbt_inet_compress(), gbt_inet_union(), gbt_int2_union(), gbt_int4_union(), gbt_int8_union(), gbt_intv_compress(), gbt_intv_decompress(), gbt_intv_union(), gbt_macad_union(), gbt_num_bin_union(), gbt_num_compress(), gbt_num_picksplit(), gbt_oid_union(), gbt_time_union(), gbt_timetz_compress(), gbt_ts_union(), gbt_tstz_compress(), gbt_var_compress(), gbt_var_decompress(), gbt_var_key_copy(), gbt_var_node_truncate(), gbt_var_picksplit(), generate_append_tlist(), generate_normalized_query(), generate_series_step_int4(), generate_series_step_int8(), generate_series_timestamp(), generate_series_timestamptz(), generate_subscripts(), generate_trgm(), generate_wildcard_trgm(), generateHeadline(), genericPickSplit(), geo_distance(), get_attribute_options(), get_attstatsslot(), get_available_versions_for_extension(), get_column_info_for_window(), get_crosstab_tuplestore(), get_database_list(), get_docrep(), get_ext_ver_info(), get_extension_aux_control_filename(), get_extension_control_directory(), get_extension_control_filename(), get_extension_script_directory(), get_extension_script_filename(), get_func_arg_info(), get_func_input_arg_names(), get_func_signature(), get_op_btree_interpretation(), get_path_all(), get_pkey_attnames(), get_raw_page_internal(), get_relation_info(), get_rels_with_domain(), get_str_from_var(), get_str_from_var_sci(), get_tables_to_cluster(), get_text_array_contents(), get_tsearch_config_filename(), get_val(), get_worker(), GetBulkInsertState(), getColorInfo(), GetCurrentVirtualXIDs(), GetDatabasePath(), GetFdwRoutineForRelation(), GetForeignDataWrapper(), GetForeignServer(), GetForeignTable(), GetLockStatusData(), GetMultiXactIdMembers(), GetPredicateLockStatusData(), GetPreparedTransactionList(), GetRunningTransactionLocks(), gettoken_tsvector(), getTokenTypes(), GetUserMapping(), GetVirtualXIDsDelayingChkpt(), ghstore_compress(), ghstore_picksplit(), ghstore_union(), gimme_tree(), gin_bool_consistent(), gin_extract_hstore(), gin_extract_hstore_query(), gin_extract_query_trgm(), gin_extract_tsquery(), gin_extract_tsvector(), gin_extract_value_trgm(), ginAllocEntryAccumulator(), ginbeginscan(), ginbuild(), ginExtractEntries(), ginFillScanEntry(), ginFillScanKey(), ginFindLeafPage(), ginFindParents(), GinFormInteriorTuple(), ginHeapTupleFastCollect(), ginHeapTupleFastInsert(), ginInsertBAEntry(), ginint4_queryextract(), ginNewScanKey(), ginPrepareFindLeafPage(), ginRedoVacuumPage(), ginVacuumPostingList(), gist_box_picksplit(), gist_box_union(), gist_circle_compress(), gist_point_compress(), gist_poly_compress(), gistbeginscan(), gistbufferinginserttuples(), gistbuild(), gistbulkdelete(), gistextractpage(), gistfillitupvec(), gistfixsplit(), gistGetItupFromPage(), gistInitBuildBuffers(), gistMakeUnionItVec(), gistplacetopage(), gistRelocateBuildBuffersOnSplit(), gistScanPage(), GISTSearchTreeItemAllocator(), gistSplit(), gistSplitByKey(), gistSplitHalf(), gistunionsubkeyvec(), gistXLogSplit(), gistXLogUpdate(), gseg_picksplit(), gtrgm_compress(), gtrgm_consistent(), gtrgm_decompress(), gtrgm_picksplit(), gtrgm_union(), gtsquery_compress(), gtsquery_picksplit(), gtsvector_compress(), gtsvector_decompress(), gtsvector_picksplit(), gtsvector_union(), gtsvectorout(), GUCArrayAdd(), hash_object_field_end(), hashbeginscan(), hashbuild(), heap_beginscan_internal(), heap_copy_minimal_tuple(), heap_copytuple(), heap_copytuple_with_tuple(), heap_deformtuple(), heap_formtuple(), heap_modify_tuple(), heap_modifytuple(), heap_multi_insert(), heap_page_items(), heap_tuple_from_minimal_tuple(), heap_tuple_untoast_attr(), heap_tuple_untoast_attr_slice(), hladdword(), hstore_akeys(), hstore_avals(), hstore_concat(), hstore_delete(), hstore_delete_array(), hstore_delete_hstore(), hstore_from_array(), hstore_from_arrays(), hstore_from_record(), hstore_out(), hstore_populate_record(), hstore_recv(), hstore_slice_to_array(), hstore_slice_to_hstore(), hstore_to_array_internal(), hstore_to_json(), hstore_to_json_loose(), hstoreArrayToPairs(), hstorePairs(), ImportSnapshot(), index_register(), inet_set_masklen(), inet_to_cidr(), infix(), init_execution_state(), init_tour(), init_tsvector_parser(), InitCatCache(), InitDeadLockChecking(), initGISTstate(), initKeyArray(), InitPlan(), initStringInfo(), inner_subltree(), int2out(), int2vectorout(), int44in(), int44out(), int4_to_char(), int4out(), Int64GetDatum(), int8_to_char(), int_to_roman(), interval_div(), interval_in(), interval_justify_days(), interval_justify_hours(), interval_justify_interval(), interval_mi(), interval_mul(), interval_pl(), interval_recv(), interval_scale(), interval_trunc(), interval_um(), intervaltypmodout(), iso_to_koi8r(), iso_to_win1251(), iso_to_win866(), json_object_keys(), json_populate_record(), json_recv(), koi8r_to_iso(), koi8r_to_win1251(), koi8r_to_win866(), latin2_to_win1250(), lazy_space_alloc(), lca(), lca_inner(), leftmostvalue_interval(), leftmostvalue_timetz(), levenshtein_internal(), lex_accept(), LexizeAddLemm(), libpqrcv_readtimelinehistoryfile(), like_fixed_prefix(), limit_printout_length(), line_construct_pm(), line_construct_pp(), line_in(), list_copy(), list_copy_tail(), load_categories_hash(), load_enum_cache_data(), load_libraries(), load_relcache_init_file(), load_tzoffsets(), log_incomplete_deletion(), log_incomplete_split(), logfile_getname(), LogicalTapeSetCreate(), LogicalTapeWrite(), loread(), lowerstr_with_len(), lpad(), lquery_out(), lseg_center(), lseg_construct(), lseg_in(), lseg_recv(), ltree2text(), ltree_compress(), ltree_concat(), ltree_decompress(), ltree_in(), ltree_out(), ltree_picksplit(), ltree_union(), ltsRecordBlockNum(), ltxtq_out(), macaddr_and(), macaddr_in(), macaddr_not(), macaddr_or(), macaddr_out(), macaddr_recv(), macaddr_trunc(), make_colname_unique(), make_greater_string(), make_hba_token(), make_recursive_union(), make_result(), make_row_comparison_op(), make_setop(), make_sort_from_groupcols(), make_sort_from_sortclauses(), make_tuple_from_result_row(), make_tuple_from_row(), make_unique(), makeaclitem(), makeArrayTypeName(), makeBufFile(), MakeConfigurationMapping(), makeitem(), makeNamespaceItem(), makeObjectName(), makepoint(), MakeSharedInvalidMessagesArray(), makeStringInfo(), maketree(), map_variable_attnos_mutator(), mark_hl_fragments(), MatchNamedCall(), materializeResult(), mcelem_array_contained_selec(), mcelem_tsquery_selec(), md5_crypt_verify(), mdunlinkfork(), MergeAttributes(), minimal_tuple_from_heap_tuple(), mktinterval(), moveLeafs(), MultiXactIdExpand(), mXactCacheGetById(), new_head_cell(), new_list(), new_object_addresses(), new_tail_cell(), newLexeme(), newTParserPosition(), NIAddAffix(), NISortAffixes(), nodeRead(), normal_rand(), NormalizeSubWord(), NUM_cache(), numeric(), numeric_abs(), numeric_to_char(), numeric_to_number(), numeric_uminus(), numeric_uplus(), numerictypmodout(), oidout(), oidvectorout(), oidvectortypes(), OpernameGetCandidates(), optionListToArray(), order_qual_clauses(), packGraph(), PageGetTempPage(), PageGetTempPageCopy(), PageGetTempPageCopySpecial(), PageIndexMultiDelete(), PageRepairFragmentation(), parse_fcall_arguments(), parse_fixed_parameters(), parse_hstore(), parse_ident_line(), parse_one_reloption(), parse_tsquery(), parse_variable_parameters(), parseRelOptions(), path_add(), path_encode(), path_in(), path_poly(), path_recv(), perform_base_backup(), perform_default_encoding_conversion(), pg_armor(), pg_buffercache_pages(), pg_convert(), pg_dearmor(), pg_decrypt(), pg_decrypt_iv(), pg_detoast_datum_copy(), pg_digest(), pg_do_encoding_conversion(), pg_encrypt(), pg_encrypt_iv(), pg_get_constraintdef_worker(), pg_get_multixact_members(), pg_get_userbyid(), pg_hmac(), pg_listening_channels(), pg_lock_status(), pg_logdir_ls(), pg_ls_dir(), pg_prepared_xact(), pg_random_bytes(), pg_size_pretty_numeric(), pg_stat_get_wal_senders(), pg_tablespace_databases(), pg_timezone_abbrevs(), pg_timezone_names(), pgfnames(), pgp_key_id_w(), pgrowlocks(), pgss_post_parse_analyze(), pgss_shmem_startup(), pgstat_recv_inquiry(), pgstatindex(), placeChar(), plaintree(), plperl_build_tuple_result(), plperl_modify_tuple(), plperl_ref_from_pg_array(), plperl_spi_exec_prepared(), plperl_spi_prepare(), plperl_spi_query_prepared(), plpgsql_add_initdatums(), plpgsql_compile_inline(), plpgsql_estate_setup(), plpgsql_exec_trigger(), plpgsql_ns_additem(), plpgsql_parse_dblword(), plpgsql_parse_err_condition(), plpgsql_parse_tripword(), pltcl_init_load_unknown(), pltcl_quote(), pltcl_SPI_execute_plan(), pltcl_trigger_handler(), PLy_cursor_plan(), PLy_modify_tuple(), PLy_procedure_munge_source(), PLy_spi_execute_plan(), PLyGenericObject_ToComposite(), PLyMapping_ToComposite(), PLyObject_ToBytea(), PLySequence_ToArray(), PLySequence_ToComposite(), pmx(), pnstrdup(), point_add(), point_construct(), point_copy(), point_div(), point_in(), point_mul(), point_recv(), point_sub(), poly2path(), poly_circle(), poly_path(), populate_recordset_object_end(), populate_recordset_object_field_end(), PostgresMain(), postquel_sub_params(), pq_getmsgtext(), prepare_sort_from_pathkeys(), prepare_sql_fn_parse_info(), PrepareQuery(), PrescanPreparedTransactions(), ProcArrayApplyRecoveryInfo(), process_pipe_input(), process_startup_options(), ProcessStartupPacket(), prs_setup_firstcall(), prsd_lextype(), psnprintf(), pull_up_sublinks_jointree_recurse(), pushIncompleteSplit(), PushOverrideSearchPath(), pushquery(), pushStackIfSplited(), pushval_morph(), QTNCopy(), queryin(), queue_listen(), quote_identifier(), quote_literal(), quote_literal_cstr(), range_gist_double_sorting_split(), range_gist_picksplit(), range_gist_single_sorting_split(), rb_create(), RE_compile(), RE_compile_and_cache(), RE_execute(), read_binary_file(), read_dictionary(), read_extension_aux_control_file(), read_extension_script_file(), readDatum(), readstoplist(), readTimeLineHistory(), readtup_cluster(), readtup_datum(), readtup_heap(), readtup_index(), ReadTwoPhaseFile(), rebuild_database_list(), record_cmp(), record_eq(), record_in(), record_out(), record_recv(), record_send(), reduce_outer_joins_pass1(), regclassout(), regconfigout(), regdictionaryout(), regexp_fixed_prefix(), regexp_matches(), register_label_provider(), register_on_commit_action(), regoperout(), regprocout(), regtypeout(), RelationBuildTriggers(), RelationGetExclusionInfo(), RelationGetIndexScan(), relpathbackend(), reltime_interval(), RememberFsyncRequest(), repeat(), replace_text_regexp(), report_invalid_token(), report_json_context(), report_parse_error(), ResolveRecoveryConflictWithVirtualXIDs(), RewriteQuery(), rpad(), save_state_data(), scanPendingInsert(), scanstr(), SearchCatCacheList(), seg_in(), seg_inter(), seg_out(), seg_union(), select_outer_pathkeys_for_merge(), selectColorTrigrams(), sepgsql_fmgr_hook(), seq_redo(), set_plan_references(), set_relation_column_names(), set_rtable_names(), set_var_from_str(), SetMatViewToPopulated(), setup_firstcall(), setup_regexp_matches(), show_trgm(), SignalBackends(), similar_escape(), smgrDoPendingDeletes(), smgrdounlinkall(), smgrGetPendingDeletes(), SortAndUniqItems(), spg_kd_inner_consistent(), spg_kd_picksplit(), spg_quad_inner_consistent(), spg_quad_picksplit(), spg_range_quad_inner_consistent(), spg_range_quad_picksplit(), spg_text_inner_consistent(), spg_text_leaf_consistent(), spg_text_picksplit(), spgAddPendingTID(), spgbeginscan(), spgbuildempty(), spgExtractNodeLabels(), spgPageIndexMultiDelete(), spgRedoVacuumRedirect(), spgSplitNodeAction(), spgWalk(), spi_dest_startup(), SPI_modifytuple(), SPI_palloc(), SPI_returntuple(), SplitToVariants(), SS_make_initplan_from_plan(), SS_process_ctes(), StandbyAcquireAccessExclusiveLock(), StartPrepare(), startScanEntry(), std_typanalyze(), StoreRelCheck(), storeRow(), str_initcap(), str_tolower(), str_toupper(), string_to_bytea_const(), substitute_libpath_macro(), SyncRepWaitForLSN(), systable_beginscan(), systable_beginscan_ordered(), table_recheck_autovac(), tbm_begin_iterate(), testprs_lextype(), text_catenate(), text_position_setup(), text_reverse(), text_substring(), text_to_cstring(), thesaurus_lexize(), tidin(), TidListCreate(), tidrecv(), time_interval(), time_mi_time(), time_timetz(), timestamp_age(), timestamp_mi(), timestamptz_age(), timestamptz_timetz(), timetravel(), timetz_in(), timetz_izone(), timetz_mi_interval(), timetz_pl_interval(), timetz_recv(), timetz_scale(), timetz_zone(), tintervalin(), tintervalout(), tintervalrecv(), to_tsvector_byid(), toast_compress_datum(), toast_fetch_datum(), toast_fetch_datum_slice(), toast_save_datum(), tokenize_inc_file(), TParserInit(), transformRelOptions(), translate(), ts_dist(), ts_headline_byid_opt(), ts_lexize(), ts_process_call(), tsa_rewrite_finish(), tsa_tsearch2(), tsqueryout(), tsqueryrecv(), tsquerytree(), tstz_dist(), tsvector_setweight(), tsvector_update_trigger(), tsvectorin(), tsvectorout(), tt_setup_firstcall(), ttdummy(), TupleDescGetAttInMetadata(), tuplesort_begin_common(), tuplestore_begin_common(), txid_current_snapshot(), txid_snapshot_recv(), typenameTypeMod(), unaccent_lexize(), uniqueWORD(), update_attstats(), uuid_in(), uuid_recv(), uuid_to_string(), vac_open_indexes(), validate_pkattnums(), varbit(), varbit_out(), varbit_recv(), variable_paramref_hook(), varstr_cmp(), vm_extend(), WaitOnLock(), widget_in(), widget_out(), win1250_to_latin2(), win1251_to_iso(), win1251_to_koi8r(), win1251_to_win866(), win866_to_iso(), win866_to_koi8r(), win866_to_win1251(), writeListPage(), xidout(), XLogFileNameP(), xml_recv(), xpath_string(), xpath_table(), and xslt_process().

{
    /* duplicates MemoryContextAlloc to avoid increased overhead */
    AssertArg(MemoryContextIsValid(CurrentMemoryContext));

    if (!AllocSizeIsValid(size))
        elog(ERROR, "invalid memory alloc request size %lu",
             (unsigned long) size);

    CurrentMemoryContext->isReset = false;

    return (*CurrentMemoryContext->methods->alloc) (CurrentMemoryContext, size);
}

void* palloc0 ( Size  size  ) 

Definition at line 653 of file mcxt.c.

Referenced by _bt_blwritepage(), _bt_pagestate(), _bt_preprocess_array_keys(), _bt_spoolinit(), _h_spoolinit(), _mdfd_getseg(), add_dummy_return(), allocacl(), AllocateRelationDesc(), allocateReloptStruct(), AlterObjectNamespace_internal(), AlterObjectOwner_internal(), AlterObjectRename_internal(), AlterOpFamilyAdd(), AlterOpFamilyDrop(), array_cat(), array_create_iterator(), array_get_slice(), array_in(), array_map(), array_recv(), array_replace_internal(), array_set(), array_set_slice(), ATAddCheckConstraint(), ATAddForeignKeyConstraint(), ATExecAddColumn(), ATGetQueueEntry(), ATPrepAlterColumnType(), begin_heap_rewrite(), BeginCopy(), bit(), bit_in(), bms_make_singleton(), bpchar_name(), bt_page_items(), btbulkdelete(), btvacuumcleanup(), build_row_from_class(), build_row_from_vars(), build_simple_rel(), BuildDescForRelation(), BuildEventTriggerCache(), buildint2vector(), buildoidvector(), calc_rank_and(), calc_rank_cd(), check_hba(), check_ident_usermap(), circle_poly(), compact_palloc0(), CompactCheckpointerRequestQueue(), construct_empty_array(), construct_md_array(), convert_tuples_by_name(), convert_tuples_by_position(), ConvertTriggerToFK(), CopyCachedPlan(), create_array_envelope(), CreateCachedPlan(), CreateFakeRelcacheEntry(), CreateIntoRelDestReceiver(), CreateOneShotCachedPlan(), CreateSQLFunctionDestReceiver(), CreateTransientRelDestReceiver(), CreateTupleDescCopyConstr(), CreateTuplestoreDestReceiver(), crosstab(), cube_a_f8(), cube_a_f8_f8(), cube_c_f8(), cube_c_f8_f8(), cube_enlarge(), cube_f8(), cube_f8_f8(), cube_inter(), cube_subset(), cube_union_v0(), deconstruct_array(), DefineOpClass(), deparse_context_for(), deparse_context_for_planstate(), dintdict_init(), dintdict_lexize(), dispell_init(), div_var(), div_var_fast(), do_analyze_rel(), doPickSplit(), dsimple_init(), dsimple_lexize(), dsnowball_init(), dsnowball_lexize(), dsynonym_init(), dsynonym_lexize(), dxsyn_init(), each_worker(), eqjoinsel_inner(), eqjoinsel_semi(), EvalPlanQualStart(), EventTriggerSQLDropAddObject(), examine_attribute(), examine_parameter_list(), exec_stmt_return_next(), ExecBuildAuxRowMark(), ExecEvalRow(), ExecGrant_Relation(), ExecHashIncreaseNumBatches(), ExecHashTableCreate(), ExecHashTableReset(), ExecIndexBuildScanKeys(), ExecInitAgg(), ExecInitAppend(), ExecInitBitmapAnd(), ExecInitBitmapOr(), ExecInitExpr(), ExecInitJunkFilterConversion(), ExecInitMergeAppend(), ExecInitModifyTable(), ExecInitSetOp(), ExecInitWindowAgg(), ExecMakeTableFunctionResult(), expand_colnames_array_to(), fetch_more_data(), fillFakeState(), find_language_template(), find_window_functions(), formrdesc(), g_intbig_compress(), gbt_num_compress(), generate_base_implied_equalities_no_const(), get_json_object_as_hash(), get_relation_info(), get_worker(), GetAccessStrategy(), getColorInfo(), GetLockConflicts(), GetOverrideSearchPath(), ghstore_compress(), gin_extract_tsquery(), ginbulkdelete(), ginExtractEntries(), ginFillScanKey(), ginNewScanKey(), ginPrepareScanPostingTree(), ginScanToDelete(), ginvacuumcleanup(), gist_box_picksplit(), gistbeginscan(), gistbulkdelete(), gistdoinsert(), gistFindPath(), gistUserPicksplit(), gistvacuumcleanup(), hashbulkdelete(), heap_form_minimal_tuple(), heap_form_tuple(), identify_join_columns(), index_form_tuple(), inetand(), inetnot(), inetor(), init_sql_fcache(), InitCatCache(), InitResultRelInfo(), initSpGistState(), inittapes(), inline_function(), InstrAlloc(), int2vectorin(), internal_inetpl(), join_tsqueries(), json_array_elements(), json_array_length(), json_object_keys(), json_populate_recordset(), lazy_scan_heap(), lazy_vacuum_rel(), leftmostvalue_macaddr(), load_relcache_init_file(), lquery_in(), ltree_in(), make_parsestate(), make_subplanTargetList(), make_tsvector(), make_tuple_from_result_row(), make_tuple_from_row(), makeJsonLexContext(), MergeAttributes(), MJExamineQuals(), mkVoidAffix(), mul_var(), namein(), namerecv(), network_broadcast(), network_hostmask(), network_in(), network_netmask(), network_network(), network_recv(), new_intArrayType(), newRegisNode(), NISortDictionary(), oidvectorin(), parse_hba_line(), parse_ident_line(), parse_tsquery(), perform_base_backup(), pg_crypt(), pg_stat_get_activity(), pg_tzenumerate_start(), plperl_build_tuple_result(), plperl_spi_prepare(), plpgsql_build_record(), plpgsql_build_variable(), plpgsql_compile_inline(), poly_in(), poly_recv(), postgresBeginForeignModify(), postgresBeginForeignScan(), postgresGetForeignRelSize(), prepare_sql_fn_parse_info(), printtup_create_DR(), printtup_prepare_info(), ProcessCopyOptions(), ProcessStartupPacket(), pull_up_simple_subquery(), pushOperator(), pushStop(), pushValue_internal(), QT2QTN(), QTN2QT(), QTNBinary(), range_serialize(), read_extension_control_file(), RelationBuildLocalRelation(), RelationBuildTriggers(), resetSpGistScanOpaque(), reverse_name(), rewriteTargetListIU(), save_state_data(), sepgsql_avc_compute(), sepgsql_set_client_label(), set_append_rel_size(), set_deparse_for_query(), set_join_column_names(), set_simple_column_names(), set_subquery_pathlist(), setup_param_list(), setup_regexp_matches(), setup_simple_rel_arrays(), spg_quad_picksplit(), spgbeginscan(), spgbuild(), spgbulkdelete(), spgFormInnerTuple(), spgFormLeafTuple(), spgFormNodeTuple(), spgvacuumcleanup(), standard_ExecutorStart(), standard_join_search(), StartPrepare(), testprs_start(), text_name(), thesaurus_init(), toast_flatten_tuple_attribute(), toast_insert_or_update(), TParserCopyInit(), TParserInit(), transformTableLikeClause(), transformValuesClause(), transformWithClause(), trgm_presence_map(), ts_setup_firstcall(), tsquery_not(), tsqueryrecv(), tsvector_concat(), tsvector_strip(), tsvectorin(), tsvectorrecv(), TupleDescGetAttInMetadata(), tuplesort_begin_common(), tuplesort_begin_datum(), tuplesort_begin_heap(), tuplestore_begin_common(), unaccent_lexize(), varbit_in(), and XLogFileInit().

{
    /* duplicates MemoryContextAllocZero to avoid increased overhead */
    void       *ret;

    AssertArg(MemoryContextIsValid(CurrentMemoryContext));

    if (!AllocSizeIsValid(size))
        elog(ERROR, "invalid memory alloc request size %lu",
             (unsigned long) size);

    CurrentMemoryContext->isReset = false;

    ret = (*CurrentMemoryContext->methods->alloc) (CurrentMemoryContext, size);

    MemSetAligned(ret, 0, size);

    return ret;
}

void pfree ( void *  pointer  ) 

Definition at line 678 of file mcxt.c.

Referenced by _bt_blwritepage(), _bt_buildadd(), _bt_freeskey(), _bt_freestack(), _bt_getroot(), _bt_gettrueroot(), _bt_insert_parent(), _bt_load(), _bt_newroot(), _bt_spooldestroy(), _bt_uppershutdown(), _h_indexbuild(), _h_spooldestroy(), _hash_dropscan(), _int_contains(), _int_inter(), _int_overlap(), _int_same(), _int_union(), _lca(), _mdfd_getseg(), _mdfd_openseg(), _mdfd_segpath(), AbortBufferIO(), AbsorbFsyncRequests(), aclmerge(), add_path(), addArcs(), AddEnumLabel(), addHLParsedLex(), addItemPointersToLeafTuple(), addKey(), advance_transition_function(), advance_windowaggregate(), AfterTriggerEndSubXact(), afterTriggerFreeEventList(), afterTriggerRestoreEventList(), AlterObjectNamespace_internal(), AlterObjectOwner_internal(), AlterObjectRename_internal(), array_contain_compare(), array_free_iterator(), array_in(), array_map(), array_out(), array_recv(), array_replace_internal(), array_send(), array_to_json_internal(), array_to_text_internal(), arrayconst_cleanup_fn(), arrayexpr_cleanup_fn(), ArrayGetIntegerTypmods(), ASN1_STRING_to_text(), AssignTransactionId(), AtEOSubXact_Inval(), AtEOSubXact_Namespace(), AtEOSubXact_on_commit_actions(), AtEOSubXact_PgStat(), AtEOXact_GUC(), AtEOXact_Namespace(), AtEOXact_on_commit_actions(), AtSubAbort_childXids(), AtSubAbort_Snapshot(), AtSubCommit_childXids(), attribute_reloptions(), autoinc(), AuxiliaryProcessMain(), backend_read_statsfile(), big5_to_euc_tw(), binaryheap_free(), bms_add_member(), bms_add_members(), bms_free(), bms_int_members(), bms_join(), boolop(), BootStrapXLOG(), bpcharrecv(), bqarr_in(), bt_page_items(), btbuildCallback(), btendscan(), btinsert(), buf_finalize(), BufFileClose(), build_dummy_tuple(), buildFreshLeafTuple(), BuildTupleFromCStrings(), cache_locale_time(), calc_arraycontsel(), calc_distr(), calc_rank_and(), calc_rank_cd(), calc_rank_or(), CatalogCloseIndexes(), CatCacheRemoveCList(), CatCacheRemoveCTup(), check_circularity(), check_datestyle(), check_db_file_conflict(), check_ident_usermap(), check_locale(), check_log_destination(), check_relation_privileges(), check_schema_perms(), check_search_path(), check_synchronous_standby_names(), check_temp_tablespaces(), check_timezone(), check_TSCurrentConfig(), CheckAffix(), CheckPointTwoPhase(), CheckRADIUSAuth(), checkSharedDependencies(), ChooseConstraintName(), ChooseRelationName(), citext_eq(), citext_hash(), citext_ne(), citextcmp(), clauselist_selectivity(), clean_fakeval_intree(), clean_NOT_intree(), cleanup_regexp_matches(), clear_and_pfree(), close_tsvector_parser(), collectMatchBitmap(), CompactCheckpointerRequestQueue(), compile_plperl_function(), compile_pltcl_function(), compileTheLexeme(), compileTheSubstitute(), composite_to_json(), compute_array_stats(), concat_internal(), connect_pg_server(), convert_any_priv_string(), convert_charset(), convert_column_name(), convert_string_datum(), convert_to_scalar(), convert_tuples_by_name(), convert_tuples_by_position(), convertPgWchar(), ConvertTriggerToFK(), copy_dest_destroy(), copy_file(), copy_heap_data(), copy_relation_data(), CopyArrayEls(), CopyFrom(), CopyFromErrorCallback(), CopyReadLine(), CopyTo(), count_agg_clauses_walker(), count_usable_fds(), create_cursor(), create_tablespace_directories(), CreateCheckPoint(), createdb(), createNewConnection(), CreateTableSpace(), CreateTrigger(), crosstab(), cstr2sv(), cube_subset(), datetime_to_char_body(), datum_to_json(), db_encoding_strdup(), dblink_connect(), dblink_disconnect(), dblink_security_check(), DCH_to_char(), debugtup(), DecodeTextArrayToCString(), default_reloptions(), DefineEnum(), DefineIndex(), DefineRange(), DefineType(), deserialize_deflist(), destroy_tablespace_directories(), dintdict_lexize(), dir_realloc(), dispell_lexize(), div_var(), div_var_fast(), do_analyze_rel(), do_autovacuum(), do_compile(), Do_MultiXactIdWait(), do_pg_start_backup(), do_text_output_multiline(), do_to_timestamp(), dotrim(), DropRelFileNodesAllBuffers(), dropvoidsubtree(), dsimple_lexize(), dsnowball_lexize(), dsynonym_init(), dsynonym_lexize(), dxsyn_lexize(), elog_node_display(), end_tup_output(), EndCopy(), entry_dealloc(), enum_range_internal(), enum_recv(), EnumValuesCreate(), eqjoinsel_inner(), eqjoinsel_semi(), errdetail_params(), errfinish(), euc_tw_to_big5(), eval_windowaggregates(), EventTriggerSQLDropAddObject(), examine_attribute(), exec_assign_c_string(), exec_assign_value(), exec_bind_message(), exec_dynquery_with_params(), exec_move_row(), exec_object_restorecon(), exec_run_select(), exec_stmt_close(), exec_stmt_dynexecute(), exec_stmt_execsql(), exec_stmt_fetch(), exec_stmt_forc(), exec_stmt_foreach_a(), exec_stmt_open(), exec_stmt_raise(), exec_stmt_return_next(), Exec_UnlistenCommit(), ExecDropSingleTupleTableSlot(), ExecEndWindowAgg(), ExecEvalFieldStore(), ExecEvalRow(), ExecEvalXml(), ExecGrant_Attribute(), ExecGrant_Database(), ExecGrant_Fdw(), ExecGrant_ForeignServer(), ExecGrant_Function(), ExecGrant_Language(), ExecGrant_Largeobject(), ExecGrant_Namespace(), ExecGrant_Relation(), ExecGrant_Tablespace(), ExecGrant_Type(), ExecHashIncreaseNumBatches(), ExecHashRemoveNextSkewBucket(), ExecHashTableDestroy(), ExecIndexBuildScanKeys(), ExecInitAgg(), ExecReScanTidScan(), ExecResetTupleTable(), ExecSetParamPlan(), ExecSetSlotDescriptor(), expand_dynamic_library_name(), explain_ExecutorEnd(), ExplainProperty(), ExplainPropertyList(), ExplainQuery(), extract_autovac_opts(), fetch_finfo_record(), fetch_function_defaults(), file_acquire_sample_rows(), filter_list_to_array(), find_in_dynamic_libpath(), find_inheritance_children(), find_provider(), findeq(), FinishPreparedTransaction(), fixup_inherited_columns(), flush_pipe_input(), fmgr_info_C_lang(), fmgr_info_cxt_security(), forget_invalid_pages(), forget_invalid_pages_db(), forget_matching_deletion(), forget_matching_split(), forgetIncompleteSplit(), free_attstatsslot(), free_chromo(), free_city_table(), free_conversion_map(), free_edge_table(), free_object_addresses(), free_params_data(), free_parsestate(), free_pool(), free_sort_tuple(), free_var(), FreeAccessStrategy(), FreeBulkInsertState(), FreeErrorData(), FreeExprContext(), FreeFakeRelcacheEntry(), freeGinBtreeStack(), FreeQueryDesc(), freeScanKeys(), freeScanStackEntry(), FreeSnapshot(), freetree(), FreeTriggerDesc(), FreeTupleDesc(), fsm_extend(), func_get_detail(), FuncnameGetCandidates(), g_int_compress(), g_int_consistent(), g_int_decompress(), g_int_penalty(), g_int_picksplit(), g_intbig_compress(), g_intbig_picksplit(), gbt_bit_l2n(), generate_append_tlist(), generate_base_implied_equalities_no_const(), generate_trgm(), generate_wildcard_trgm(), generateHeadline(), get_attstatsslot(), get_const_expr(), get_docrep(), get_extension_aux_control_filename(), get_extension_script_filename(), get_from_clause(), get_sql_insert(), get_sql_update(), get_str_from_var_sci(), get_target_list(), get_tuple_of_interest(), get_typdefault(), GetAggInitVal(), getColorInfo(), GetMultiXactIdHintBits(), GetNewRelFileNode(), getNextNearest(), getObjectDescription(), getObjectIdentity(), GetTempNamespaceBackendId(), ginendscan(), ginEntryFillRoot(), ginEntryInsert(), ginExtractEntries(), GinFormTuple(), ginInsertValue(), ginoptions(), ginVacuumEntryPage(), ginVacuumPostingTree(), ginVacuumPostingTreeLeaves(), gist_ischild(), gistbulkdelete(), gistgetbitmap(), gistgettuple(), gistoptions(), gistPopItupFromNodeBuffer(), gistRelocateBuildBuffersOnSplit(), GISTSearchTreeItemDeleter(), gistunionsubkeyvec(), gistUnloadNodeBuffer(), gistXLogSplit(), gistXLogUpdate(), gtrgm_consistent(), gtrgm_distance(), gtrgm_penalty(), GUCArrayReset(), hashbuildCallback(), hashendscan(), hashinsert(), heap_create_with_catalog(), heap_deformtuple(), heap_endscan(), heap_formtuple(), heap_free_minimal_tuple(), heap_freetuple(), heap_lock_tuple(), heap_modify_tuple(), heap_modifytuple(), heap_tuple_untoast_attr(), heap_tuple_untoast_attr_slice(), hstoreUniquePairs(), hv_fetch_string(), hv_store_string(), index_form_tuple(), index_getbitmap(), IndexScanEnd(), infix(), init_tour(), initcap(), initialize_peragg(), initialize_reloptions(), initSuffixTree(), inner_int_inter(), insert_username(), InsertOneTuple(), InsertOneValue(), internalerrquery(), intorel_destroy(), intset_subtract(), inv_close(), inv_getsize(), inv_read(), inv_truncate(), inv_write(), InvalidateAttoptCacheCallback(), InvalidateTableSpaceCacheCallback(), isAnyTempNamespace(), iso_to_koi8r(), iso_to_win1251(), iso_to_win866(), json_agg_transfn(), json_lex_string(), json_object_keys(), KnownAssignedXidsDisplay(), koi8r_to_iso(), koi8r_to_win1251(), koi8r_to_win866(), latin2_to_win1250(), lazy_cleanup_index(), lca(), like_fixed_prefix(), list_delete_cell(), list_free_private(), lo_manage(), load_enum_cache_data(), load_external_function(), load_file(), load_libraries(), load_relcache_init_file(), local_buffer_write_error_callback(), logfile_rotate(), LogicalTapeRewind(), LogicalTapeSetClose(), lookup_ts_config_cache(), lower(), lowerstr_with_len(), lquery_in(), lseg_inside_poly(), lseg_interpt_internal(), ltree_addtext(), ltree_in(), ltree_strncasecmp(), ltree_textadd(), make_greater_string(), make_tsvector(), make_tuple_from_row(), map_sql_value_to_xml_value(), mark_hl_fragments(), match_special_index_operator(), mcelem_array_contained_selec(), mcelem_array_selec(), mcelem_tsquery_selec(), md5_crypt_verify(), mdclose(), mdcreate(), mdopen(), mdpostckpt(), mdsync(), mdtruncate(), mdunlinkfork(), MemoryContextDelete(), merge_acl_with_grant(), merge_clump(), MergeAttributes(), mkANode(), moddatetime(), moveArrayTypeName(), mul_var(), MultiXactIdExpand(), MultiXactIdGetUpdateXid(), MultiXactIdIsRunning(), mxid_to_string(), namerecv(), NIImportAffixes(), NIImportDictionary(), NIImportOOAffixes(), NINormalizeWord(), NormalizeSubWord(), NUM_cache(), numeric_float4(), numeric_float8(), numeric_to_double_no_overflow(), numeric_to_number(), numericvar_to_double_no_overflow(), open_csvlogfile(), OverrideSearchPathMatchesCurrent(), PageIndexMultiDelete(), PageRepairFragmentation(), PageRestoreTempPage(), parse_args(), parse_extension_control_file(), parse_fcall_arguments(), parse_hba_line(), parse_ident_line(), parse_object_field(), parse_one_reloption(), parse_tsquery(), parseNameAndArgTypes(), parsetext(), parseTypeString(), patternsel(), pclose_check(), pg_attribute_aclmask(), pg_class_aclmask(), pg_convert(), pg_crypt(), pg_database_aclmask(), pg_encrypt(), pg_extension_update_paths(), pg_foreign_data_wrapper_aclmask(), pg_foreign_server_aclmask(), pg_get_constraintdef_worker(), pg_get_expr_worker(), pg_get_indexdef_worker(), pg_get_multixact_members(), pg_language_aclmask(), pg_largeobject_aclmask_snapshot(), pg_namespace_aclmask(), pg_proc_aclmask(), pg_stat_file(), pg_stat_get_wal_senders(), pg_stat_statements(), pg_tablespace_aclmask(), pg_tablespace_databases(), pg_type_aclmask(), pg_tzenumerate_end(), pg_tzenumerate_next(), pgfnames_cleanup(), PGLC_localeconv(), pgss_shmem_startup(), pgss_store(), pgstat_recv_inquiry(), pgstat_write_statsfiles(), plainnode(), plainto_tsquery_byid(), plperl_build_tuple_result(), plperl_call_perl_func(), plperl_hash_from_tuple(), plperl_modify_tuple(), plperl_spi_exec_prepared(), plperl_spi_prepare(), plperl_spi_query_prepared(), plperl_sv_to_datum(), plperl_trigger_handler(), plpgsql_destroy_econtext(), plpgsql_subxact_cb(), pltcl_build_tuple_argument(), pltcl_func_handler(), pltcl_init_load_unknown(), pltcl_quote(), pltcl_set_tuple_values(), pltcl_trigger_handler(), PLy_cursor_plan(), PLy_elog(), PLy_free(), PLy_modify_tuple(), PLy_procedure_compile(), PLy_procedure_create(), PLy_quote_literal(), PLy_quote_nullable(), PLy_spi_execute_plan(), PLy_traceback(), PLy_trigger_build_args(), PLyGenericObject_ToComposite(), PLyMapping_ToComposite(), PLySequence_ToComposite(), PLyString_FromDatum(), PLyUnicode_Bytes(), pmx(), PopActiveSnapshot(), PopOverrideSearchPath(), PopTransaction(), PortalDrop(), PostmasterMain(), PostPrepare_smgr(), pprint(), pq_endmessage(), pq_puttextmessage(), pq_sendcountedtext(), pq_sendstring(), pq_sendtext(), prefix_quals(), PrepareTempTablespaces(), PrescanPreparedTransactions(), print(), print_expr(), print_function_arguments(), PrintBufferLeakWarning(), printtup(), printtup_20(), printtup_destroy(), printtup_internal_20(), printtup_prepare_info(), printtup_shutdown(), ProcArrayApplyRecoveryInfo(), process_ordered_aggregate_single(), process_pipe_input(), ProcessCommittedInvalidationMessages(), ProcessGUCArray(), ProcSleep(), prs_process_call(), prune_element_hashtable(), PushTransaction(), pushval_morph(), QTNFree(), QTNTernary(), queryin(), quote_object_name(), range_recv(), RE_compile(), RE_compile_and_cache(), RE_execute(), read_dictionary(), readstoplist(), ReadTwoPhaseFile(), recomputeNamespacePath(), record_cmp(), record_eq(), record_in(), record_out(), record_recv(), record_send(), RecordTransactionAbort(), RecordTransactionCommit(), RecoverPreparedTransactions(), recursive_revoke(), recv_and_check_password_packet(), recv_password_packet(), regex_fixed_prefix(), RelationBuildRuleLock(), RelationBuildTriggers(), RelationBuildTupleDesc(), RelationCacheInitializePhase3(), RelationDestroyRelation(), RelationGetIndexExpressions(), RelationGetIndexPredicate(), RelationParseRelOptions(), RelationPreserveStorage(), RelationReloadIndexInfo(), ReleaseResources_hash(), relmap_redo(), RememberFsyncRequest(), remove_dbtablespaces(), RemoveLocalLock(), RenameTypeInternal(), replace_text(), replace_text_regexp(), report_invalid_page(), report_triggers(), reportDependentObjects(), ReportGUCOption(), resetSpGistScanOpaque(), ResolveRecoveryConflictWithVirtualXIDs(), ResourceOwnerDelete(), rewriteTargetListIU(), ri_LoadConstraintInfo(), rm_redo_error_callback(), RS_free(), scanPendingInsert(), scanPostingTree(), select_outer_pathkeys_for_merge(), send_message_to_frontend(), send_message_to_server_log(), SendFunctionResult(), sepgsql_attribute_drop(), sepgsql_attribute_post_create(), sepgsql_attribute_relabel(), sepgsql_attribute_setattr(), sepgsql_avc_check_perms(), sepgsql_avc_compute(), sepgsql_avc_reclaim(), sepgsql_database_drop(), sepgsql_database_post_create(), sepgsql_database_relabel(), sepgsql_database_setattr(), sepgsql_proc_drop(), sepgsql_proc_execute(), sepgsql_proc_post_create(), sepgsql_proc_relabel(), sepgsql_proc_setattr(), sepgsql_relation_drop(), sepgsql_relation_post_create(), sepgsql_relation_relabel(), sepgsql_relation_setattr(), sepgsql_schema_drop(), sepgsql_schema_post_create(), sepgsql_schema_relabel(), sepgsql_xact_callback(), seq_redo(), serialize_deflist(), set_append_rel_size(), set_config_option(), set_indexonlyscan_references(), set_join_references(), set_returning_clause_references(), set_subquery_pathlist(), set_timetravel(), set_upper_references(), set_var_from_str(), SetClientEncoding(), setCorrLex(), SetMatViewToPopulated(), setNewTmpRes(), setup_regexp_matches(), shared_buffer_write_error_callback(), shdepLockAndCheckObject(), show_trgm(), ShowAllGUCConfig(), ShowTransactionStateRec(), ShowUsage(), ShutdownExprContext(), SignalBackends(), similarity(), simplify_and_arguments(), simplify_or_arguments(), smgr_desc(), smgrDoPendingDeletes(), smgrdounlinkall(), spgClearPendingList(), spgdoinsert(), spggettuple(), spgPageIndexMultiDelete(), spgRedoVacuumRedirect(), SPI_cursor_open(), SPI_getvalue(), SPI_modifytuple(), SPI_pfree(), SplitIdentifierString(), SplitToVariants(), sqlfunction_destroy(), StandbyRecoverPreparedTransactions(), StandbyReleaseAllLocks(), StandbyReleaseLocks(), StandbyReleaseOldLocks(), StandbyTransactionIdIsPrepared(), StartPrepare(), startScanEntry(), StartupXLOG(), StoreAttrDefault(), storeObjectDescription(), StoreRelCheck(), storeRow(), str_initcap(), str_tolower(), str_toupper(), string_to_text(), stringToQualifiedNameList(), SyncRepGetStandbyPriority(), SyncRepWaitForLSN(), SysLogger_Start(), SysLoggerMain(), systable_endscan(), systable_endscan_ordered(), tablespace_reloptions(), TablespaceCreateDbspace(), tbm_end_iterate(), tbm_free(), testprs_end(), text2ltree(), text_format(), text_format_string_conversion(), text_position_cleanup(), text_substring(), text_to_array_internal(), text_to_cstring(), text_to_cstring_buffer(), textrecv(), textToQualifiedNameList(), thesaurus_lexize(), thesaurusRead(), TidListCreate(), timetravel(), tintervalout(), to_json(), to_tsquery_byid(), to_tsvector_byid(), toast_compress_datum(), toast_flatten_tuple(), toast_flatten_tuple_attribute(), toast_insert_or_update(), tokenize_inc_file(), TParserClose(), TParserCopyClose(), TParserGet(), transientrel_destroy(), ts_accum(), ts_headline_byid_opt(), ts_lexize(), ts_match_tq(), ts_match_tt(), ts_process_call(), ts_stat_sql(), tsa_rewrite_accum(), tsa_rewrite_finish(), tsa_tsearch2(), tsquery_rewrite_query(), tsqueryrecv(), tsquerytree(), tstoreDestroyReceiver(), tstoreReceiveSlot_detoast(), tstoreShutdownReceiver(), tsvector_update_trigger(), tsvectorin(), tt_process_call(), ttdummy(), tuplestore_advance(), tuplestore_clear(), tuplestore_end(), tuplestore_trim(), typenameTypeMod(), unaccent_dict(), uniqueentry(), uniqueWORD(), UnregisterExprContextCallback(), UnregisterResourceReleaseCallback(), UnregisterSubXactCallback(), UnregisterXactCallback(), updateAclDependencies(), UpdateIndexRelation(), upper(), vac_close_indexes(), validate_index_heapscan(), varcharrecv(), varstr_cmp(), vm_extend(), WaitOnLock(), WalRcvFetchTimeLineHistoryFiles(), win1250_to_latin2(), win1251_to_iso(), win1251_to_koi8r(), win1251_to_win866(), win866_to_iso(), win866_to_koi8r(), win866_to_win1251(), write_console(), write_csvlog(), writeListPage(), writetup_datum(), writetup_index(), X509_NAME_field_to_text(), X509_NAME_to_text(), xact_desc_abort(), xact_desc_commit(), XLogFileInit(), XLogInsert(), xml_encode_special_chars(), xml_out_internal(), xml_recv(), xml_send(), xmlconcat(), xmlpi(), xpath_bool(), xpath_list(), xpath_nodeset(), xpath_number(), xpath_string(), and xpath_table().

{
    StandardChunkHeader *header;

    /*
     * Try to detect bogus pointers handed to us, poorly though we can.
     * Presumably, a pointer that isn't MAXALIGNED isn't pointing at an
     * allocated chunk.
     */
    Assert(pointer != NULL);
    Assert(pointer == (void *) MAXALIGN(pointer));

    /*
     * OK, it's probably safe to look at the chunk header.
     */
    header = (StandardChunkHeader *)
        ((char *) pointer - STANDARDCHUNKHEADERSIZE);

    AssertArg(MemoryContextIsValid(header->context));

    (*header->context->methods->free_p) (header->context, pointer);
}

char* pnstrdup ( const char *  in,
Size  len 
)

Definition at line 766 of file mcxt.c.

References palloc().

Referenced by asc_initcap(), asc_tolower(), asc_toupper(), dintdict_lexize(), dsynonym_lexize(), dxsyn_lexize(), get_source_line(), read_dictionary(), SplitToVariants(), str_initcap(), str_tolower(), str_toupper(), and t_readline().

{
    char       *out = palloc(len + 1);

    memcpy(out, in, len);
    out[len] = '\0';
    return out;
}

char* pstrdup ( const char *  in  ) 

Definition at line 755 of file mcxt.c.

Referenced by _PG_init(), _ShowOption(), abstimeout(), addCompiledLexeme(), addRangeTableEntryForFunction(), addRangeTableEntryForSubquery(), addRangeTableEntryForValues(), addToArray(), addToResult(), allocate_reloption(), analyzeCTETargetList(), array_in(), array_out(), Async_Notify(), ATExecAddIndexConstraint(), ATExecDropInherit(), ATPrepAddOids(), ATPrepCmd(), backend_read_statsfile(), BeginCopyFrom(), BeginCopyTo(), build_datatype(), build_minmax_path(), build_tuplestore_recursively(), buildRelationAliases(), cache_locale_time(), CatalogCacheInitializeCache(), check_datestyle(), check_hostname(), check_ident_usermap(), check_locale(), check_log_destination(), check_search_path(), check_selective_binary_conversion(), check_synchronous_standby_names(), check_temp_tablespaces(), check_timezone(), checkInsertTargets(), ChooseIndexColumnNames(), ChooseIndexNameAddition(), compileTheSubstitute(), connect_pg_server(), connectby_text(), connectby_text_serial(), convert_string_datum(), CopyCachedPlan(), CopyErrorData(), CopyTriggerDesc(), copyTSLexeme(), CopyVar(), CreateCachedPlan(), createForeignKeyTriggers(), CreateLockFile(), createNewConnection(), CreateTableSpace(), CreateTupleDescCopyConstr(), cstring_in(), cstring_out(), date_out(), dblink_connect(), defGetString(), DefineCollation(), DefineQueryRewrite(), DefineView(), DefineViewRules(), DefineVirtualRelation(), deleteConnection(), deserialize_deflist(), destroy_tablespace_directories(), determineRecursiveColTypes(), do_compile(), dsynonym_init(), ean13_out(), enum_out(), EventTriggerSQLDropAddObject(), exec_bind_message(), exec_dynquery_with_params(), exec_execute_message(), Exec_ListenCommit(), exec_stmt_dynexecute(), exec_stmt_raise(), expand_dynamic_library_name(), expand_targetlist(), ExpandRowReference(), expandRTE(), expandTupleDesc(), ExportSnapshot(), FillPortalStore(), filter_list_to_array(), format_type_internal(), generate_append_tlist(), generate_setop_tlist(), generateClonedIndexStmt(), get_am_name(), get_attname(), get_available_versions_for_extension(), get_collation(), get_collation_name(), get_connect_string(), get_constraint_name(), get_database_list(), get_database_name(), get_db_info(), get_ext_ver_info(), get_ext_ver_list(), get_extension_name(), get_extension_script_directory(), get_file_fdw_attribute_options(), get_func_name(), get_namespace_name(), get_opclass(), get_opname(), get_rel_name(), get_source_line(), get_sql_insert(), get_sql_update(), get_tablespace_name(), GetConfigOptionByNum(), getConnectionByName(), GetDomainConstraints(), GetForeignDataWrapper(), GetForeignServer(), GetUserNameFromId(), index_check_primary_key(), index_constraint_create(), init_sql_fcache(), int8out(), internal_yylex(), interval_out(), isn_out(), lex_accept(), libpqrcv_readtimelinehistoryfile(), limit_printout_length(), load_libraries(), lowerstr_with_len(), makeAlias(), map_sql_value_to_xml_value(), MergeAttributes(), nameout(), network_out(), NINormalizeWord(), NormalizeSubWord(), numeric_out(), numeric_out_sci(), okeys_object_field_start(), parse_extension_control_file(), parse_hba_auth_opt(), parse_hba_line(), parse_ident_line(), parseNameAndArgTypes(), ParseTzFile(), perform_base_backup(), PerformCursorOpen(), pg_available_extension_versions(), pg_available_extensions(), pg_logdir_ls(), pg_tzenumerate_next(), pg_tzenumerate_start(), pgfnames(), PGLC_localeconv(), pgrowlocks(), pgstat_recv_inquiry(), plperl_init_interp(), plpgsql_build_record(), plpgsql_build_variable(), plpgsql_compile_inline(), plpgsql_parse_dblword(), plpgsql_parse_tripword(), PLyUnicode_AsString(), postgresAddForeignUpdateTargets(), PostmasterMain(), prepare_foreign_modify(), prepare_sql_fn_parse_info(), PrepareTempTablespaces(), preprocess_targetlist(), process_psqlrc(), ProcessStartupPacket(), prsd_headline(), prsd_lextype(), range_deparse(), read_dictionary(), read_extension_control_file(), readRecoveryCommandFile(), recomputeNamespacePath(), regclassout(), regconfigout(), regdictionaryout(), register_label_provider(), regoperatorout(), regoperout(), regprocedureout(), regprocout(), regtypeout(), RelationBuildTriggers(), reltimeout(), restore(), ReThrowError(), rewriteTargetListIU(), rewriteTargetListUD(), scanstr(), sepgsql_avc_compute(), sepgsql_compute_create(), sepgsql_get_label(), sepgsql_mcstrans_in(), sepgsql_mcstrans_out(), sepgsql_set_client_label(), set_relation_column_names(), smgrout(), SPI_fname(), SPI_getrelname(), SPI_gettype(), SplitDirectoriesString(), stringToQualifiedNameList(), strip_trailing_ws(), substitute_libpath_macro(), SyncRepGetStandbyPriority(), SysLoggerMain(), TablespaceCreateDbspace(), testprs_lextype(), textToQualifiedNameList(), thesaurus_init(), throw_tcl_error(), tidout(), time_out(), timestamp_out(), timestamptz_out(), timetz_out(), tokenize_file(), tokenize_inc_file(), transformFkeyGetPrimaryKey(), transformIndexConstraint(), transformOfType(), transformRowExpr(), transformSetOperationStmt(), transformTableLikeClause(), tsa_tsearch2(), typeTypeName(), unicode_to_sqlchar(), unknownin(), unknownout(), untransformRelOptions(), utf_e2u(), utf_u2e(), void_out(), and wait_result_to_str().

void* repalloc ( void *  pointer,
Size  size 
)

Definition at line 706 of file mcxt.c.

Referenced by accumArrayResult(), add_exact_object_address(), add_exact_object_address_extra(), add_object_address(), add_reloption(), addCompiledLexeme(), addDatum(), AddStem(), addToArray(), addWrd(), AfterTriggerBeginQuery(), AfterTriggerBeginSubXact(), assign_record_type_typmod(), AtSubCommit_childXids(), compileTheLexeme(), compileTheSubstitute(), CopyReadAttributesCSV(), CopyReadAttributesText(), count_usable_fds(), dsnowball_lexize(), dsynonym_init(), dxsyn_lexize(), enlargeStringInfo(), enum_range_internal(), ExecHashIncreaseNumBatches(), ExecIndexBuildScanKeys(), expand_colnames_array_to(), extendBufFile(), find_inheritance_children(), generateHeadline(), get_docrep(), GetComboCommandId(), GetLockStatusData(), gettoken_tsvector(), ginCombineData(), ginFillScanEntry(), GinFormTuple(), ginHeapTupleFastCollect(), gistAddLoadedBuffer(), gistBuffersReleaseBlock(), gistGetNodeBuffer(), gistjoinvector(), grow_memtuples(), gtsvector_compress(), hladdword(), hlfinditem(), load_enum_cache_data(), load_relcache_init_file(), LockAcquireExtended(), ltsReleaseBlock(), MakeSharedInvalidMessagesArray(), mark_hl_fragments(), MergeAffix(), newLexeme(), newLOfd(), NIAddAffix(), NIAddSpell(), NISortAffixes(), oidvectortypes(), okeys_object_field_start(), parse_hstore(), parsetext(), pgfnames(), pgss_shmem_startup(), plainnode(), plpgsql_adddatum(), pq_putmessage_noblock(), PrescanPreparedTransactions(), prs_setup_firstcall(), pushval_asis(), pushValue(), QTNTernary(), read_dictionary(), readstoplist(), RecordConstLocation(), RelationBuildRuleLock(), RelationBuildTriggers(), RelationBuildTupleDesc(), resize_intArrayType(), ResourceOwnerEnlargeBuffers(), ResourceOwnerEnlargeCatCacheListRefs(), ResourceOwnerEnlargeCatCacheRefs(), ResourceOwnerEnlargeFiles(), ResourceOwnerEnlargePlanCacheRefs(), ResourceOwnerEnlargeRelationRefs(), ResourceOwnerEnlargeSnapshots(), ResourceOwnerEnlargeTupleDescs(), SetConstraintStateAddItem(), setup_regexp_matches(), smgrDoPendingDeletes(), SPI_connect(), spi_printtup(), SPI_repalloc(), TidListCreate(), tsqueryrecv(), tsvectorin(), tsvectorrecv(), tuplestore_alloc_read_pointer(), uniqueentry(), uniqueWORD(), and variable_paramref_hook().

{
    StandardChunkHeader *header;

    /*
     * Try to detect bogus pointers handed to us, poorly though we can.
     * Presumably, a pointer that isn't MAXALIGNED isn't pointing at an
     * allocated chunk.
     */
    Assert(pointer != NULL);
    Assert(pointer == (void *) MAXALIGN(pointer));

    /*
     * OK, it's probably safe to look at the chunk header.
     */
    header = (StandardChunkHeader *)
        ((char *) pointer - STANDARDCHUNKHEADERSIZE);

    AssertArg(MemoryContextIsValid(header->context));

    if (!AllocSizeIsValid(size))
        elog(ERROR, "invalid memory alloc request size %lu",
             (unsigned long) size);

    /* isReset must be false already */
    Assert(!header->context->isReset);

    return (*header->context->methods->realloc) (header->context,
                                                 pointer, size);
}


Variable Documentation

Definition at line 38 of file mcxt.c.

Referenced by _bt_preprocess_array_keys(), _SPI_save_plan(), afterTriggerInvokeEvents(), array_agg_finalfn(), array_to_datum_internal(), begin_heap_rewrite(), BeginCopy(), btvacuumscan(), build_join_rel_hash(), BuildCachedPlan(), CompactCheckpointerRequestQueue(), CompleteCachedPlan(), compute_array_stats(), compute_scalar_stats(), compute_tsvector_stats(), CopyCachedPlan(), CopyErrorData(), CopyFrom(), CopyTo(), CreateCachedPlan(), CreateExecutorState(), CreateOneShotCachedPlan(), CreateSchemaCommand(), CreateStandaloneExprContext(), createTempGistContext(), createTrgmNFA(), dblink_get_connections(), do_analyze_rel(), do_start_worker(), domain_check(), dsnowball_init(), each_worker(), eval_windowfunction(), EventTriggerInvoke(), exec_replication_command(), exec_stmt_block(), ExecHashTableCreate(), ExecInitAgg(), ExecInitMergeAppend(), ExecInitRecursiveUnion(), ExecInitSetOp(), ExecInitSubPlan(), ExecInitUnique(), ExecInitWindowAgg(), ExecMakeTableFunctionResult(), file_acquire_sample_rows(), finalize_aggregate(), finalize_windowaggregate(), fmgr_info(), fmgr_info_other_lang(), geqo_eval(), get_database_list(), get_json_object_as_hash(), gin_extract_query_trgm(), gin_xlog_startup(), ginbeginscan(), ginbuild(), gininsert(), ginInsertCleanup(), gistbuild(), gistInitBuildBuffers(), gistInitParentMap(), initGinState(), initGISTstate(), initSuffixTree(), inline_function(), inline_set_returning_function(), json_array_elements(), load_tzoffsets(), MakeTupleTableSlot(), MJExamineQuals(), NextCopyFrom(), optionListToArray(), OverrideSearchPathMatchesCurrent(), parseCheckAggregates(), pgstat_collect_oids(), plan_cluster_use_sort(), plperl_array_to_datum(), plperl_inline_handler(), plperl_return_next(), plperl_spi_exec(), plperl_spi_exec_prepared(), plperl_spi_fetchrow(), plperl_spi_prepare(), plperl_spi_query(), plperl_spi_query_prepared(), plpgsql_compile_inline(), plpgsql_inline_handler(), plpgsql_validator(), plpython_inline_handler(), pltcl_elog(), pltcl_SPI_execute(), pltcl_SPI_execute_plan(), pltcl_SPI_prepare(), PLy_cursor_fetch(), PLy_cursor_iternext(), PLy_cursor_plan(), PLy_cursor_query(), PLy_output(), PLy_spi_execute_fetch_result(), PLy_spi_execute_plan(), PLy_spi_execute_query(), PLy_spi_prepare(), PLy_subtransaction_enter(), PLyDict_FromTuple(), populate_recordset_object_start(), PortalRun(), PortalRunMulti(), postgresAcquireSampleRowsFunc(), postquel_start(), ProcessCompletedNotifies(), pull_up_simple_subquery(), regexp_split_to_array(), ResetUnloggedRelations(), RevalidateCachedQuery(), ScanKeyEntryInitializeWithInfo(), spg_xlog_startup(), spgbeginscan(), spgbuild(), spginsert(), spi_dest_startup(), storeRow(), subquery_planner(), tbm_create(), text_to_array_internal(), transformGraph(), transformRelOptions(), tsquery_rewrite_query(), tuplesort_begin_common(), tuplesort_begin_datum(), tuplesort_begin_heap(), tuplestore_begin_common(), write_console(), xml_is_document(), and xpath().

Definition at line 46 of file mcxt.c.

Referenced by PostgresMain(), PostmasterMain(), and StartChildProcess().

Definition at line 44 of file mcxt.c.

Referenced by _hash_regscan(), add_reloption(), add_string_reloption(), allocate_reloption(), AllocSetAlloc(), AllocSetContextCreate(), AllocSetRealloc(), AtAbort_Memory(), AtCleanup_Memory(), AtCommit_Memory(), AtStart_Memory(), AutoVacLauncherMain(), BackendRun(), BackgroundWriterMain(), cache_locale_time(), CheckpointerMain(), ConvertTriggerToFK(), CreateCacheMemoryContext(), dblink_connect(), do_autovacuum(), do_compile(), EnablePortalManager(), EventTriggerBeginCompleteQuery(), Exec_ListenCommit(), finish_xact_command(), get_tabstat_entry(), GetLocalBufferStorage(), GetLockConflicts(), hash_create(), InitDeadLockChecking(), initialize_reloptions(), InitializeSearchPath(), load_hba(), load_ident(), LockAcquireExtended(), mdinit(), mxid_to_string(), perm_fmgr_info(), pgstat_setup_memcxt(), plperl_spi_prepare(), PLy_malloc(), PLy_spi_execute_fetch_result(), PostgresMain(), PostmasterMain(), pq_init(), PrepareClientEncoding(), ProcessStartupPacket(), PushOverrideSearchPath(), recomputeNamespacePath(), register_label_provider(), RegisterResourceReleaseCallback(), RegisterSubXactCallback(), RegisterXactCallback(), RelationCreateStorage(), RelationDropStorage(), ResourceOwnerCreate(), ResourceOwnerEnlargeBuffers(), ResourceOwnerEnlargeCatCacheListRefs(), ResourceOwnerEnlargeCatCacheRefs(), ResourceOwnerEnlargeFiles(), ResourceOwnerEnlargePlanCacheRefs(), ResourceOwnerEnlargeRelationRefs(), ResourceOwnerEnlargeSnapshots(), ResourceOwnerEnlargeTupleDescs(), ri_HashCompareOp(), roles_has_privs_of(), roles_is_member_of(), sepgsql_avc_init(), sepgsql_xact_callback(), SetDatabasePath(), StartChildProcess(), tokenize_file(), and WalWriterMain().