MCPcopy Create free account
hub / github.com/F-Stack/f-stack / shmexit_myhook

Function shmexit_myhook

freebsd/kern/sysv_shm.c:842–860  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

840shmexit(struct vmspace *vm)
841#else
842static void
843shmexit_myhook(struct vmspace *vm)
844#endif
845{
846 struct shmmap_state *base, *shm;
847 int i;
848
849 base = vm->vm_shm;
850 if (base != NULL) {
851 vm->vm_shm = NULL;
852 SYSVSHM_LOCK();
853 for (i = 0, shm = base; i < shminfo.shmseg; i++, shm++) {
854 if (shm->shmid != -1)
855 shm_delete_mapping(vm, shm);
856 }
857 SYSVSHM_UNLOCK();
858 free(base, M_SHM);
859 }
860}
861
862static void
863shmrealloc(void)

Callers

nothing calls this directly

Calls 2

shm_delete_mappingFunction · 0.85
freeFunction · 0.70

Tested by

no test coverage detected