Github user interma commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/1349#discussion_r177327550
  
    --- Diff: contrib/vexecutor/vadt.c ---
    @@ -39,10 +39,11 @@ size_t v##type##Size(vheader *vh) \
     vheader* buildv##type(int n) \
     { \
        vheader* result; \
    -   result = (vheader*) palloc0(offsetof(v##type,values) + n * 
sizeof(type)); \
    +   result = (vheader*) malloc(offsetof(v##type,values) + n * 
sizeof(type)); \
    +   memset(result,0,offsetof(v##type,values) + n * sizeof(type)); \
        result->dim = n; \
        result->elemtype = typeoid; \
    -   result->isnull = palloc(sizeof(bool) * n); \
    +   result->isnull = malloc(sizeof(bool) * n); \
    --- End diff --
    
    why use malloc here? and the below code is still palloc()


---

Reply via email to