Home
last modified time | relevance | path

Searched refs:len (Results 1 – 25 of 101) sorted by relevance

12345

/redis-3.2.3/src/
H A Dlzf_c.c178 len++; if (ref [len] != ip [len]) break; in lzf_compress()
179 len++; if (ref [len] != ip [len]) break; in lzf_compress()
180 len++; if (ref [len] != ip [len]) break; in lzf_compress()
181 len++; if (ref [len] != ip [len]) break; in lzf_compress()
183 len++; if (ref [len] != ip [len]) break; in lzf_compress()
184 len++; if (ref [len] != ip [len]) break; in lzf_compress()
185 len++; if (ref [len] != ip [len]) break; in lzf_compress()
186 len++; if (ref [len] != ip [len]) break; in lzf_compress()
188 len++; if (ref [len] != ip [len]) break; in lzf_compress()
189 len++; if (ref [len] != ip [len]) break; in lzf_compress()
[all …]
H A Drio.c63 r->io.buffer.pos += len; in rioBufferWrite()
72 r->io.buffer.pos += len; in rioBufferRead()
113 r->io.file.buffered += len; in rioFileWrite()
177 if (len) { in rioFdsetWrite()
185 len = sdslen(r->io.fdset.buf); in rioFdsetWrite()
191 while(len) { in rioFdsetWrite()
192 size_t count = len < 1024 ? len : 1024; in rioFdsetWrite()
225 len -= count; in rioFdsetWrite()
237 UNUSED(len); in rioFdsetRead()
330 if (len > 0 && rioWrite(r,buf,len) == 0) return 0; in rioWriteBulkString()
[all …]
H A Dsds.c204 len = sdslen(s); in sdsMakeRoomFor()
314 size_t len; in sdsIncrLen() local
327 len = (sh->len += incr); in sdsIncrLen()
333 len = (sh->len += incr); in sdsIncrLen()
339 len = (sh->len += incr); in sdsIncrLen()
345 len = (sh->len += incr); in sdsIncrLen()
350 s[len] = '\0'; in sdsIncrLen()
411 s[len] = '\0'; in sdscpylen()
685 size_t len; in sdstrim() local
693 s[len] = '\0'; in sdstrim()
[all …]
H A Drio.h43 size_t (*read)(struct _rio *, void *buf, size_t len);
44 size_t (*write)(struct _rio *, const void *buf, size_t len);
94 while (len) { in rioWrite()
95 …write = (r->max_processing_chunk && r->max_processing_chunk < len) ? r->max_processing_chunk : len; in rioWrite()
100 len -= bytes_to_write; in rioWrite()
106 static inline size_t rioRead(rio *r, void *buf, size_t len) { in rioRead() argument
107 while (len) { in rioRead()
108 …_read = (r->max_processing_chunk && r->max_processing_chunk < len) ? r->max_processing_chunk : len; in rioRead()
113 len -= bytes_to_read; in rioRead()
134 size_t rioWriteBulkString(rio *r, const char *buf, size_t len);
[all …]
H A Dsds.h51 uint8_t len; /* used */ member
57 uint16_t len; /* used */ member
63 uint32_t len; /* used */ member
69 uint64_t len; /* used */ member
92 return SDS_HDR(8,s)->len; in sdslen()
94 return SDS_HDR(16,s)->len; in sdslen()
96 return SDS_HDR(32,s)->len; in sdslen()
98 return SDS_HDR(64,s)->len; in sdslen()
164 SDS_HDR(8,s)->len += inc; in sdsinclen()
167 SDS_HDR(16,s)->len += inc; in sdsinclen()
[all …]
H A Dlzf_d.c104 unsigned int len = ctrl >> 5; in lzf_decompress() local
115 if (len == 7) in lzf_decompress()
117 len += *ip++; in lzf_decompress()
129 if (op + len + 2 > out_end) in lzf_decompress()
142 len += 2; in lzf_decompress()
143 lzf_movsb (op, ref, len); in lzf_decompress()
145 switch (len) in lzf_decompress()
148 len += 2; in lzf_decompress()
150 if (op >= ref + len) in lzf_decompress()
154 op += len; in lzf_decompress()
[all …]
H A Drdb.c57 int len; in rdbCheckThenExit() local
62 vsnprintf(msg+len,sizeof(msg)-len,reason,ap); in rdbCheckThenExit()
78 return len; in rdbWriteRaw()
133 len = htonl(len); in rdbSaveLen()
145 uint32_t len; in rdbLoadLen() local
252 if (strlen(buf) != len || memcmp(buf,s,len)) return 0; in rdbTryIntegerEncoding()
441 if (len && rioRead(rdb,o->ptr,len) == 0) { in rdbGenericLoadStringObject()
448 if (len && rioRead(rdb,buf,len) == 0) { in rdbGenericLoadStringObject()
474 int len; in rdbSaveDoubleValue() local
696 return len; in rdbSavedObjectLen()
[all …]
H A Dziplist.c208 len += 1; in zipEncodeLength()
213 len += 4; in zipEncodeLength()
229 return len; in zipEncodeLength()
264 return (len < ZIP_BIGLEN) ? 1 : sizeof(len)+1; in zipPrevEncodeLength()
271 memcpy(p+1,&len,sizeof(len)); in zipPrevEncodeLength()
283 memcpy(p+1,&len,sizeof(len)); in zipPrevEncodeLengthForceLarge()
1011 len++; in ziplistLen()
1017 return len; in ziplistLen()
1190 while(p < len) in randstring()
1192 return len; in randstring()
[all …]
H A Dzipmap.c106 unsigned int len = *p; in zipmapDecodeLength() local
108 if (len < ZIPMAP_BIGLEN) return len; in zipmapDecodeLength()
110 memrev32ifbe(&len); in zipmapDecodeLength()
111 return len; in zipmapDecodeLength()
121 p[0] = len; in zipmapEncodeLength()
125 memcpy(p+1,&len,sizeof(len)); in zipmapEncodeLength()
203 zm = zrealloc(zm, len); in zipmapResize()
351 unsigned int len = 0; in zipmapLen() local
353 len = zm[0]; in zipmapLen()
359 if (len < ZIPMAP_BIGLEN) zm[0] = len; in zipmapLen()
[all …]
H A Dredis-benchmark.c468 c = createClient(cmd,len,NULL); in benchmark()
651 int len; in main() local
711 benchmark(title,cmd,len); in main()
735 benchmark("SET",cmd,len); in main()
741 benchmark("GET",cmd,len); in main()
747 benchmark("INCR",cmd,len); in main()
753 benchmark("LPUSH",cmd,len); in main()
765 benchmark("LPOP",cmd,len); in main()
771 benchmark("RPOP",cmd,len); in main()
778 benchmark("SADD",cmd,len); in main()
[all …]
H A Dobject.c70 sh->len = len; in createEmbeddedStringObject()
71 sh->alloc = len; in createEmbeddedStringObject()
75 sh->buf[len] = '\0'; in createEmbeddedStringObject()
121 int len; in createStringObjectFromLongDouble() local
128 len = 3; in createStringObjectFromLongDouble()
131 len = 4; in createStringObjectFromLongDouble()
145 len--; in createStringObjectFromLongDouble()
364 size_t len; in tryObjectEncoding() local
385 len = sdslen(s); in tryObjectEncoding()
386 if (len <= 20 && string2l(s,len,&value)) { in tryObjectEncoding()
[all …]
H A Dutil.c417 len = snprintf(buf,len,"nan"); in d2string()
420 len = snprintf(buf,len,"-inf"); in d2string()
422 len = snprintf(buf,len,"inf"); in d2string()
426 len = snprintf(buf,len,"-0"); in d2string()
428 len = snprintf(buf,len,"0"); in d2string()
443 len = ll2string(buf,len,(long long)value); in d2string()
446 len = snprintf(buf,len,"%.17g",value); in d2string()
449 return len; in d2string()
477 while(len) { in getRandomHexChars()
480 unsigned int copylen = len > 20 ? 20 : len; in getRandomHexChars()
[all …]
H A Dmemtest.c303 if (len/4096 % 2) len -= 4096; in memtest_preserving_test()
305 memcpy(backup,p,len); /* Backup. */ in memtest_preserving_test()
308 errors += memtest_addressing(p,len,0); in memtest_preserving_test()
309 memtest_fill_random(p,len,0); in memtest_preserving_test()
314 errors += memtest_compare_times(p,len,pass,4,0); in memtest_preserving_test()
315 memtest_fill_value(p,len,0,(unsigned long)-1,'S',0); in memtest_preserving_test()
320 errors += memtest_compare_times(p,len,pass,4,0); in memtest_preserving_test()
326 errors += memtest_compare_times(p,len,pass,4,0); in memtest_preserving_test()
328 memcpy(p,backup,len); /* Restore. */ in memtest_preserving_test()
329 left -= len; in memtest_preserving_test()
[all …]
/redis-3.2.3/deps/lua/src/
H A Dstrbuf.h52 extern strbuf_t *strbuf_new(int len);
97 if (len > strbuf_empty_length(s)) in strbuf_ensure_empty_length()
98 strbuf_resize(s, s->length + len); in strbuf_ensure_empty_length()
108 s->length += len; in strbuf_extend_length()
129 strbuf_ensure_empty_length(s, len); in strbuf_append_mem()
130 memcpy(s->buf + s->length, c, len); in strbuf_append_mem()
131 s->length += len; in strbuf_append_mem()
136 memcpy(s->buf + s->length, c, len); in strbuf_append_mem_unsafe()
137 s->length += len; in strbuf_append_mem_unsafe()
147 if (len) in strbuf_string()
[all …]
H A Dlua_cmsgpack.c77 len /= 2; in memrevifle()
78 while(len--) { in memrevifle()
120 size_t newsize = (buf->len+len)*2; in mp_buf_append()
125 memcpy(buf->b+buf->len,s,len); in mp_buf_append()
126 buf->len += len; in mp_buf_append()
178 if (len < 32) { in mp_encode_bytes()
342 size_t len; in mp_encode_lua_string() local
406 len++; in mp_encode_lua_table_as_map()
550 while(len--) { in mp_decode_to_lua_array()
561 while(len--) { in mp_decode_to_lua_hash()
[all …]
H A Dstrbuf.c44 void strbuf_init(strbuf_t *s, int len) in strbuf_init() argument
48 if (len <= 0) in strbuf_init()
68 strbuf_t *strbuf_new(int len) in strbuf_new() argument
76 strbuf_init(s, len); in strbuf_new()
125 if (len) in strbuf_free_to_string()
126 *len = s->length; in strbuf_free_to_string()
138 if (len <= 0) in calculate_new_size()
142 reqsize = len + 1; in calculate_new_size()
164 void strbuf_resize(strbuf_t *s, int len) in strbuf_resize() argument
168 newsize = calculate_new_size(s, len); in strbuf_resize()
[all …]
/redis-3.2.3/deps/linenoise/
H A Dlinenoise.c369 ls->len = saved.len; in completeLine()
453 int len; member
462 char *new = realloc(ab->b,ab->len+len); in abAppend()
465 memcpy(new+ab->len,s,len); in abAppend()
467 ab->len += len; in abAppend()
507 size_t len = l->len; in refreshSingleLine() local
513 len--; in refreshSingleLine()
517 len--; in refreshSingleLine()
725 if (l->len > 0 && l->pos < l->len) { in linenoiseEditDelete()
781 l.len = 0; in linenoiseEdit()
[all …]
/redis-3.2.3/deps/hiredis/
H A Dsds.c204 len = sdslen(s); in sdsMakeRoomFor()
314 size_t len; in sdsIncrLen() local
327 len = (sh->len += incr); in sdsIncrLen()
333 len = (sh->len += incr); in sdsIncrLen()
339 len = (sh->len += incr); in sdsIncrLen()
345 len = (sh->len += incr); in sdsIncrLen()
350 s[len] = '\0'; in sdsIncrLen()
411 s[len] = '\0'; in sdscpylen()
685 size_t len; in sdstrim() local
693 s[len] = '\0'; in sdstrim()
[all …]
H A Dsds.h51 uint8_t len; /* used */ member
57 uint16_t len; /* used */ member
63 uint32_t len; /* used */ member
69 uint64_t len; /* used */ member
92 return SDS_HDR(8,s)->len; in sdslen()
94 return SDS_HDR(16,s)->len; in sdslen()
96 return SDS_HDR(32,s)->len; in sdslen()
98 return SDS_HDR(64,s)->len; in sdslen()
164 SDS_HDR(8,s)->len += inc; in sdsinclen()
167 SDS_HDR(16,s)->len += inc; in sdsinclen()
[all …]
H A Dhiredis.c119 r->len = len; in createStringObject()
187 size_t len; in __redisReaderSetError() local
207 len = len < (sizeof(r->errstr)-1) ? len : (sizeof(r->errstr)-1); in __redisReaderSetError()
317 int len; in readLine() local
359 int len; in processLineItem() local
393 long len; in processBulkItem() local
683 return 1+intlen(len)+2+len+2; in bulklen()
927 int len; in redisFormatCommand() local
979 len = len < (sizeof(c->errstr)-1) ? len : (sizeof(c->errstr)-1); in __redisSetError()
1271 int len; in redisvAppendCommand() local
[all …]
H A Dtest.c118 int len; in test_format_commands() local
123 len == 4+4+(3+2)+4+(3+2)+4+(3+2)); in test_format_commands()
129 len == 4+4+(3+2)+4+(3+2)+4+(3+2)); in test_format_commands()
135 len == 4+4+(3+2)+4+(3+2)+4+(0+2)); in test_format_commands()
141 len == 4+4+(3+2)+4+(0+2)+4+(3+2)); in test_format_commands()
147 len == 4+4+(3+2)+4+(3+2)+4+(3+2)); in test_format_commands()
153 len == 4+4+(3+2)+4+(3+2)+4+(0+2)); in test_format_commands()
159 len == 4+4+(3+2)+4+(1+2)+4+(1+2)); in test_format_commands()
198 test_cond(len == -1); in test_format_commands()
224 int len; in test_append_formatted_commands() local
[all …]
/redis-3.2.3/deps/jemalloc/include/jemalloc/internal/
H A Dhash.h89 hash_x86_32(const void *key, int len, uint32_t seed) in hash_x86_32() argument
92 const int nblocks = len / 4; in hash_x86_32()
123 switch (len & 3) { in hash_x86_32()
132 h1 ^= len; in hash_x86_32()
144 const int nblocks = len / 16; in hash_x86_128()
197 switch (len & 15) { in hash_x86_128()
224 h1 ^= len; h2 ^= len; h3 ^= len; h4 ^= len; in hash_x86_128()
246 const int nblocks = len / 16; in hash_x64_128()
281 switch (len & 15) { in hash_x64_128()
304 h1 ^= len; h2 ^= len; in hash_x64_128()
[all …]
/redis-3.2.3/utils/
H A Dredis-sha1.rb21 len = 1
25 len = r.llen(k)
26 if len != 0
31 len = r.scard(k)
32 if len != 0
37 len = r.zcard(k)
38 if len != 0
/redis-3.2.3/tests/unit/
H A Dslowlog.tcl3 r slowlog len
9 assert_equal [r slowlog len] 0
11 assert_equal [r slowlog len] 1
20 r slowlog len
23 test {SLOWLOG - GET optional argument to limit output len works} {
30 r slowlog len
62 assert_equal [r slowlog len] 0
66 assert_equal [r slowlog len] 1
H A Daofrw.tcl83 set len 1000
84 for {set j 0} {$j < $len} {incr j} {
109 if {$e eq {intset}} {set len 10} else {set len 1000}
110 for {set j 0} {$j < $len} {incr j} {
137 if {$e eq {ziplist}} {set len 10} else {set len 1000}
138 for {set j 0} {$j < $len} {incr j} {
163 if {$e eq {ziplist}} {set len 10} else {set len 1000}
164 for {set j 0} {$j < $len} {incr j} {

12345