diff options
author | phk <phk@FreeBSD.org> | 2003-03-07 19:09:46 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-03-07 19:09:46 +0000 |
commit | 6471cae560187b8c423042c8556bb175438a72f9 (patch) | |
tree | 6b28e491886caff07499dfa58a55c3813f793f84 /sys | |
parent | 215e222a66b9161c9e585e84e74e8afcf5fc1238 (diff) | |
download | FreeBSD-src-6471cae560187b8c423042c8556bb175438a72f9.zip FreeBSD-src-6471cae560187b8c423042c8556bb175438a72f9.tar.gz |
Limit our requests to DFLTPHYS, this is generally a good idea for
memory-allocation purposes. Right now it is also a very good idea
because we hit a Giant assertion in the free(9) processing if we
free something larger than 64k.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/geom/bde/g_bde_crypt.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/geom/bde/g_bde_crypt.c b/sys/geom/bde/g_bde_crypt.c index ec58dbf..fbaa135 100644 --- a/sys/geom/bde/g_bde_crypt.c +++ b/sys/geom/bde/g_bde_crypt.c @@ -282,6 +282,11 @@ g_bde_map_sector(struct g_bde_work *wp) /* restrict length to that zone */ len = kp->zone_cont - zoff; + + /* ... and in general */ + if (len > DFLTPHYS) + len = DFLTPHYS; + if (len < wp->length) wp->length = len; |