mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-22 09:43:47 +00:00
Fix bug in mb_alloc that made systems configured with
PAGE_SIZE / MCLBYTES == 1 crash. Fix them by changing the appropriate "allocate new page and bucket" code in mb_alloc to use the macro for properly grabbing an allocated object from a bucket, the one that checks whether the bucket is empty. This should allow ken to continue testing zero-copy stuff on -CURRENT. Noticed and provided debug info: ken
This commit is contained in:
parent
5b4455186e
commit
5a4f147089
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=91604
|
@ -611,9 +611,7 @@ mb_alloc(struct mb_lstmngr *mb_list, int how, short type)
|
|||
MB_UNLOCK_CONT(gen_list);
|
||||
bucket = mb_pop_cont(mb_list, how, cnt_lst);
|
||||
if (bucket != NULL) {
|
||||
bucket->mb_numfree--;
|
||||
m = bucket->mb_free[(bucket->mb_numfree)];
|
||||
(*(cnt_lst->mb_cont.mc_objcount))--;
|
||||
MB_GET_OBJECT(m, bucket, cnt_lst);
|
||||
MB_MBTYPES_INC(cnt_lst, type, 1);
|
||||
MB_UNLOCK_CONT(cnt_lst);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue