diff options
author | Jeff Roberson <jeff@FreeBSD.org> | 2003-09-19 08:37:44 +0000 |
---|---|---|
committer | Jeff Roberson <jeff@FreeBSD.org> | 2003-09-19 08:37:44 +0000 |
commit | b60f5b794e09af3ee38d3e5419938282efa8805c (patch) | |
tree | 644475a574eabecce93510f93324e58118426825 /sys/vm/uma.h | |
parent | d6c3e38bb23413122228fdbf4f1946ddad104830 (diff) | |
download | src-b60f5b794e09af3ee38d3e5419938282efa8805c.tar.gz src-b60f5b794e09af3ee38d3e5419938282efa8805c.zip |
- Fix the silly flag situation in UMA. Remove redundant ZFLAG/ZONE flags
by accepting the user supplied flags directly. Previously this was not
done so that flags for the same field would not be defined in two
different files. Add comments in each header instructing future
developers on how now to shoot their feet.
- Fix a test for !OFFPAGE which should have been a test for HASH. This would
have caused a panic if we had ever destructed a malloc zone. This also
opens up the possibility that other zones could use the vsetobj() method
rather than a hash.
Notes
Notes:
svn path=/head/; revision=120223
Diffstat (limited to 'sys/vm/uma.h')
-rw-r--r-- | sys/vm/uma.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/vm/uma.h b/sys/vm/uma.h index 769d81af4d12..4de1efadf0ad 100644 --- a/sys/vm/uma.h +++ b/sys/vm/uma.h @@ -162,7 +162,12 @@ uma_zone_t uma_zcreate(char *name, size_t size, uma_ctor ctor, uma_dtor dtor, uma_init uminit, uma_fini fini, int align, u_int16_t flags); -/* Definitions for uma_zcreate flags */ +/* + * Definitions for uma_zcreate flags + * + * These flags share space with UMA_ZFLAGs in uma_int.h. Be careful not to + * overlap when adding new features. 0xf000 is in use by uma_int.h. + */ #define UMA_ZONE_PAGEABLE 0x0001 /* Return items not fully backed by physical memory XXX Not yet */ #define UMA_ZONE_ZINIT 0x0002 /* Initialize with zeros */ |