src\backend\executor\execMain.c: void standard_ExecutorStart(QueryDesc *queryDesc, int eflags) { …… /*Distribute memory to operators.*/ if (Gp_role == GP_ROLE_DISPATCH) { …… switch(*gp_resmanager_memory_policy) { case RESMANAGER_MEMORY_POLICY_AUTO: PolicyAutoAssignOperatorMemoryKB(queryDesc->plannedstmt, queryDesc->plannedstmt->query_mem); break; case RESMANAGER_MEMORY_POLICY_EAGER_FREE: PolicyEagerFreeAssignOperatorMemoryKB(queryDesc->plannedstmt, queryDesc->plannedstmt->query_mem); break; default: Assert(IsResManagerMemoryPolicyNone()); break; }