| 337 | } |
| 338 | |
| 339 | rt_inline rt_err_t _migrate_and_release_varea(rt_aspace_t aspace, rt_varea_t to, rt_varea_t from, |
| 340 | rt_err_t (*on_varea_merge)(struct rt_varea *to, struct rt_varea *from)) |
| 341 | { |
| 342 | rt_err_t error; |
| 343 | error = on_varea_merge(to, from); |
| 344 | if (error == RT_EOK) |
| 345 | { |
| 346 | /* uninstall operand & release the varea */ |
| 347 | _aspace_bst_remove(aspace, from); |
| 348 | to->size += from->size; |
| 349 | |
| 350 | if (VAREA_NOT_STATIC(from)) |
| 351 | rt_free(from); |
| 352 | } |
| 353 | return error; |
| 354 | } |
| 355 | |
| 356 | static rt_varea_t _merge_surrounding(rt_aspace_t aspace, rt_varea_t operand, |
| 357 | struct _mapping_property *prop) |
no test coverage detected