MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / NewObjectBuilderWithCounter

Function NewObjectBuilderWithCounter

pkg/util/json/json.go:333–340  ·  view source on GitHub ↗

NewObjectBuilderWithCounter creates and instantiates ObjectBuilder with memory counter.

()

Source from the content-addressed store, hash-verified

331
332// NewObjectBuilderWithCounter creates and instantiates ObjectBuilder with memory counter.
333func NewObjectBuilderWithCounter() *ObjectBuilderWithCounter {
334 ob := NewObjectBuilder(0)
335 return &ObjectBuilderWithCounter{
336 ob: ob,
337 // initial memory allocation
338 size: unsafe.Sizeof(ob) + jsonInterfaceSize,
339 }
340}
341
342// Add appends key value pair to the sequence and updates
343// amount of memory allocated for the overall keys and values.

Callers

nothing calls this directly

Calls 2

NewObjectBuilderFunction · 0.85
SizeofMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…