MCPcopy Create free account
hub / github.com/Singular/Singular / omRealloc0Size

Function omRealloc0Size

omalloc/xalloc.h:92–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90{ if (s!=0) { void *d=malloc(s);memset(d,0,s); return d;} else return NULL; }
91
92static inline void *omRealloc0Size(void *d, __attribute__((unused)) size_t os, size_t ns)
93{ if (d==NULL)
94 return omAlloc0(ns);
95 else
96 {
97 char *p=(char *)realloc(d,ns);
98 if (ns>os) memset(p+os,0,ns-os);
99 return (void*)p;
100 }
101}
102
103#define omfree(d) free(d)
104#define omFree(d) free(d)

Callers 12

resizeMethod · 0.85
rComposeOrderFunction · 0.85
omtTestReallocFunction · 0.85
syEnlargeFieldsFunction · 0.85
kLiftstd.ccFile · 0.85
sbaFunction · 0.85
enlargeTFunction · 0.85
enterSBbaFunction · 0.85
enterSSbaFunction · 0.85
enterSyzFunction · 0.85
syz3.ccFile · 0.85
procedeNextGeneratorsFunction · 0.85

Calls 2

omAlloc0Function · 0.85
reallocFunction · 0.85

Tested by 1

omtTestReallocFunction · 0.68