Re: troubleshooting dragonfly after compiling kernel

看板DFBSD_kernel作者時間15年前 (2010/09/03 07:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串9/13 (看更多)
On Fri, Sep 03, 2010 at 07:29:26AM +0900, YONETANI Tomokazu wrote: > On Thu, Sep 02, 2010 at 06:27:57PM +0000, Pratyush Kshirsagar wrote: > > diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c > > index a326037..4eb9026 100644 > > --- a/sys/vm/vm_map.c > > +++ b/sys/vm/vm_map.c > > @@ -3657,3 +3657,20 @@ DB_SHOW_COMMAND(procvm, procvm) > > } > > > > #endif /* DDB */ > > + > > +long vmap_resident_count(vm_map_t v) > > +{ > > + vm_map_entry_t entry; > > + vm_map_object_t *mobj; > > + vm_object_t obj; > > + long pres = 0; > > + entry = &(v->header); > > + while(entry->next != NULL){ > > + mobj = &entry->object; > > + if(mobj->vm_object != NULL) { > > + obj = mobj->vm_object; > > + pres = pres + (long) (obj->agg_pv_list_count / obj->resident_page_count); > > + } > > + } > > + return pres; > > +} > > The variable `entry' is not advanced in the loop, so it doesn't terminate > until a new element is appended to the current one. I mean, it doesn't terminate unless there's no next entry, or until the next entry is removed all of a sudden.
文章代碼(AID): #1CW2omYU (DFBSD_kernel)
討論串 (同標題文章)
文章代碼(AID): #1CW2omYU (DFBSD_kernel)