// We can't throw in bionic, so we go straight to the equivalent of // std::terminate for these two instead. void* operatornew(std::size_t size) { void* p = malloc(size); if (p == nullptr) {
async_safe_fatal("new failed to allocate %zu bytes", size);
} return p;
} void* operatornew[](std::size_t size) { void* p = malloc(size); if (p == nullptr) {
async_safe_fatal("new[] failed to allocate %zu bytes", size);
} return p;
}
// These two are the "nothrow" variants, so we just return nullptr on failure. void* operatornew(std::size_t size, const std::nothrow_t&) { return malloc(size);
} void* operatornew[](std::size_t size, const std::nothrow_t&) { return malloc(size);
}
// free() can't throw anyway (except on heap corruption, which is always fatal), // so there's no difference between the regular and "nothrow" variants here. voidoperatordelete(void* p) noexcept { free(p); } voidoperatordelete[](void* p) noexcept { free(p); } voidoperatordelete(void* p, const std::nothrow_t&) noexcept { free(p); } voidoperatordelete[](void* p, const std::nothrow_t&) noexcept { free(p); }
// TODO: these can use free_sized() once we have it (http://b/284321795). voidoperatordelete(void* p, std::size_t) noexcept { free(p); } voidoperatordelete[](void* p, std::size_t) noexcept { free(p); }
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.18 Sekunden
(vorverarbeitet am 2026-06-28)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.