1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:37:35 +00:00

Kernel: Handle string format errors in SlabAllocator stats :^)

Switch to KString::formatted and fix API so we can propagate errors.
This commit is contained in:
Brian Gianforcaro 2021-11-29 03:01:24 -08:00 committed by Andreas Kling
parent a0e59099fc
commit 74ee491b84
3 changed files with 25 additions and 17 deletions

View file

@ -17,7 +17,7 @@ namespace Kernel {
void* slab_alloc(size_t slab_size);
void slab_dealloc(void*, size_t slab_size);
void slab_alloc_init();
void slab_alloc_stats(Function<void(size_t slab_size, size_t allocated, size_t free)>);
ErrorOr<void> slab_alloc_stats(Function<ErrorOr<void>(size_t slab_size, size_t allocated, size_t free)>);
#define MAKE_SLAB_ALLOCATED(type) \
public: \