MCPcopy Create free account
hub / github.com/catboost/catboost / fts_palloc

Function fts_palloc

util/folder/fts.cpp:1286–1292  ·  view source on GitHub ↗

* Allow essentially unlimited paths; find, rm, ls should all work on any tree. * Most systems will allow creation of paths much longer than MAXPATHLEN, even * though the kernel won't resolve them. Add the size (not just what's needed) * plus 256 bytes so don't realloc the path 2 bytes at a time. */

Source from the content-addressed store, hash-verified

1284 * plus 256 bytes so don't realloc the path 2 bytes at a time.
1285 */
1286static int
1287fts_palloc(FTS* sp, size_t more)
1288{
1289 sp->fts_pathlen += more + 256;
1290 sp->fts_path = (char*)yreallocf(sp->fts_path, (size_t)sp->fts_pathlen);
1291 return (sp->fts_path == nullptr);
1292}
1293
1294static void
1295ADJUST(FTSENT* p, void* addr)

Callers 2

yfts_openFunction · 0.85
fts.cppFile · 0.85

Calls 1

yreallocfFunction · 0.85

Tested by

no test coverage detected