MCPcopy Create free account
hub / github.com/couchbase/fleece / newBytes

Method newBytes

API/fleece/slice.hh:712–717  ·  view source on GitHub ↗

Raw memory allocation. Just like malloc but throws/terminates on failure. */

Source from the content-addressed store, hash-verified

710
711 /** Raw memory allocation. Just like malloc but throws/terminates on failure. */
712 RETURNS_NONNULL
713 inline void* pure_slice::newBytes(size_t sz) {
714 void* result = ::malloc(sz);
715 if (_usuallyFalse(!result)) failBadAlloc();
716 return result;
717 }
718
719
720 /** Like realloc but throws/terminates on failure. */

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected