Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bizarre x86 segment layout problem causing select() slowdown: solved, sort of



Dave Hayden wrote:

>Looking at the code again, I noticed this in the socket setup code:
>
>	setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (void*)32768, sizeof(int));
>
>Now, I could swear when I added that line the default buffer was less
>than 32K, but in 10.4.8 the default appears to be 64K. When I replace
>32768 with 65535, the problem goes away.

Another point: 65535 isn't 64K, it's 64K - 1.  That means it's odd.

32768, OTOH, is even, so it's possible the odd address was quietly ignored,
while the even one was accepted.  Also plausible is that the int at address
65535 differs substantially from that at 32768, alignment issues aside.

  -- GG


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.