MCPcopy Create free account
hub / github.com/apache/cloudberry / pg_realloc

Function pg_realloc

src/common/fe_memutils.c:64–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64void *
65pg_realloc(void *ptr, size_t size)
66{
67 void *tmp;
68
69 /* Avoid unportable behavior of realloc(NULL, 0) */
70 if (ptr == NULL && size == 0)
71 size = 1;
72 tmp = realloc(ptr, size);
73 if (!tmp)
74 {
75 fprintf(stderr, _("out of memory\n"));
76 exit(EXIT_FAILURE);
77 }
78 return tmp;
79}
80
81/*
82 * "Safe" wrapper around strdup().

Callers 15

add_one_eltFunction · 0.85
repallocFunction · 0.85
datapagemap_addFunction · 0.85
exec_command_setFunction · 0.85
readfileFunction · 0.85
setup_cdb_schemaFunction · 0.85
readMessageFromPipeFunction · 0.85
AssignDumpIdFunction · 0.85
addObjectDependencyFunction · 0.85
BuildArchiveDependenciesFunction · 0.85
findDumpableDependenciesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected