]> xenbits.xensource.com Git - unikraft/unikraft.git/commit
lib/ukalloc: Introduce `uk_alloc_maxalloc()` and make `uk_alloc_availmem()` available
authorSimon Kuenzer <simon.kuenzer@neclab.eu>
Thu, 12 Nov 2020 15:52:53 +0000 (16:52 +0100)
committerUnikraft <monkey@unikraft.io>
Tue, 22 Jun 2021 13:14:08 +0000 (13:14 +0000)
commitdf25d037583fef3dd871dbee31ddf5f8884685f7
tree93b64cdf8144c678a95eff5a25f848eebd7b0789
parent869c1ba0a5e85c06f917b41e6055572e36d2930c
lib/ukalloc: Introduce `uk_alloc_maxalloc()` and make `uk_alloc_availmem()` available

The purpose of this commit is to make `uk_alloc_availmem()` always
available because it is currently the only way to figure out how much heap
memory is still available. We also introduce `uk_alloc_maxalloc()` that
returns the biggest possible allocation that an allocator can currently
satisfy. The configuration option `CONFIG_IFSTAT` is removed because it
raises the expectation of an interface that returns detailed allocator
statistics.

Signed-off-by: Simon Kuenzer <simon.kuenzer@neclab.eu>
Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@gmail.com>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Pull-Request: #229
lib/ukalloc/Config.uk
lib/ukalloc/include/uk/alloc.h
lib/ukalloc/include/uk/alloc_impl.h
lib/ukallocbbuddy/bbuddy.c
lib/ukallocpool/pool.c
lib/ukallocregion/region.c