| plan 9 kernel history: overview | file list | diff list |
1991/0712/port/sysproc.c (diff list | history)
| 1991/0710/sys/src/9/port/sysproc.c:517,523 – 1991/0712/sys/src/9/port/sysproc.c:517,523 (short | long | prev | next) | ||
| 1991/0705 | syssegfree(ulong *arg) { Segment *s; | |
| 1991/0712 | ulong from, pages; | |
| 1991/0705 | ||
| 1991/0706 | from = PGROUND(arg[0]); s = seg(u->p, from, 1); | |
| 1991/0710/sys/src/9/port/sysproc.c:524,537 – 1991/0712/sys/src/9/port/sysproc.c:524,537 | ||
| 1991/0705 | if(s == 0) errors("not in address space"); | |
| 1991/0706 |
| |
| 1991/0712 | pages = (arg[1]+BY2PG-1)/BY2PG; | |
| 1991/0705 |
| |
| 1991/0712 | if(from+pages*BY2PG > s->top) { | |
| 1991/0705 | qunlock(&s->lk); errors("segment too short"); } | |
| 1991/0712 | mfreeseg(s, from, pages); | |
| 1991/0705 | qunlock(&s->lk); return 0; | |