Andreas Kling
4b4e1d1c90
Kernel: Remove redundant [[nodiscard]] on KResult return values
...
Both KResult and KResultOr are [[nodiscard]] at the class level,
so there's no need to have functions return `[[nodiscard]] KResult`.
2021-09-07 01:18:02 +02:00
Andreas Kling
69b9b2888c
Kernel: Don't allocate so much when generating coredumps
...
Instead of creating a bunch of ByteBuffers and concatenating them to
generate the "notes" segment, we now simply create a KBufferBuilder
and tell each of the notes generator helpers to write into the builder.
This allows the code to flow more naturally, with some bonus additional
error propagation. :^)
2021-09-06 18:56:51 +02:00
Andreas Kling
60eea6940f
Kernel: Tidy up Coredump construction
...
- Use KResultOr and TRY to propagate errors
- Return more specific errors now that they have a path out from here
2021-09-06 18:56:51 +02:00
Ali Mohammad Pur
3a9f00c59b
Everywhere: Use OOM-safe ByteBuffer APIs where possible
...
If we can easily communicate failure, let's avoid asserting and report
failure instead.
2021-09-06 01:53:26 +02:00
Andreas Kling
bcd2025311
Everywhere: Core dump => Coredump
...
We all know what a coredump is, and it feels more natural to refer to
it as a coredump (most code already does), so let's be consistent.
2021-08-23 00:02:09 +02:00