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

Function pg_strdup

src/common/fe_memutils.c:84–102  ·  view source on GitHub ↗

* "Safe" wrapper around strdup(). */

Source from the content-addressed store, hash-verified

82 * "Safe" wrapper around strdup().
83 */
84char *
85pg_strdup(const char *in)
86{
87 char *tmp;
88
89 if (!in)
90 {
91 fprintf(stderr,
92 _("cannot duplicate null pointer (internal error)\n"));
93 exit(EXIT_FAILURE);
94 }
95 tmp = strdup(in);
96 if (!tmp)
97 {
98 fprintf(stderr, _("out of memory\n"));
99 exit(EXIT_FAILURE);
100 }
101 return tmp;
102}
103
104void
105pg_free(void *ptr)

Callers 15

mainFunction · 0.85
mainFunction · 0.85
get_optsFunction · 0.85
add_one_eltFunction · 0.85
get_comma_eltsFunction · 0.85
format_numeric_localeFunction · 0.85
printTableAddFooterFunction · 0.85
printTableSetFooterFunction · 0.85
setDecimalLocaleFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
add_stringlist_itemFunction · 0.85

Calls

no outgoing calls

Tested by 10

mainFunction · 0.68
mainFunction · 0.68
add_stringlist_itemFunction · 0.68
split_to_stringlistFunction · 0.68
replace_stringFunction · 0.68
load_resultmapFunction · 0.68
run_scheduleFunction · 0.68
open_result_filesFunction · 0.68
regression_mainFunction · 0.68
handle_argsFunction · 0.68