kernel.resource: TLSF - restore previous algorithm that allows chaning the request...
commit9c0253c23a4ce53e5a5fb7f4f00983731fe33952
authordeadwood <deadwood@fb15a70f-31f2-0310-bbcc-cdcc74a49acc>
Sat, 3 May 2014 18:18:46 +0000 (3 18:18 +0000)
committerdeadwood <deadwood@fb15a70f-31f2-0310-bbcc-cdcc74a49acc>
Sat, 3 May 2014 18:18:46 +0000 (3 18:18 +0000)
tree85925a12fbfd9b46b91cd4dc75f9f5dbcdfb361f
parent59000fa42930c8f3a6175481f5dd59e14e9d8d17
kernel.resource: TLSF - restore previous algorithm that allows chaning the request size

When there is no space, space will be allocated and request will be
repeated. However since MAPPING_SEARCH uses a different algorithm than
MAPPING_INSERT for finding fl and sl, the size needs to be first
correct by MAPPING_SEARCH, then allocation needs to be made where
MAPPING_INSERT is used and only then second MAPPING_SEARCH call with
find allocation. Case that led to finding this problem was triggered
by allocation of 266256 bytes in call to tlsf_malloc.

git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@48985 fb15a70f-31f2-0310-bbcc-cdcc74a49acc
rom/kernel/tlsf.c