MCPcopy Create free account
hub / github.com/HelenOS/helenos / frame_reference_add

Function frame_reference_add

kernel/generic/src/mm/frame.c:1069–1083  ·  view source on GitHub ↗

Add reference to frame. * * Find respective frame structure for supplied PFN and * increment frame reference count. * * @param pfn Frame number of the frame to be freed. * */

Source from the content-addressed store, hash-verified

1067 *
1068 */
1069_NO_TRACE void frame_reference_add(pfn_t pfn)
1070{
1071 irq_spinlock_lock(&zones.lock, true);
1072
1073 /*
1074 * First, find host frame zone for addr.
1075 */
1076 size_t znum = find_zone(pfn, 1, 0);
1077
1078 assert(znum != (size_t) -1);
1079
1080 zones.info[znum].frames[pfn - zones.info[znum].base].refcount++;
1081
1082 irq_spinlock_unlock(&zones.lock, true);
1083}
1084
1085/** Mark given range unavailable in frame zones.
1086 *

Callers 5

elf_shareFunction · 0.85
elf_page_faultFunction · 0.85
anon_shareFunction · 0.85
anon_page_faultFunction · 0.85
pagein_answer_preprocessFunction · 0.85

Calls 3

irq_spinlock_lockFunction · 0.85
find_zoneFunction · 0.85
irq_spinlock_unlockFunction · 0.85

Tested by

no test coverage detected