diff options
author | jeff <jeff@FreeBSD.org> | 2003-09-19 08:37:44 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2003-09-19 08:37:44 +0000 |
commit | 30f275bb51052e65e8026d2e1d80eb711f88f029 (patch) | |
tree | 644475a574eabecce93510f93324e58118426825 /sys/vm/uma.h | |
parent | 758f95abc69f45ea012ea1848903bf92b5361f92 (diff) | |
download | FreeBSD-src-30f275bb51052e65e8026d2e1d80eb711f88f029.zip FreeBSD-src-30f275bb51052e65e8026d2e1d80eb711f88f029.tar.gz |
- 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.
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 769d81a..4de1efa 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 */ |