зеркало из https://github.com/mozilla/gecko-dev.git
Mac only I/O buffer size increases
This commit is contained in:
Родитель
da4a394f63
Коммит
976bf283da
|
@ -68,7 +68,7 @@ extern int MK_OUT_OF_MEMORY;
|
|||
#ifdef XP_WIN16
|
||||
#define MAX_MEMORY_ALLOC_SIZE 32767 /* MAXINT */
|
||||
#elif defined(XP_MAC)
|
||||
#define MAX_MEMORY_ALLOC_SIZE 12*1024
|
||||
#define MAX_MEMORY_ALLOC_SIZE 64*1024
|
||||
#else
|
||||
#define MAX_MEMORY_ALLOC_SIZE (((unsigned) (~0) << 1) >> 1) /* MAXINT */
|
||||
|
||||
|
@ -81,7 +81,7 @@ extern int MK_OUT_OF_MEMORY;
|
|||
* the cache object in memory
|
||||
*/
|
||||
#ifdef XP_MAC
|
||||
#define MEMORY_CACHE_SEGMENT_SIZE 12*1024
|
||||
#define MEMORY_CACHE_SEGMENT_SIZE 64*1024
|
||||
#else
|
||||
#define MEMORY_CACHE_SEGMENT_SIZE 2048
|
||||
#endif
|
||||
|
|
|
@ -119,11 +119,18 @@ NET_ChangeSocketBufferSize (int size)
|
|||
{
|
||||
NET_Socket_Buffer_Size = 0;
|
||||
|
||||
if(size < 1)
|
||||
size = 10*1024; /* default */
|
||||
#if !defined(XP_MAC)
|
||||
if(size < 1)
|
||||
size = 10*1024; /* default */
|
||||
|
||||
if(size > 31*1024)
|
||||
size = 31*1024;
|
||||
#else
|
||||
/* On the Mac we want a biiiig buffer */
|
||||
if (size < 1 || size > 64*1024)
|
||||
size = 64*1024;
|
||||
#endif /* XP_MAC */
|
||||
|
||||
if(size > 31*1024)
|
||||
size = 31*1024;
|
||||
|
||||
#if defined(XP_UNIX) && defined(XP_BSD_UNIX)
|
||||
FREEIF(net_real_socket_buffer_ptr);
|
||||
|
@ -134,7 +141,7 @@ NET_ChangeSocketBufferSize (int size)
|
|||
#endif /* XP_UNIX */
|
||||
|
||||
if(!NET_Socket_Buffer)
|
||||
return(0);
|
||||
return(0);
|
||||
|
||||
/* else */
|
||||
NET_Socket_Buffer_Size = size;
|
||||
|
|
Загрузка…
Ссылка в новой задаче