We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In pgut_malloc function, it call malloc function to resuqest memory. Whether it will need call memset function to initialize the requested memeory.
`void * pgut_malloc(size_t size) { char *ret;
if ((ret = malloc(size)) == NULL) ereport(ERROR, (errcode(ERROR_NOMEM), errmsg("could not allocate memory (%lu bytes): %s", (unsigned long) size, strerror(errno)))); return ret;
}`
Like the function pgut_realloc function usage.
`p = pgut_realloc(array->data, sizeof(void *) * newsize);
/* initialize expanded area to NULL */ memset(p + array->alloced, 0, (newsize - array->alloced) * sizeof(void *));`
The text was updated successfully, but these errors were encountered:
mikecaat
huangfumingyue
No branches or pull requests
In pgut_malloc function, it call malloc function to resuqest memory. Whether it will need call memset function to initialize the requested memeory.
`void *
pgut_malloc(size_t size)
{
char *ret;
}`
Like the function pgut_realloc function usage.
`p = pgut_realloc(array->data, sizeof(void *) * newsize);
/* initialize expanded area to NULL */
memset(p + array->alloced, 0, (newsize - array->alloced) * sizeof(void *));`
The text was updated successfully, but these errors were encountered: