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

Function _varea_create

components/mm/mm_aspace.c:631–641  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

629}
630
631static rt_varea_t _varea_create(void *start, rt_size_t size)
632{
633 rt_varea_t varea;
634 varea = (rt_varea_t)rt_malloc(sizeof(struct rt_varea));
635 if (varea)
636 {
637 varea->start = start;
638 varea->size = size;
639 }
640 return varea;
641}
642
643#define _IS_OVERFLOW(start, length) ((length) > (0ul - (uintptr_t)(start)))
644#define _IS_OVERSIZE(start, length, limit_s, limit_sz) (((length) + (rt_size_t)((char *)(start) - (char *)(limit_start))) > (limit_size))

Callers 3

_insert_new_vareaFunction · 0.85
rt_aspace_map_phyFunction · 0.85
_split_vareaFunction · 0.85

Calls 1

rt_mallocFunction · 0.85

Tested by

no test coverage detected