4 ms·
it depends, if the functionality represented by the library is known to require a lot of memory (or simply allocation failures are an expected part of its opera
by pas 4mo ago
it depends, if the functionality represented by the library is known to require a lot of memory (or simply allocation failures are an expected part of its operation), then it should be pretty much part of the API, probably with some tracing/diagnostics interface to get the required visibility into how much memory goes and where.
but for most libraries I on allocation failure I don't expect any fancy logging system. maybe even panic is fine.