MCPcopy Create free account
hub / github.com/apache/trafficserver / RecAlloc

Function RecAlloc

src/records/RecUtils.cc:51–69  ·  view source on GitHub ↗

------------------------------------------------------------------------- RecAlloc -------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

49// RecAlloc
50//-------------------------------------------------------------------------
51RecRecord *
52RecAlloc(RecT rec_type, const char *name, RecDataT data_type)
53{
54 if (g_num_records >= max_records_entries) {
55 Fatal("Too many config records already registered (%d). Hint: increase --maxRecords param.", max_records_entries);
56 return nullptr;
57 }
58
59 int i = g_num_records++;
60 RecRecord *r = &(g_records[i]);
61
62 RecRecordInit(r);
63 r->rec_type = rec_type;
64 r->name = ats_strdup(name);
65 r->order = i;
66 r->data_type = data_type;
67
68 return r;
69}
70
71//-------------------------------------------------------------------------
72// RecDataZero

Callers 3

register_recordFunction · 0.85
RecForceInsertFunction · 0.85
RecSetRecordFunction · 0.85

Calls 1

RecRecordInitFunction · 0.85

Tested by

no test coverage detected