HashAggTable * create_agg_hash_table(AggState *aggstate) { …… HashAggTable *hashtable; …… hashtable = (HashAggTable *) palloc0(sizeof(HashAggTable)); …… uint64 operatorMemKB = PlanStateOperatorMemKB( (PlanState *) aggstate); …… hashtable->max_mem = 1024.0 * operatorMemKB; …… }