mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-17 15:07:04 +08:00
Update to FreeBSD head 2016-08-23
Git mirror commit 9fe7c416e6abb28b1398fd3e5687099846800cfd.
This commit is contained in:
@@ -255,6 +255,13 @@ memstat_get_size(const struct memory_type *mtp)
|
||||
return (mtp->mt_size);
|
||||
}
|
||||
|
||||
uint64_t
|
||||
memstat_get_rsize(const struct memory_type *mtp)
|
||||
{
|
||||
|
||||
return (mtp->mt_rsize);
|
||||
}
|
||||
|
||||
uint64_t
|
||||
memstat_get_memalloced(const struct memory_type *mtp)
|
||||
{
|
||||
|
@@ -124,6 +124,7 @@ uint64_t memstat_get_countlimit(const struct memory_type *mtp);
|
||||
uint64_t memstat_get_byteslimit(const struct memory_type *mtp);
|
||||
uint64_t memstat_get_sizemask(const struct memory_type *mtp);
|
||||
uint64_t memstat_get_size(const struct memory_type *mtp);
|
||||
uint64_t memstat_get_rsize(const struct memory_type *mtp);
|
||||
uint64_t memstat_get_memalloced(const struct memory_type *mtp);
|
||||
uint64_t memstat_get_memfreed(const struct memory_type *mtp);
|
||||
uint64_t memstat_get_numallocs(const struct memory_type *mtp);
|
||||
|
@@ -51,6 +51,7 @@ struct memory_type {
|
||||
uint64_t mt_byteslimit; /* 0, or maximum bytes. */
|
||||
uint64_t mt_sizemask; /* malloc: allocated size bitmask. */
|
||||
uint64_t mt_size; /* uma: size of objects. */
|
||||
uint64_t mt_rsize; /* uma: real size of objects. */
|
||||
|
||||
/*
|
||||
* Zone or type information that includes all caches and any central
|
||||
|
@@ -214,6 +214,7 @@ retry:
|
||||
}
|
||||
|
||||
mtp->mt_size = uthp->uth_size;
|
||||
mtp->mt_rsize = uthp->uth_rsize;
|
||||
mtp->mt_memalloced = mtp->mt_numallocs * uthp->uth_size;
|
||||
mtp->mt_memfreed = mtp->mt_numfrees * uthp->uth_size;
|
||||
mtp->mt_bytes = mtp->mt_memalloced - mtp->mt_memfreed;
|
||||
@@ -438,6 +439,7 @@ memstat_kvm_uma(struct memory_type_list *list, void *kvm_handle)
|
||||
}
|
||||
skip_percpu:
|
||||
mtp->mt_size = kz.uk_size;
|
||||
mtp->mt_rsize = kz.uk_rsize;
|
||||
mtp->mt_memalloced = mtp->mt_numallocs * mtp->mt_size;
|
||||
mtp->mt_memfreed = mtp->mt_numfrees * mtp->mt_size;
|
||||
mtp->mt_bytes = mtp->mt_memalloced - mtp->mt_memfreed;
|
||||
@@ -449,7 +451,7 @@ skip_percpu:
|
||||
kz.uk_ipers;
|
||||
mtp->mt_byteslimit = mtp->mt_countlimit * mtp->mt_size;
|
||||
mtp->mt_count = mtp->mt_numallocs - mtp->mt_numfrees;
|
||||
for (ubp = LIST_FIRST(&uz.uz_full_bucket); ubp !=
|
||||
for (ubp = LIST_FIRST(&uz.uz_buckets); ubp !=
|
||||
NULL; ubp = LIST_NEXT(&ub, ub_link)) {
|
||||
ret = kread(kvm, ubp, &ub, sizeof(ub), 0);
|
||||
mtp->mt_zonefree += ub.ub_cnt;
|
||||
|
Reference in New Issue
Block a user