Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sizeof(struct btt_sb) is 4096. When using devm_kzalloc(), there is a small memory overhead and, on most systems, this leads to 40 bytes of extra memory allocation. So 5036 bytes are expected to be allocated. The memory allocator works with fixed size hunks of memory. In this case, it will require 8192 bytes of memory because more than 4096 bytes are required. In order to avoid wasting 4ko of memory, just use kzalloc() and add a devm action to free it when needed. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
- Loading branch information