MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / _migrate_and_release_varea

Function _migrate_and_release_varea

components/mm/mm_aspace.c:339–354  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

337}
338
339rt_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
356static rt_varea_t _merge_surrounding(rt_aspace_t aspace, rt_varea_t operand,
357 struct _mapping_property *prop)

Callers 1

_merge_surroundingFunction · 0.85

Calls 3

rt_freeFunction · 0.85
on_varea_mergeFunction · 0.70
_aspace_bst_removeFunction · 0.70

Tested by

no test coverage detected