bytevector size for doing select has been fixed. It used to be 8

times larger than needed.
This commit is contained in:
Abdulaziz Ghuloum 2008-06-06 08:22:45 -07:00
parent df4b31af1f
commit 9438328f55
2 changed files with 47 additions and 46 deletions

View File

@ -2208,9 +2208,10 @@
(define (do-select)
(let ([n (add1 (get-max-fd))])
(let ([rbv (make-bytevector n 0)]
[wbv (make-bytevector n 0)]
[xbv (make-bytevector n 0)])
(let ([vecsize (div (+ n 7) 8)])
(let ([rbv (make-bytevector vecsize 0)]
[wbv (make-bytevector vecsize 0)]
[xbv (make-bytevector vecsize 0)])
;;; add all fds to their bytevectors depending on type
(for-each
(lambda (t)
@ -2252,7 +2253,7 @@
(set! in-queue (cons t in-queue))])))))
(let ([ls pending])
(set! pending '())
ls)))))
ls))))))
)

View File

@ -1 +1 @@
1500
1501