diff options
author | dg <dg@FreeBSD.org> | 1997-12-04 07:29:17 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1997-12-04 07:29:17 +0000 |
commit | 2214184fec81375cfc3d2d8efc4b57ef98780cfb (patch) | |
tree | 9b05d8a38f34cbc34e950a0f9a068ccdc3fe61aa | |
parent | 4731a2caff98f86c207a8acecc767df0c74c01ec (diff) | |
download | FreeBSD-src-2214184fec81375cfc3d2d8efc4b57ef98780cfb.zip FreeBSD-src-2214184fec81375cfc3d2d8efc4b57ef98780cfb.tar.gz |
shuffle structs for better cacheline behavior.
-rw-r--r-- | sys/sys/malloc.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/sys/malloc.h b/sys/sys/malloc.h index cf7ef0e..f0c31f4 100644 --- a/sys/sys/malloc.h +++ b/sys/sys/malloc.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)malloc.h 8.5 (Berkeley) 5/3/95 - * $Id: malloc.h,v 1.30 1997/10/12 20:25:59 phk Exp $ + * $Id: malloc.h,v 1.31 1997/10/28 19:01:02 phk Exp $ */ #ifndef _SYS_MALLOC_H_ @@ -49,17 +49,17 @@ #define M_MAGIC 877983977 /* time when first defined :-) */ struct malloc_type { - const char * const ks_shortdesc; /* Short description */ - u_long ks_magic; /* If if's not magic, don't touch it */ struct malloc_type *ks_next; /* Next pointer */ + long ks_memuse; /* total memory held in bytes */ + long ks_limit; /* most that are allowed to exist */ + long ks_size; /* sizes of this thing that are allocated */ long ks_inuse; /* # of packets of this type currently in use */ long ks_calls; /* total packets of this type ever allocated */ - long ks_memuse; /* total memory held in bytes */ + long ks_maxused; /* maximum number ever used */ + u_long ks_magic; /* If if's not magic, don't touch it */ + const char * const ks_shortdesc; /* Short description */ u_short ks_limblocks; /* number of times blocked for hitting limit */ u_short ks_mapblocks; /* number of times blocked for kernel map */ - long ks_maxused; /* maximum number ever used */ - long ks_limit; /* most that are allowed to exist */ - long ks_size; /* sizes of this thing that are allocated */ }; #define MALLOC_DEFINE(type, shortdesc, longdesc) \ @@ -101,10 +101,10 @@ struct kmemusage { struct kmembuckets { caddr_t kb_next; /* list of free blocks */ caddr_t kb_last; /* last free block */ - long kb_calls; /* total calls to allocate this size */ long kb_total; /* total number of blocks allocated */ - long kb_totalfree; /* # of free elements in this bucket */ long kb_elmpercl; /* # of elements in this sized allocation */ + long kb_totalfree; /* # of free elements in this bucket */ + long kb_calls; /* total calls to allocate this size */ long kb_highwat; /* high water mark */ long kb_couldfree; /* over high water mark and could free */ }; |