MCPcopy Create free account
hub / github.com/bytedance/sonic-cpp / Size

Method Size

include/sonic/allocator.h:349–355  ·  view source on GitHub ↗

Computes the memory blocks allocated. ! \return total used bytes. */

Source from the content-addressed store, hash-verified

347 /*! \return total used bytes.
348 */
349 size_t Size() const noexcept {
350 sonic_assert(shared_->refcount > 0);
351 size_t size = 0;
352 for (ChunkHeader* c = shared_->chunkHead; c != 0; c = c->next)
353 size += c->size;
354 return size;
355 }
356
357 //! Whether the allocator is shared.
358 /*! \return true or false.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected