dynamic allocation in bsd-poll.c? - openssh

This is a discussion on dynamic allocation in bsd-poll.c? - openssh ; I'm wondering about the rationale behind the allocation of the fd_set for the select() call in bsd-poll.c. Is there a reason we're dynamically allocating the fd_sets using nmemb, rather than simply putting three fd_set variables on the stack, followed by ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: dynamic allocation in bsd-poll.c?

  1. dynamic allocation in bsd-poll.c?

    I'm wondering about the rationale behind the allocation of the fd_set
    for the select() call in bsd-poll.c.

    Is there a reason we're dynamically allocating the fd_sets using nmemb,
    rather than simply putting three fd_set variables on the stack, followed
    by FD_ZERO calls?

    This seems to make life more difficult, as evidenced by the "goto out"
    statement, needed to free the memory.



    ----
    Scott Neugroschl
    XYPRO Technologies
    scott_n@xypro.com
    805-583-2874 x121

    _______________________________________________
    openssh-unix-dev mailing list
    openssh-unix-dev@mindrot.org
    https://lists.mindrot.org/mailman/li...enssh-unix-dev


  2. Re: dynamic allocation in bsd-poll.c?

    On Mon, 11 Aug 2008, Scott Neugroschl wrote:

    > I'm wondering about the rationale behind the allocation of the fd_set
    > for the select() call in bsd-poll.c.


    Coping with num_fds > FD_SETSIZE.

    -d
    _______________________________________________
    openssh-unix-dev mailing list
    openssh-unix-dev@mindrot.org
    https://lists.mindrot.org/mailman/li...enssh-unix-dev


+ Reply to Thread