diff options
author | jeff <jeff@FreeBSD.org> | 2002-09-18 08:26:30 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2002-09-18 08:26:30 +0000 |
commit | aeb98331c1a874e05cc0e4d1ab335e18db4fced3 (patch) | |
tree | feefa57915c5e60939c1c6cc8fe31011cf7d6971 /sys/vm/uma.h | |
parent | 705073e549c7036c4006757ad236734705c8778d (diff) | |
download | FreeBSD-src-aeb98331c1a874e05cc0e4d1ab335e18db4fced3.zip FreeBSD-src-aeb98331c1a874e05cc0e4d1ab335e18db4fced3.tar.gz |
- Split UMA_ZFLAG_OFFPAGE into UMA_ZFLAG_OFFPAGE and UMA_ZFLAG_HASH.
- Remove all instances of the mallochash.
- Stash the slab pointer in the vm page's object pointer when allocating from
the kmem_obj.
- Use the overloaded object pointer to find slabs for malloced memory.
Diffstat (limited to 'sys/vm/uma.h')
-rw-r--r-- | sys/vm/uma.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/sys/vm/uma.h b/sys/vm/uma.h index 4e8585b..5c57e89 100644 --- a/sys/vm/uma.h +++ b/sys/vm/uma.h @@ -173,7 +173,14 @@ uma_zone_t uma_zcreate(char *name, size_t size, uma_ctor ctor, uma_dtor dtor, #define UMA_ZONE_MALLOC 0x0010 /* For use by malloc(9) only! */ #define UMA_ZONE_NOFREE 0x0020 /* Do not free slabs of this type! */ #define UMA_ZONE_MTXCLASS 0x0040 /* Create a new lock class */ -#define UMA_ZONE_VM 0x0080 /* Used for internal vm datastructures */ +#define UMA_ZONE_VM 0x0080 /* + * Used for internal vm datastructures + * only. + */ +#define UMA_ZONE_HASH 0x0100 /* + * Use a hash table instead of caching + * information in the vm_page. + */ /* Definitions for align */ #define UMA_ALIGN_PTR (sizeof(void *) - 1) /* Alignment fit for ptr */ @@ -309,18 +316,16 @@ void uma_startup(void *bootmem); * be called when kva is ready for normal allocs. * * Arguments: - * hash An area of memory that will become the malloc hash - * elems The number of elements in this array + * None * * Returns: * Nothing * * Discussion: - * uma_startup2 is called by kmeminit() to prepare the malloc - * hash bucket, and enable use of uma for malloc ops. + * uma_startup2 is called by kmeminit() to enable us of uma for malloc. */ -void uma_startup2(void *hash, u_long elems); +void uma_startup2(void); /* * Reclaims unused memory for all zones |