aboutsummaryrefslogtreecommitdiff
path: root/core/buddy.c
AgeCommit message (Collapse)AuthorFilesLines
2017-03-02buddy: Check zalloc() return valueStewart Smith1-0/+2
All callers of buddy_create() are correctly checking return value. Found by static analysis Fixes: 8594b9c5bd456205255ea2241ba224f47480efad Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-01-05buddy: Add a simple generic buddy allocatorBenjamin Herrenschmidt1-0/+302
It operates on bits representing whatever objects the caller wants it to represent, it's not per-se a memory allocator (it's meant to be used among others by XIVE for VP allocations). As such it cannot keep linked lists of free objects, so don't expect stellar perfs. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> [stewart@linux.vnet.ibm.com: add (C) header, fix gcc4.8 build error] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>