mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
reduce realpath_cache_bucket size by 8 bytes on 64-bit
This limits the path length to 64kb which is already far above the use case. In return, the whole path cache storage size is reduced by 8kb.
This commit is contained in:
parent
882bcb7240
commit
4d790486b8
2 changed files with 8 additions and 8 deletions
|
@ -648,7 +648,7 @@ static inline void realpath_cache_add(const char *path, int path_len, const char
|
||||||
memcpy(bucket->realpath, realpath, realpath_len+1);
|
memcpy(bucket->realpath, realpath, realpath_len+1);
|
||||||
}
|
}
|
||||||
bucket->realpath_len = realpath_len;
|
bucket->realpath_len = realpath_len;
|
||||||
bucket->is_dir = is_dir;
|
bucket->is_dir = is_dir > 0;
|
||||||
#ifdef ZEND_WIN32
|
#ifdef ZEND_WIN32
|
||||||
bucket->is_rvalid = 0;
|
bucket->is_rvalid = 0;
|
||||||
bucket->is_readable = 0;
|
bucket->is_readable = 0;
|
||||||
|
|
|
@ -204,14 +204,14 @@ typedef struct _realpath_cache_bucket {
|
||||||
char *realpath;
|
char *realpath;
|
||||||
struct _realpath_cache_bucket *next;
|
struct _realpath_cache_bucket *next;
|
||||||
time_t expires;
|
time_t expires;
|
||||||
int path_len;
|
uint16_t path_len;
|
||||||
int realpath_len;
|
uint16_t realpath_len;
|
||||||
int is_dir;
|
uint8_t is_dir:1;
|
||||||
#ifdef ZEND_WIN32
|
#ifdef ZEND_WIN32
|
||||||
unsigned char is_rvalid;
|
uint8_t is_rvalid:1;
|
||||||
unsigned char is_readable;
|
uint8_t is_readable:1;
|
||||||
unsigned char is_wvalid;
|
uint8_t is_wvalid:1;
|
||||||
unsigned char is_writable;
|
uint8_t is_writable:1;
|
||||||
#endif
|
#endif
|
||||||
} realpath_cache_bucket;
|
} realpath_cache_bucket;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue