diff --git a/README.md b/README.md index 2be75b7..f5b3a7d 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ## Redis version -Nov/26/2018 **Redis 5.0.2** +Dec/18/2018 **Redis 5.0.3** ## Description @@ -55,7 +55,7 @@ repositories { } dependencies { - compile 'io.wf9a5m75:redis-android:1.1.3' + compile 'io.wf9a5m75:redis-android:1.1.4' } ``` @@ -173,6 +173,7 @@ OK | Redis version | redis-android version | |---------------|-----------------------| +| Redis 5.0.3 | v1.1.4 | | Redis 5.0.2 | v1.1.3 | | Redis 5.0.1 | v1.1.1 - v1.1.2 | | Redis 5.0.0 | v1.1.0 | diff --git a/redis-android/build.gradle b/redis-android/build.gradle index 4706e28..a05e431 100644 --- a/redis-android/build.gradle +++ b/redis-android/build.gradle @@ -36,7 +36,7 @@ uploadArchives { repositories { mavenDeployer { repository url: "file://${repo.absolutePath}" - pom.version = "1.1.3" + pom.version = "1.1.4" pom.groupId = "io.wf9a5m75" pom.artifactId = "redis-android" } diff --git a/redis-android/make_zip.sh b/redis-android/make_zip.sh new file mode 100755 index 0000000..814ce95 --- /dev/null +++ b/redis-android/make_zip.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +CWD=$(pwd) +pushd src/main/obj/local/ +for dir in "arm64-v8a" "armeabi-v7a" "x86" "x86_64"; do + find ${dir} -name "redis-*" -type f -d 1 -print | zip "${CWD}/release_zip/${dir}.zip" -@ +done +popd diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/INSTALL b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/INSTALL deleted file mode 100644 index 8d39687..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/INSTALL +++ /dev/null @@ -1,402 +0,0 @@ -Building and installing a packaged release of jemalloc can be as simple as -typing the following while in the root directory of the source tree: - - ./configure - make - make install - -If building from unpackaged developer sources, the simplest command sequence -that might work is: - - ./autogen.sh - make dist - make - make install - -Note that documentation is not built by the default target because doing so -would create a dependency on xsltproc in packaged releases, hence the -requirement to either run 'make dist' or avoid installing docs via the various -install_* targets documented below. - -=== Advanced configuration ===================================================== - -The 'configure' script supports numerous options that allow control of which -functionality is enabled, where jemalloc is installed, etc. Optionally, pass -any of the following arguments (not a definitive list) to 'configure': - ---help - Print a definitive list of options. - ---prefix= - Set the base directory in which to install. For example: - - ./configure --prefix=/usr/local - - will cause files to be installed into /usr/local/include, /usr/local/lib, - and /usr/local/man. - ---with-rpath= - Embed one or more library paths, so that libjemalloc can find the libraries - it is linked to. This works only on ELF-based systems. - ---with-mangling= - Mangle public symbols specified in which is a comma-separated list of - name:mangled pairs. - - For example, to use ld's --wrap option as an alternative method for - overriding libc's malloc implementation, specify something like: - - --with-mangling=malloc:__wrap_malloc,free:__wrap_free[...] - - Note that mangling happens prior to application of the prefix specified by - --with-jemalloc-prefix, and mangled symbols are then ignored when applying - the prefix. - ---with-jemalloc-prefix= - Prefix all public APIs with . For example, if is - "prefix_", API changes like the following occur: - - malloc() --> prefix_malloc() - malloc_conf --> prefix_malloc_conf - /etc/malloc.conf --> /etc/prefix_malloc.conf - MALLOC_CONF --> PREFIX_MALLOC_CONF - - This makes it possible to use jemalloc at the same time as the system - allocator, or even to use multiple copies of jemalloc simultaneously. - - By default, the prefix is "", except on OS X, where it is "je_". On OS X, - jemalloc overlays the default malloc zone, but makes no attempt to actually - replace the "malloc", "calloc", etc. symbols. - ---without-export - Don't export public APIs. This can be useful when building jemalloc as a - static library, or to avoid exporting public APIs when using the zone - allocator on OSX. - ---with-private-namespace= - Prefix all library-private APIs with je_. For shared libraries, - symbol visibility mechanisms prevent these symbols from being exported, but - for static libraries, naming collisions are a real possibility. By - default, is empty, which results in a symbol prefix of je_ . - ---with-install-suffix= - Append to the base name of all installed files, such that multiple - versions of jemalloc can coexist in the same installation directory. For - example, libjemalloc.so.0 becomes libjemalloc.so.0. - ---disable-cc-silence - Disable code that silences non-useful compiler warnings. This is mainly - useful during development when auditing the set of warnings that are being - silenced. - ---enable-debug - Enable assertions and validation code. This incurs a substantial - performance hit, but is very useful during application development. - Implies --enable-ivsalloc. - ---enable-code-coverage - Enable code coverage support, for use during jemalloc test development. - Additional testing targets are available if this option is enabled: - - coverage - coverage_unit - coverage_integration - coverage_stress - - These targets do not clear code coverage results from previous runs, and - there are interactions between the various coverage targets, so it is - usually advisable to run 'make clean' between repeated code coverage runs. - ---disable-stats - Disable statistics gathering functionality. See the "opt.stats_print" - option documentation for usage details. - ---enable-ivsalloc - Enable validation code, which verifies that pointers reside within - jemalloc-owned chunks before dereferencing them. This incurs a minor - performance hit. - ---enable-prof - Enable heap profiling and leak detection functionality. See the "opt.prof" - option documentation for usage details. When enabled, there are several - approaches to backtracing, and the configure script chooses the first one - in the following list that appears to function correctly: - - + libunwind (requires --enable-prof-libunwind) - + libgcc (unless --disable-prof-libgcc) - + gcc intrinsics (unless --disable-prof-gcc) - ---enable-prof-libunwind - Use the libunwind library (http://www.nongnu.org/libunwind/) for stack - backtracing. - ---disable-prof-libgcc - Disable the use of libgcc's backtracing functionality. - ---disable-prof-gcc - Disable the use of gcc intrinsics for backtracing. - ---with-static-libunwind= - Statically link against the specified libunwind.a rather than dynamically - linking with -lunwind. - ---disable-tcache - Disable thread-specific caches for small objects. Objects are cached and - released in bulk, thus reducing the total number of mutex operations. See - the "opt.tcache" option for usage details. - ---disable-munmap - Disable virtual memory deallocation via munmap(2); instead keep track of - the virtual memory for later use. munmap() is disabled by default (i.e. - --disable-munmap is implied) on Linux, which has a quirk in its virtual - memory allocation algorithm that causes semi-permanent VM map holes under - normal jemalloc operation. - ---disable-fill - Disable support for junk/zero filling of memory, quarantine, and redzones. - See the "opt.junk", "opt.zero", "opt.quarantine", and "opt.redzone" option - documentation for usage details. - ---disable-valgrind - Disable support for Valgrind. - ---disable-zone-allocator - Disable zone allocator for Darwin. This means jemalloc won't be hooked as - the default allocator on OSX/iOS. - ---enable-utrace - Enable utrace(2)-based allocation tracing. This feature is not broadly - portable (FreeBSD has it, but Linux and OS X do not). - ---enable-xmalloc - Enable support for optional immediate termination due to out-of-memory - errors, as is commonly implemented by "xmalloc" wrapper function for malloc. - See the "opt.xmalloc" option documentation for usage details. - ---enable-lazy-lock - Enable code that wraps pthread_create() to detect when an application - switches from single-threaded to multi-threaded mode, so that it can avoid - mutex locking/unlocking operations while in single-threaded mode. In - practice, this feature usually has little impact on performance unless - thread-specific caching is disabled. - ---disable-tls - Disable thread-local storage (TLS), which allows for fast access to - thread-local variables via the __thread keyword. If TLS is available, - jemalloc uses it for several purposes. - ---disable-cache-oblivious - Disable cache-oblivious large allocation alignment for large allocation - requests with no alignment constraints. If this feature is disabled, all - large allocations are page-aligned as an implementation artifact, which can - severely harm CPU cache utilization. However, the cache-oblivious layout - comes at the cost of one extra page per large allocation, which in the - most extreme case increases physical memory usage for the 16 KiB size class - to 20 KiB. - ---with-xslroot= - Specify where to find DocBook XSL stylesheets when building the - documentation. - ---with-lg-page= - Specify the base 2 log of the system page size. This option is only useful - when cross compiling, since the configure script automatically determines - the host's page size by default. - ---with-lg-page-sizes= - Specify the comma-separated base 2 logs of the page sizes to support. This - option may be useful when cross-compiling in combination with - --with-lg-page, but its primary use case is for integration with FreeBSD's - libc, wherein jemalloc is embedded. - ---with-lg-size-class-group= - Specify the base 2 log of how many size classes to use for each doubling in - size. By default jemalloc uses =2, which results in - e.g. the following size classes: - - [...], 64, - 80, 96, 112, 128, - 160, [...] - - =3 results in e.g. the following size classes: - - [...], 64, - 72, 80, 88, 96, 104, 112, 120, 128, - 144, [...] - - The minimal =0 causes jemalloc to only provide size - classes that are powers of 2: - - [...], - 64, - 128, - 256, - [...] - - An implementation detail currently limits the total number of small size - classes to 255, and a compilation error will result if the - you specify cannot be supported. The limit is - roughly =4, depending on page size. - ---with-lg-quantum= - Specify the base 2 log of the minimum allocation alignment. jemalloc needs - to know the minimum alignment that meets the following C standard - requirement (quoted from the April 12, 2011 draft of the C11 standard): - - The pointer returned if the allocation succeeds is suitably aligned so - that it may be assigned to a pointer to any type of object with a - fundamental alignment requirement and then used to access such an object - or an array of such objects in the space allocated [...] - - This setting is architecture-specific, and although jemalloc includes known - safe values for the most commonly used modern architectures, there is a - wrinkle related to GNU libc (glibc) that may impact your choice of - . On most modern architectures, this mandates 16-byte alignment - (=4), but the glibc developers chose not to meet this - requirement for performance reasons. An old discussion can be found at - https://sourceware.org/bugzilla/show_bug.cgi?id=206 . Unlike glibc, - jemalloc does follow the C standard by default (caveat: jemalloc - technically cheats if --with-lg-tiny-min is smaller than - --with-lg-quantum), but the fact that Linux systems already work around - this allocator noncompliance means that it is generally safe in practice to - let jemalloc's minimum alignment follow glibc's lead. If you specify - --with-lg-quantum=3 during configuration, jemalloc will provide additional - size classes that are not 16-byte-aligned (24, 40, and 56, assuming - --with-lg-size-class-group=2). - ---with-lg-tiny-min= - Specify the base 2 log of the minimum tiny size class to support. Tiny - size classes are powers of 2 less than the quantum, and are only - incorporated if is less than (see - --with-lg-quantum). Tiny size classes technically violate the C standard - requirement for minimum alignment, and crashes could conceivably result if - the compiler were to generate instructions that made alignment assumptions, - both because illegal instruction traps could result, and because accesses - could straddle page boundaries and cause segmentation faults due to - accessing unmapped addresses. - - The default of =3 works well in practice even on architectures - that technically require 16-byte alignment, probably for the same reason - --with-lg-quantum=3 works. Smaller tiny size classes can, and will, cause - crashes (see https://bugzilla.mozilla.org/show_bug.cgi?id=691003 for an - example). - - This option is rarely useful, and is mainly provided as documentation of a - subtle implementation detail. If you do use this option, specify a - value in [3, ..., ]. - -The following environment variables (not a definitive list) impact configure's -behavior: - -CFLAGS="?" - Pass these flags to the compiler. You probably shouldn't define this unless - you know what you are doing. (Use EXTRA_CFLAGS instead.) - -EXTRA_CFLAGS="?" - Append these flags to CFLAGS. This makes it possible to add flags such as - -Werror, while allowing the configure script to determine what other flags - are appropriate for the specified configuration. - - The configure script specifically checks whether an optimization flag (-O*) - is specified in EXTRA_CFLAGS, and refrains from specifying an optimization - level if it finds that one has already been specified. - -CPPFLAGS="?" - Pass these flags to the C preprocessor. Note that CFLAGS is not passed to - 'cpp' when 'configure' is looking for include files, so you must use - CPPFLAGS instead if you need to help 'configure' find header files. - -LD_LIBRARY_PATH="?" - 'ld' uses this colon-separated list to find libraries. - -LDFLAGS="?" - Pass these flags when linking. - -PATH="?" - 'configure' uses this to find programs. - -=== Advanced compilation ======================================================= - -To build only parts of jemalloc, use the following targets: - - build_lib_shared - build_lib_static - build_lib - build_doc_html - build_doc_man - build_doc - -To install only parts of jemalloc, use the following targets: - - install_bin - install_include - install_lib_shared - install_lib_static - install_lib - install_doc_html - install_doc_man - install_doc - -To clean up build results to varying degrees, use the following make targets: - - clean - distclean - relclean - -=== Advanced installation ====================================================== - -Optionally, define make variables when invoking make, including (not -exclusively): - -INCLUDEDIR="?" - Use this as the installation prefix for header files. - -LIBDIR="?" - Use this as the installation prefix for libraries. - -MANDIR="?" - Use this as the installation prefix for man pages. - -DESTDIR="?" - Prepend DESTDIR to INCLUDEDIR, LIBDIR, DATADIR, and MANDIR. This is useful - when installing to a different path than was specified via --prefix. - -CC="?" - Use this to invoke the C compiler. - -CFLAGS="?" - Pass these flags to the compiler. - -CPPFLAGS="?" - Pass these flags to the C preprocessor. - -LDFLAGS="?" - Pass these flags when linking. - -PATH="?" - Use this to search for programs used during configuration and building. - -=== Development ================================================================ - -If you intend to make non-trivial changes to jemalloc, use the 'autogen.sh' -script rather than 'configure'. This re-generates 'configure', enables -configuration dependency rules, and enables re-generation of automatically -generated source files. - -The build system supports using an object directory separate from the source -tree. For example, you can create an 'obj' directory, and from within that -directory, issue configuration and build commands: - - autoconf - mkdir obj - cd obj - ../configure --enable-autogen - make - -=== Documentation ============================================================== - -The manual page is generated in both html and roff formats. Any web browser -can be used to view the html manual. The roff manual page can be formatted -prior to installation via the following command: - - nroff -man -t doc/jemalloc.3 diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/config.guess b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/config.guess deleted file mode 100755 index 1f5c50c..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/config.guess +++ /dev/null @@ -1,1420 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright 1992-2014 Free Software Foundation, Inc. - -timestamp='2014-03-23' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that -# program. This Exception is an additional permission under section 7 -# of the GNU General Public License, version 3 ("GPLv3"). -# -# Originally written by Per Bothner. -# -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD -# -# Please send patches with a ChangeLog entry to config-patches@gnu.org. - - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright 1992-2014 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -case "${UNAME_SYSTEM}" in -Linux|GNU|GNU/*) - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - LIBC=gnu - - eval $set_cc_for_build - cat <<-EOF > $dummy.c - #include - #if defined(__UCLIBC__) - LIBC=uclibc - #elif defined(__dietlibc__) - LIBC=dietlibc - #else - LIBC=gnu - #endif - EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` - ;; -esac - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:Bitrig:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=$? - trap '' 0 - exit $exitcode ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH="x86_64" - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[4567]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - UNAME_PROCESSOR=`/usr/bin/uname -p` - case ${UNAME_PROCESSOR} in - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW64*:*) - echo ${UNAME_MACHINE}-pc-mingw64 - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - *:MSYS*:*) - echo ${UNAME_MACHINE}-pc-msys - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - aarch64_be:Linux:*:*) - UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="gnulibc1" ; fi - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - arc:Linux:*:* | arceb:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - else - if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_PCS_VFP - then - echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi - else - echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf - fi - fi - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-${LIBC} - exit ;; - crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-${LIBC} - exit ;; - frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - i*86:Linux:*:*) - echo ${UNAME_MACHINE}-pc-linux-${LIBC} - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } - ;; - openrisc*:Linux:*:*) - echo or1k-unknown-linux-${LIBC} - exit ;; - or32:Linux:*:* | or1k*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-${LIBC} - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-${LIBC} - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; - PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; - *) echo hppa-unknown-linux-${LIBC} ;; - esac - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-${LIBC} - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-${LIBC} - exit ;; - ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-${LIBC} - exit ;; - ppcle:Linux:*:*) - echo powerpcle-unknown-linux-${LIBC} - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux-${LIBC} - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-${LIBC} - exit ;; - x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - x86_64:Haiku:*:*) - echo x86_64-unknown-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval $set_cc_for_build - if test "$UNAME_PROCESSOR" = unknown ; then - UNAME_PROCESSOR=powerpc - fi - if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac - fi - fi - elif test "$UNAME_PROCESSOR" = i386 ; then - # Avoid executing cc on OS X 10.9, as it ships with a stub - # that puts up a graphical alert prompting to install - # developer tools. Any system running Mac OS X 10.7 or - # later (Darwin 11 and later) is required to have a 64-bit - # processor. This is not true of the ARM version of Darwin - # that Apple uses in portable devices. - UNAME_PROCESSOR=x86_64 - fi - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NEO-?:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk${UNAME_RELEASE} - exit ;; - NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; - x86_64:VMkernel:*:*) - echo ${UNAME_MACHINE}-unknown-esx - exit ;; -esac - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/config.sub b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/config.sub deleted file mode 100755 index 0ccff77..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/config.sub +++ /dev/null @@ -1,1797 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright 1992-2014 Free Software Foundation, Inc. - -timestamp='2014-05-01' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that -# program. This Exception is an additional permission under section 7 -# of the GNU General Public License, version 3 ("GPLv3"). - - -# Please send patches with a ChangeLog entry to config-patches@gnu.org. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright 1992-2014 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - android-linux) - os=-linux-android - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze*) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*178) - os=-lynxos178 - ;; - -lynx*5) - os=-lynxos5 - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arceb \ - | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ - | avr | avr32 \ - | be32 | be64 \ - | bfin \ - | c4x | c8051 | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | epiphany \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | k1om \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nios | nios2 | nios2eb | nios2el \ - | ns16k | ns32k \ - | open8 | or1k | or1knd | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pyramid \ - | rl78 | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu \ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | we32k \ - | x86 | xc16x | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - c54x) - basic_machine=tic54x-unknown - ;; - c55x) - basic_machine=tic55x-unknown - ;; - c6x) - basic_machine=tic6x-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - strongarm | thumb | xscale) - basic_machine=arm-unknown - ;; - xgate) - basic_machine=$basic_machine-unknown - os=-none - ;; - xscaleeb) - basic_machine=armeb-unknown - ;; - - xscaleel) - basic_machine=armel-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | c8051-* | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | hexagon-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | k1om-* \ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ - | microblaze-* | microblazeel-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa32r6-* | mipsisa32r6el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64r6-* | mipsisa64r6el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipsr5900-* | mipsr5900el-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* | nios2eb-* | nios2el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | open8-* \ - | or1k*-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pyramid-* \ - | rl78-* | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile*-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c54x-*) - basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16 | cr16-*) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze*) - basic_machine=microblaze-xilinx - ;; - mingw64) - basic_machine=x86_64-pc - os=-mingw64 - ;; - mingw32) - basic_machine=i686-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - msys) - basic_machine=i686-pc - os=-msys - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - nacl) - basic_machine=le32-unknown - os=-nacl - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - neo-tandem) - basic_machine=neo-tandem - ;; - nse-tandem) - basic_machine=nse-tandem - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc | ppcbe) basic_machine=powerpc-unknown - ;; - ppc-* | ppcbe-*) - basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos | rdos64) - basic_machine=x86_64-pc - os=-rdos - ;; - rdos32) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - strongarm-* | thumb-*) - basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tile*) - basic_machine=$basic_machine-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - xscale-* | xscalee[bl]-*) - basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux - ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* | -plan9* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - # Apple iOS - -ios*) - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -nacl*) - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - c8051-*) - os=-elf - ;; - hexagon-*) - os=-elf - ;; - tic54x-*) - os=-coff - ;; - tic55x-*) - os=-coff - ;; - tic6x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/coverage.sh b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/coverage.sh deleted file mode 100755 index 6d1362a..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/coverage.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -set -e - -objdir=$1 -suffix=$2 -shift 2 -objs=$@ - -gcov -b -p -f -o "${objdir}" ${objs} - -# Move gcov outputs so that subsequent gcov invocations won't clobber results -# for the same sources with different compilation flags. -for f in `find . -maxdepth 1 -type f -name '*.gcov'` ; do - mv "${f}" "${f}.${suffix}" -done diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/arena.h b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/arena.h deleted file mode 100644 index 12c6179..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/arena.h +++ /dev/null @@ -1,1347 +0,0 @@ -/******************************************************************************/ -#ifdef JEMALLOC_H_TYPES - -#define LARGE_MINCLASS (ZU(1) << LG_LARGE_MINCLASS) - -/* Maximum number of regions in one run. */ -#define LG_RUN_MAXREGS (LG_PAGE - LG_TINY_MIN) -#define RUN_MAXREGS (1U << LG_RUN_MAXREGS) - -/* - * Minimum redzone size. Redzones may be larger than this if necessary to - * preserve region alignment. - */ -#define REDZONE_MINSIZE 16 - -/* - * The minimum ratio of active:dirty pages per arena is computed as: - * - * (nactive >> lg_dirty_mult) >= ndirty - * - * So, supposing that lg_dirty_mult is 3, there can be no less than 8 times as - * many active pages as dirty pages. - */ -#define LG_DIRTY_MULT_DEFAULT 3 - -typedef struct arena_runs_dirty_link_s arena_runs_dirty_link_t; -typedef struct arena_run_s arena_run_t; -typedef struct arena_chunk_map_bits_s arena_chunk_map_bits_t; -typedef struct arena_chunk_map_misc_s arena_chunk_map_misc_t; -typedef struct arena_chunk_s arena_chunk_t; -typedef struct arena_bin_info_s arena_bin_info_t; -typedef struct arena_bin_s arena_bin_t; -typedef struct arena_s arena_t; - -#endif /* JEMALLOC_H_TYPES */ -/******************************************************************************/ -#ifdef JEMALLOC_H_STRUCTS - -#ifdef JEMALLOC_ARENA_STRUCTS_A -struct arena_run_s { - /* Index of bin this run is associated with. */ - szind_t binind; - - /* Number of free regions in run. */ - unsigned nfree; - - /* Per region allocated/deallocated bitmap. */ - bitmap_t bitmap[BITMAP_GROUPS_MAX]; -}; - -/* Each element of the chunk map corresponds to one page within the chunk. */ -struct arena_chunk_map_bits_s { - /* - * Run address (or size) and various flags are stored together. The bit - * layout looks like (assuming 32-bit system): - * - * ???????? ???????? ???nnnnn nnndumla - * - * ? : Unallocated: Run address for first/last pages, unset for internal - * pages. - * Small: Run page offset. - * Large: Run page count for first page, unset for trailing pages. - * n : binind for small size class, BININD_INVALID for large size class. - * d : dirty? - * u : unzeroed? - * m : decommitted? - * l : large? - * a : allocated? - * - * Following are example bit patterns for the three types of runs. - * - * p : run page offset - * s : run size - * n : binind for size class; large objects set these to BININD_INVALID - * x : don't care - * - : 0 - * + : 1 - * [DUMLA] : bit set - * [dumla] : bit unset - * - * Unallocated (clean): - * ssssssss ssssssss sss+++++ +++dum-a - * xxxxxxxx xxxxxxxx xxxxxxxx xxx-Uxxx - * ssssssss ssssssss sss+++++ +++dUm-a - * - * Unallocated (dirty): - * ssssssss ssssssss sss+++++ +++D-m-a - * xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx - * ssssssss ssssssss sss+++++ +++D-m-a - * - * Small: - * pppppppp pppppppp pppnnnnn nnnd---A - * pppppppp pppppppp pppnnnnn nnn----A - * pppppppp pppppppp pppnnnnn nnnd---A - * - * Large: - * ssssssss ssssssss sss+++++ +++D--LA - * xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx - * -------- -------- ---+++++ +++D--LA - * - * Large (sampled, size <= LARGE_MINCLASS): - * ssssssss ssssssss sssnnnnn nnnD--LA - * xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx - * -------- -------- ---+++++ +++D--LA - * - * Large (not sampled, size == LARGE_MINCLASS): - * ssssssss ssssssss sss+++++ +++D--LA - * xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx - * -------- -------- ---+++++ +++D--LA - */ - size_t bits; -#define CHUNK_MAP_ALLOCATED ((size_t)0x01U) -#define CHUNK_MAP_LARGE ((size_t)0x02U) -#define CHUNK_MAP_STATE_MASK ((size_t)0x3U) - -#define CHUNK_MAP_DECOMMITTED ((size_t)0x04U) -#define CHUNK_MAP_UNZEROED ((size_t)0x08U) -#define CHUNK_MAP_DIRTY ((size_t)0x10U) -#define CHUNK_MAP_FLAGS_MASK ((size_t)0x1cU) - -#define CHUNK_MAP_BININD_SHIFT 5 -#define BININD_INVALID ((size_t)0xffU) -#define CHUNK_MAP_BININD_MASK (BININD_INVALID << CHUNK_MAP_BININD_SHIFT) -#define CHUNK_MAP_BININD_INVALID CHUNK_MAP_BININD_MASK - -#define CHUNK_MAP_RUNIND_SHIFT (CHUNK_MAP_BININD_SHIFT + 8) -#define CHUNK_MAP_SIZE_SHIFT (CHUNK_MAP_RUNIND_SHIFT - LG_PAGE) -#define CHUNK_MAP_SIZE_MASK \ - (~(CHUNK_MAP_BININD_MASK | CHUNK_MAP_FLAGS_MASK | CHUNK_MAP_STATE_MASK)) -}; - -struct arena_runs_dirty_link_s { - qr(arena_runs_dirty_link_t) rd_link; -}; - -/* - * Each arena_chunk_map_misc_t corresponds to one page within the chunk, just - * like arena_chunk_map_bits_t. Two separate arrays are stored within each - * chunk header in order to improve cache locality. - */ -struct arena_chunk_map_misc_s { - /* - * Linkage for run trees. There are two disjoint uses: - * - * 1) arena_t's runs_avail tree. - * 2) arena_run_t conceptually uses this linkage for in-use non-full - * runs, rather than directly embedding linkage. - */ - rb_node(arena_chunk_map_misc_t) rb_link; - - union { - /* Linkage for list of dirty runs. */ - arena_runs_dirty_link_t rd; - - /* Profile counters, used for large object runs. */ - union { - void *prof_tctx_pun; - prof_tctx_t *prof_tctx; - }; - - /* Small region run metadata. */ - arena_run_t run; - }; -}; -typedef rb_tree(arena_chunk_map_misc_t) arena_avail_tree_t; -typedef rb_tree(arena_chunk_map_misc_t) arena_run_tree_t; -#endif /* JEMALLOC_ARENA_STRUCTS_A */ - -#ifdef JEMALLOC_ARENA_STRUCTS_B -/* Arena chunk header. */ -struct arena_chunk_s { - /* - * A pointer to the arena that owns the chunk is stored within the node. - * This field as a whole is used by chunks_rtree to support both - * ivsalloc() and core-based debugging. - */ - extent_node_t node; - - /* - * Map of pages within chunk that keeps track of free/large/small. The - * first map_bias entries are omitted, since the chunk header does not - * need to be tracked in the map. This omission saves a header page - * for common chunk sizes (e.g. 4 MiB). - */ - arena_chunk_map_bits_t map_bits[1]; /* Dynamically sized. */ -}; - -/* - * Read-only information associated with each element of arena_t's bins array - * is stored separately, partly to reduce memory usage (only one copy, rather - * than one per arena), but mainly to avoid false cacheline sharing. - * - * Each run has the following layout: - * - * /--------------------\ - * | pad? | - * |--------------------| - * | redzone | - * reg0_offset | region 0 | - * | redzone | - * |--------------------| \ - * | redzone | | - * | region 1 | > reg_interval - * | redzone | / - * |--------------------| - * | ... | - * | ... | - * | ... | - * |--------------------| - * | redzone | - * | region nregs-1 | - * | redzone | - * |--------------------| - * | alignment pad? | - * \--------------------/ - * - * reg_interval has at least the same minimum alignment as reg_size; this - * preserves the alignment constraint that sa2u() depends on. Alignment pad is - * either 0 or redzone_size; it is present only if needed to align reg0_offset. - */ -struct arena_bin_info_s { - /* Size of regions in a run for this bin's size class. */ - size_t reg_size; - - /* Redzone size. */ - size_t redzone_size; - - /* Interval between regions (reg_size + (redzone_size << 1)). */ - size_t reg_interval; - - /* Total size of a run for this bin's size class. */ - size_t run_size; - - /* Total number of regions in a run for this bin's size class. */ - uint32_t nregs; - - /* - * Metadata used to manipulate bitmaps for runs associated with this - * bin. - */ - bitmap_info_t bitmap_info; - - /* Offset of first region in a run for this bin's size class. */ - uint32_t reg0_offset; -}; - -struct arena_bin_s { - /* - * All operations on runcur, runs, and stats require that lock be - * locked. Run allocation/deallocation are protected by the arena lock, - * which may be acquired while holding one or more bin locks, but not - * vise versa. - */ - malloc_mutex_t lock; - - /* - * Current run being used to service allocations of this bin's size - * class. - */ - arena_run_t *runcur; - - /* - * Tree of non-full runs. This tree is used when looking for an - * existing run when runcur is no longer usable. We choose the - * non-full run that is lowest in memory; this policy tends to keep - * objects packed well, and it can also help reduce the number of - * almost-empty chunks. - */ - arena_run_tree_t runs; - - /* Bin statistics. */ - malloc_bin_stats_t stats; -}; - -struct arena_s { - /* This arena's index within the arenas array. */ - unsigned ind; - - /* - * Number of threads currently assigned to this arena. This field is - * protected by arenas_lock. - */ - unsigned nthreads; - - /* - * There are three classes of arena operations from a locking - * perspective: - * 1) Thread assignment (modifies nthreads) is protected by arenas_lock. - * 2) Bin-related operations are protected by bin locks. - * 3) Chunk- and run-related operations are protected by this mutex. - */ - malloc_mutex_t lock; - - arena_stats_t stats; - /* - * List of tcaches for extant threads associated with this arena. - * Stats from these are merged incrementally, and at exit if - * opt_stats_print is enabled. - */ - ql_head(tcache_t) tcache_ql; - - uint64_t prof_accumbytes; - - /* - * PRNG state for cache index randomization of large allocation base - * pointers. - */ - uint64_t offset_state; - - dss_prec_t dss_prec; - - /* - * In order to avoid rapid chunk allocation/deallocation when an arena - * oscillates right on the cusp of needing a new chunk, cache the most - * recently freed chunk. The spare is left in the arena's chunk trees - * until it is deleted. - * - * There is one spare chunk per arena, rather than one spare total, in - * order to avoid interactions between multiple threads that could make - * a single spare inadequate. - */ - arena_chunk_t *spare; - - /* Minimum ratio (log base 2) of nactive:ndirty. */ - ssize_t lg_dirty_mult; - - /* True if a thread is currently executing arena_purge(). */ - bool purging; - - /* Number of pages in active runs and huge regions. */ - size_t nactive; - - /* - * Current count of pages within unused runs that are potentially - * dirty, and for which madvise(... MADV_DONTNEED) has not been called. - * By tracking this, we can institute a limit on how much dirty unused - * memory is mapped for each arena. - */ - size_t ndirty; - - /* - * Size/address-ordered tree of this arena's available runs. The tree - * is used for first-best-fit run allocation. - */ - arena_avail_tree_t runs_avail; - - /* - * Unused dirty memory this arena manages. Dirty memory is conceptually - * tracked as an arbitrarily interleaved LRU of dirty runs and cached - * chunks, but the list linkage is actually semi-duplicated in order to - * avoid extra arena_chunk_map_misc_t space overhead. - * - * LRU-----------------------------------------------------------MRU - * - * /-- arena ---\ - * | | - * | | - * |------------| /- chunk -\ - * ...->|chunks_cache|<--------------------------->| /----\ |<--... - * |------------| | |node| | - * | | | | | | - * | | /- run -\ /- run -\ | | | | - * | | | | | | | | | | - * | | | | | | | | | | - * |------------| |-------| |-------| | |----| | - * ...->|runs_dirty |<-->|rd |<-->|rd |<---->|rd |<----... - * |------------| |-------| |-------| | |----| | - * | | | | | | | | | | - * | | | | | | | \----/ | - * | | \-------/ \-------/ | | - * | | | | - * | | | | - * \------------/ \---------/ - */ - arena_runs_dirty_link_t runs_dirty; - extent_node_t chunks_cache; - - /* Extant huge allocations. */ - ql_head(extent_node_t) huge; - /* Synchronizes all huge allocation/update/deallocation. */ - malloc_mutex_t huge_mtx; - - /* - * Trees of chunks that were previously allocated (trees differ only in - * node ordering). These are used when allocating chunks, in an attempt - * to re-use address space. Depending on function, different tree - * orderings are needed, which is why there are two trees with the same - * contents. - */ - extent_tree_t chunks_szad_cached; - extent_tree_t chunks_ad_cached; - extent_tree_t chunks_szad_retained; - extent_tree_t chunks_ad_retained; - - malloc_mutex_t chunks_mtx; - /* Cache of nodes that were allocated via base_alloc(). */ - ql_head(extent_node_t) node_cache; - malloc_mutex_t node_cache_mtx; - - /* User-configurable chunk hook functions. */ - chunk_hooks_t chunk_hooks; - - /* bins is used to store trees of free regions. */ - arena_bin_t bins[NBINS]; -}; -#endif /* JEMALLOC_ARENA_STRUCTS_B */ - -#endif /* JEMALLOC_H_STRUCTS */ -/******************************************************************************/ -#ifdef JEMALLOC_H_EXTERNS - -static const size_t large_pad = -#ifdef JEMALLOC_CACHE_OBLIVIOUS - PAGE -#else - 0 -#endif - ; - -extern ssize_t opt_lg_dirty_mult; - -extern arena_bin_info_t arena_bin_info[NBINS]; - -extern size_t map_bias; /* Number of arena chunk header pages. */ -extern size_t map_misc_offset; -extern size_t arena_maxrun; /* Max run size for arenas. */ -extern size_t large_maxclass; /* Max large size class. */ -extern unsigned nlclasses; /* Number of large size classes. */ -extern unsigned nhclasses; /* Number of huge size classes. */ - -void arena_chunk_cache_maybe_insert(arena_t *arena, extent_node_t *node, - bool cache); -void arena_chunk_cache_maybe_remove(arena_t *arena, extent_node_t *node, - bool cache); -extent_node_t *arena_node_alloc(arena_t *arena); -void arena_node_dalloc(arena_t *arena, extent_node_t *node); -void *arena_chunk_alloc_huge(arena_t *arena, size_t usize, size_t alignment, - bool *zero); -void arena_chunk_dalloc_huge(arena_t *arena, void *chunk, size_t usize); -void arena_chunk_ralloc_huge_similar(arena_t *arena, void *chunk, - size_t oldsize, size_t usize); -void arena_chunk_ralloc_huge_shrink(arena_t *arena, void *chunk, - size_t oldsize, size_t usize); -bool arena_chunk_ralloc_huge_expand(arena_t *arena, void *chunk, - size_t oldsize, size_t usize, bool *zero); -ssize_t arena_lg_dirty_mult_get(arena_t *arena); -bool arena_lg_dirty_mult_set(arena_t *arena, ssize_t lg_dirty_mult); -void arena_maybe_purge(arena_t *arena); -void arena_purge_all(arena_t *arena); -void arena_tcache_fill_small(arena_t *arena, tcache_bin_t *tbin, - szind_t binind, uint64_t prof_accumbytes); -void arena_alloc_junk_small(void *ptr, arena_bin_info_t *bin_info, - bool zero); -#ifdef JEMALLOC_JET -typedef void (arena_redzone_corruption_t)(void *, size_t, bool, size_t, - uint8_t); -extern arena_redzone_corruption_t *arena_redzone_corruption; -typedef void (arena_dalloc_junk_small_t)(void *, arena_bin_info_t *); -extern arena_dalloc_junk_small_t *arena_dalloc_junk_small; -#else -void arena_dalloc_junk_small(void *ptr, arena_bin_info_t *bin_info); -#endif -void arena_quarantine_junk_small(void *ptr, size_t usize); -void *arena_malloc_small(arena_t *arena, size_t size, bool zero); -void *arena_malloc_large(arena_t *arena, size_t size, bool zero); -void *arena_palloc(tsd_t *tsd, arena_t *arena, size_t usize, - size_t alignment, bool zero, tcache_t *tcache); -void arena_prof_promoted(const void *ptr, size_t size); -void arena_dalloc_bin_junked_locked(arena_t *arena, arena_chunk_t *chunk, - void *ptr, arena_chunk_map_bits_t *bitselm); -void arena_dalloc_bin(arena_t *arena, arena_chunk_t *chunk, void *ptr, - size_t pageind, arena_chunk_map_bits_t *bitselm); -void arena_dalloc_small(arena_t *arena, arena_chunk_t *chunk, void *ptr, - size_t pageind); -#ifdef JEMALLOC_JET -typedef void (arena_dalloc_junk_large_t)(void *, size_t); -extern arena_dalloc_junk_large_t *arena_dalloc_junk_large; -#else -void arena_dalloc_junk_large(void *ptr, size_t usize); -#endif -void arena_dalloc_large_junked_locked(arena_t *arena, arena_chunk_t *chunk, - void *ptr); -void arena_dalloc_large(arena_t *arena, arena_chunk_t *chunk, void *ptr); -#ifdef JEMALLOC_JET -typedef void (arena_ralloc_junk_large_t)(void *, size_t, size_t); -extern arena_ralloc_junk_large_t *arena_ralloc_junk_large; -#endif -bool arena_ralloc_no_move(void *ptr, size_t oldsize, size_t size, - size_t extra, bool zero); -void *arena_ralloc(tsd_t *tsd, arena_t *arena, void *ptr, size_t oldsize, - size_t size, size_t alignment, bool zero, tcache_t *tcache); -dss_prec_t arena_dss_prec_get(arena_t *arena); -bool arena_dss_prec_set(arena_t *arena, dss_prec_t dss_prec); -ssize_t arena_lg_dirty_mult_default_get(void); -bool arena_lg_dirty_mult_default_set(ssize_t lg_dirty_mult); -void arena_stats_merge(arena_t *arena, const char **dss, - ssize_t *lg_dirty_mult, size_t *nactive, size_t *ndirty, - arena_stats_t *astats, malloc_bin_stats_t *bstats, - malloc_large_stats_t *lstats, malloc_huge_stats_t *hstats); -arena_t *arena_new(unsigned ind); -bool arena_boot(void); -void arena_prefork(arena_t *arena); -void arena_postfork_parent(arena_t *arena); -void arena_postfork_child(arena_t *arena); - -#endif /* JEMALLOC_H_EXTERNS */ -/******************************************************************************/ -#ifdef JEMALLOC_H_INLINES - -#ifndef JEMALLOC_ENABLE_INLINE -arena_chunk_map_bits_t *arena_bitselm_get(arena_chunk_t *chunk, - size_t pageind); -arena_chunk_map_misc_t *arena_miscelm_get(arena_chunk_t *chunk, - size_t pageind); -size_t arena_miscelm_to_pageind(arena_chunk_map_misc_t *miscelm); -void *arena_miscelm_to_rpages(arena_chunk_map_misc_t *miscelm); -arena_chunk_map_misc_t *arena_rd_to_miscelm(arena_runs_dirty_link_t *rd); -arena_chunk_map_misc_t *arena_run_to_miscelm(arena_run_t *run); -size_t *arena_mapbitsp_get(arena_chunk_t *chunk, size_t pageind); -size_t arena_mapbitsp_read(size_t *mapbitsp); -size_t arena_mapbits_get(arena_chunk_t *chunk, size_t pageind); -size_t arena_mapbits_size_decode(size_t mapbits); -size_t arena_mapbits_unallocated_size_get(arena_chunk_t *chunk, - size_t pageind); -size_t arena_mapbits_large_size_get(arena_chunk_t *chunk, size_t pageind); -size_t arena_mapbits_small_runind_get(arena_chunk_t *chunk, size_t pageind); -szind_t arena_mapbits_binind_get(arena_chunk_t *chunk, size_t pageind); -size_t arena_mapbits_dirty_get(arena_chunk_t *chunk, size_t pageind); -size_t arena_mapbits_unzeroed_get(arena_chunk_t *chunk, size_t pageind); -size_t arena_mapbits_decommitted_get(arena_chunk_t *chunk, size_t pageind); -size_t arena_mapbits_large_get(arena_chunk_t *chunk, size_t pageind); -size_t arena_mapbits_allocated_get(arena_chunk_t *chunk, size_t pageind); -void arena_mapbitsp_write(size_t *mapbitsp, size_t mapbits); -size_t arena_mapbits_size_encode(size_t size); -void arena_mapbits_unallocated_set(arena_chunk_t *chunk, size_t pageind, - size_t size, size_t flags); -void arena_mapbits_unallocated_size_set(arena_chunk_t *chunk, size_t pageind, - size_t size); -void arena_mapbits_internal_set(arena_chunk_t *chunk, size_t pageind, - size_t flags); -void arena_mapbits_large_set(arena_chunk_t *chunk, size_t pageind, - size_t size, size_t flags); -void arena_mapbits_large_binind_set(arena_chunk_t *chunk, size_t pageind, - szind_t binind); -void arena_mapbits_small_set(arena_chunk_t *chunk, size_t pageind, - size_t runind, szind_t binind, size_t flags); -void arena_metadata_allocated_add(arena_t *arena, size_t size); -void arena_metadata_allocated_sub(arena_t *arena, size_t size); -size_t arena_metadata_allocated_get(arena_t *arena); -bool arena_prof_accum_impl(arena_t *arena, uint64_t accumbytes); -bool arena_prof_accum_locked(arena_t *arena, uint64_t accumbytes); -bool arena_prof_accum(arena_t *arena, uint64_t accumbytes); -szind_t arena_ptr_small_binind_get(const void *ptr, size_t mapbits); -szind_t arena_bin_index(arena_t *arena, arena_bin_t *bin); -unsigned arena_run_regind(arena_run_t *run, arena_bin_info_t *bin_info, - const void *ptr); -prof_tctx_t *arena_prof_tctx_get(const void *ptr); -void arena_prof_tctx_set(const void *ptr, size_t usize, prof_tctx_t *tctx); -void arena_prof_tctx_reset(const void *ptr, size_t usize, - const void *old_ptr, prof_tctx_t *old_tctx); -void *arena_malloc(tsd_t *tsd, arena_t *arena, size_t size, bool zero, - tcache_t *tcache); -arena_t *arena_aalloc(const void *ptr); -size_t arena_salloc(const void *ptr, bool demote); -void arena_dalloc(tsd_t *tsd, void *ptr, tcache_t *tcache); -void arena_sdalloc(tsd_t *tsd, void *ptr, size_t size, tcache_t *tcache); -#endif - -#if (defined(JEMALLOC_ENABLE_INLINE) || defined(JEMALLOC_ARENA_C_)) -# ifdef JEMALLOC_ARENA_INLINE_A -JEMALLOC_ALWAYS_INLINE arena_chunk_map_bits_t * -arena_bitselm_get(arena_chunk_t *chunk, size_t pageind) -{ - - assert(pageind >= map_bias); - assert(pageind < chunk_npages); - - return (&chunk->map_bits[pageind-map_bias]); -} - -JEMALLOC_ALWAYS_INLINE arena_chunk_map_misc_t * -arena_miscelm_get(arena_chunk_t *chunk, size_t pageind) -{ - - assert(pageind >= map_bias); - assert(pageind < chunk_npages); - - return ((arena_chunk_map_misc_t *)((uintptr_t)chunk + - (uintptr_t)map_misc_offset) + pageind-map_bias); -} - -JEMALLOC_ALWAYS_INLINE size_t -arena_miscelm_to_pageind(arena_chunk_map_misc_t *miscelm) -{ - arena_chunk_t *chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(miscelm); - size_t pageind = ((uintptr_t)miscelm - ((uintptr_t)chunk + - map_misc_offset)) / sizeof(arena_chunk_map_misc_t) + map_bias; - - assert(pageind >= map_bias); - assert(pageind < chunk_npages); - - return (pageind); -} - -JEMALLOC_ALWAYS_INLINE void * -arena_miscelm_to_rpages(arena_chunk_map_misc_t *miscelm) -{ - arena_chunk_t *chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(miscelm); - size_t pageind = arena_miscelm_to_pageind(miscelm); - - return ((void *)((uintptr_t)chunk + (pageind << LG_PAGE))); -} - -JEMALLOC_ALWAYS_INLINE arena_chunk_map_misc_t * -arena_rd_to_miscelm(arena_runs_dirty_link_t *rd) -{ - arena_chunk_map_misc_t *miscelm = (arena_chunk_map_misc_t - *)((uintptr_t)rd - offsetof(arena_chunk_map_misc_t, rd)); - - assert(arena_miscelm_to_pageind(miscelm) >= map_bias); - assert(arena_miscelm_to_pageind(miscelm) < chunk_npages); - - return (miscelm); -} - -JEMALLOC_ALWAYS_INLINE arena_chunk_map_misc_t * -arena_run_to_miscelm(arena_run_t *run) -{ - arena_chunk_map_misc_t *miscelm = (arena_chunk_map_misc_t - *)((uintptr_t)run - offsetof(arena_chunk_map_misc_t, run)); - - assert(arena_miscelm_to_pageind(miscelm) >= map_bias); - assert(arena_miscelm_to_pageind(miscelm) < chunk_npages); - - return (miscelm); -} - -JEMALLOC_ALWAYS_INLINE size_t * -arena_mapbitsp_get(arena_chunk_t *chunk, size_t pageind) -{ - - return (&arena_bitselm_get(chunk, pageind)->bits); -} - -JEMALLOC_ALWAYS_INLINE size_t -arena_mapbitsp_read(size_t *mapbitsp) -{ - - return (*mapbitsp); -} - -JEMALLOC_ALWAYS_INLINE size_t -arena_mapbits_get(arena_chunk_t *chunk, size_t pageind) -{ - - return (arena_mapbitsp_read(arena_mapbitsp_get(chunk, pageind))); -} - -JEMALLOC_ALWAYS_INLINE size_t -arena_mapbits_size_decode(size_t mapbits) -{ - size_t size; - -#if CHUNK_MAP_SIZE_SHIFT > 0 - size = (mapbits & CHUNK_MAP_SIZE_MASK) >> CHUNK_MAP_SIZE_SHIFT; -#elif CHUNK_MAP_SIZE_SHIFT == 0 - size = mapbits & CHUNK_MAP_SIZE_MASK; -#else - size = (mapbits & CHUNK_MAP_SIZE_MASK) << -CHUNK_MAP_SIZE_SHIFT; -#endif - - return (size); -} - -JEMALLOC_ALWAYS_INLINE size_t -arena_mapbits_unallocated_size_get(arena_chunk_t *chunk, size_t pageind) -{ - size_t mapbits; - - mapbits = arena_mapbits_get(chunk, pageind); - assert((mapbits & (CHUNK_MAP_LARGE|CHUNK_MAP_ALLOCATED)) == 0); - return (arena_mapbits_size_decode(mapbits)); -} - -JEMALLOC_ALWAYS_INLINE size_t -arena_mapbits_large_size_get(arena_chunk_t *chunk, size_t pageind) -{ - size_t mapbits; - - mapbits = arena_mapbits_get(chunk, pageind); - assert((mapbits & (CHUNK_MAP_LARGE|CHUNK_MAP_ALLOCATED)) == - (CHUNK_MAP_LARGE|CHUNK_MAP_ALLOCATED)); - return (arena_mapbits_size_decode(mapbits)); -} - -JEMALLOC_ALWAYS_INLINE size_t -arena_mapbits_small_runind_get(arena_chunk_t *chunk, size_t pageind) -{ - size_t mapbits; - - mapbits = arena_mapbits_get(chunk, pageind); - assert((mapbits & (CHUNK_MAP_LARGE|CHUNK_MAP_ALLOCATED)) == - CHUNK_MAP_ALLOCATED); - return (mapbits >> CHUNK_MAP_RUNIND_SHIFT); -} - -JEMALLOC_ALWAYS_INLINE szind_t -arena_mapbits_binind_get(arena_chunk_t *chunk, size_t pageind) -{ - size_t mapbits; - szind_t binind; - - mapbits = arena_mapbits_get(chunk, pageind); - binind = (mapbits & CHUNK_MAP_BININD_MASK) >> CHUNK_MAP_BININD_SHIFT; - assert(binind < NBINS || binind == BININD_INVALID); - return (binind); -} - -JEMALLOC_ALWAYS_INLINE size_t -arena_mapbits_dirty_get(arena_chunk_t *chunk, size_t pageind) -{ - size_t mapbits; - - mapbits = arena_mapbits_get(chunk, pageind); - assert((mapbits & CHUNK_MAP_DECOMMITTED) == 0 || (mapbits & - (CHUNK_MAP_DIRTY|CHUNK_MAP_UNZEROED)) == 0); - return (mapbits & CHUNK_MAP_DIRTY); -} - -JEMALLOC_ALWAYS_INLINE size_t -arena_mapbits_unzeroed_get(arena_chunk_t *chunk, size_t pageind) -{ - size_t mapbits; - - mapbits = arena_mapbits_get(chunk, pageind); - assert((mapbits & CHUNK_MAP_DECOMMITTED) == 0 || (mapbits & - (CHUNK_MAP_DIRTY|CHUNK_MAP_UNZEROED)) == 0); - return (mapbits & CHUNK_MAP_UNZEROED); -} - -JEMALLOC_ALWAYS_INLINE size_t -arena_mapbits_decommitted_get(arena_chunk_t *chunk, size_t pageind) -{ - size_t mapbits; - - mapbits = arena_mapbits_get(chunk, pageind); - assert((mapbits & CHUNK_MAP_DECOMMITTED) == 0 || (mapbits & - (CHUNK_MAP_DIRTY|CHUNK_MAP_UNZEROED)) == 0); - return (mapbits & CHUNK_MAP_DECOMMITTED); -} - -JEMALLOC_ALWAYS_INLINE size_t -arena_mapbits_large_get(arena_chunk_t *chunk, size_t pageind) -{ - size_t mapbits; - - mapbits = arena_mapbits_get(chunk, pageind); - return (mapbits & CHUNK_MAP_LARGE); -} - -JEMALLOC_ALWAYS_INLINE size_t -arena_mapbits_allocated_get(arena_chunk_t *chunk, size_t pageind) -{ - size_t mapbits; - - mapbits = arena_mapbits_get(chunk, pageind); - return (mapbits & CHUNK_MAP_ALLOCATED); -} - -JEMALLOC_ALWAYS_INLINE void -arena_mapbitsp_write(size_t *mapbitsp, size_t mapbits) -{ - - *mapbitsp = mapbits; -} - -JEMALLOC_ALWAYS_INLINE size_t -arena_mapbits_size_encode(size_t size) -{ - size_t mapbits; - -#if CHUNK_MAP_SIZE_SHIFT > 0 - mapbits = size << CHUNK_MAP_SIZE_SHIFT; -#elif CHUNK_MAP_SIZE_SHIFT == 0 - mapbits = size; -#else - mapbits = size >> -CHUNK_MAP_SIZE_SHIFT; -#endif - - assert((mapbits & ~CHUNK_MAP_SIZE_MASK) == 0); - return (mapbits); -} - -JEMALLOC_ALWAYS_INLINE void -arena_mapbits_unallocated_set(arena_chunk_t *chunk, size_t pageind, size_t size, - size_t flags) -{ - size_t *mapbitsp = arena_mapbitsp_get(chunk, pageind); - - assert((size & PAGE_MASK) == 0); - assert((flags & CHUNK_MAP_FLAGS_MASK) == flags); - assert((flags & CHUNK_MAP_DECOMMITTED) == 0 || (flags & - (CHUNK_MAP_DIRTY|CHUNK_MAP_UNZEROED)) == 0); - arena_mapbitsp_write(mapbitsp, arena_mapbits_size_encode(size) | - CHUNK_MAP_BININD_INVALID | flags); -} - -JEMALLOC_ALWAYS_INLINE void -arena_mapbits_unallocated_size_set(arena_chunk_t *chunk, size_t pageind, - size_t size) -{ - size_t *mapbitsp = arena_mapbitsp_get(chunk, pageind); - size_t mapbits = arena_mapbitsp_read(mapbitsp); - - assert((size & PAGE_MASK) == 0); - assert((mapbits & (CHUNK_MAP_LARGE|CHUNK_MAP_ALLOCATED)) == 0); - arena_mapbitsp_write(mapbitsp, arena_mapbits_size_encode(size) | - (mapbits & ~CHUNK_MAP_SIZE_MASK)); -} - -JEMALLOC_ALWAYS_INLINE void -arena_mapbits_internal_set(arena_chunk_t *chunk, size_t pageind, size_t flags) -{ - size_t *mapbitsp = arena_mapbitsp_get(chunk, pageind); - - assert((flags & CHUNK_MAP_UNZEROED) == flags); - arena_mapbitsp_write(mapbitsp, flags); -} - -JEMALLOC_ALWAYS_INLINE void -arena_mapbits_large_set(arena_chunk_t *chunk, size_t pageind, size_t size, - size_t flags) -{ - size_t *mapbitsp = arena_mapbitsp_get(chunk, pageind); - - assert((size & PAGE_MASK) == 0); - assert((flags & CHUNK_MAP_FLAGS_MASK) == flags); - assert((flags & CHUNK_MAP_DECOMMITTED) == 0 || (flags & - (CHUNK_MAP_DIRTY|CHUNK_MAP_UNZEROED)) == 0); - arena_mapbitsp_write(mapbitsp, arena_mapbits_size_encode(size) | - CHUNK_MAP_BININD_INVALID | flags | CHUNK_MAP_LARGE | - CHUNK_MAP_ALLOCATED); -} - -JEMALLOC_ALWAYS_INLINE void -arena_mapbits_large_binind_set(arena_chunk_t *chunk, size_t pageind, - szind_t binind) -{ - size_t *mapbitsp = arena_mapbitsp_get(chunk, pageind); - size_t mapbits = arena_mapbitsp_read(mapbitsp); - - assert(binind <= BININD_INVALID); - assert(arena_mapbits_large_size_get(chunk, pageind) == LARGE_MINCLASS + - large_pad); - arena_mapbitsp_write(mapbitsp, (mapbits & ~CHUNK_MAP_BININD_MASK) | - (binind << CHUNK_MAP_BININD_SHIFT)); -} - -JEMALLOC_ALWAYS_INLINE void -arena_mapbits_small_set(arena_chunk_t *chunk, size_t pageind, size_t runind, - szind_t binind, size_t flags) -{ - size_t *mapbitsp = arena_mapbitsp_get(chunk, pageind); - - assert(binind < BININD_INVALID); - assert(pageind - runind >= map_bias); - assert((flags & CHUNK_MAP_UNZEROED) == flags); - arena_mapbitsp_write(mapbitsp, (runind << CHUNK_MAP_RUNIND_SHIFT) | - (binind << CHUNK_MAP_BININD_SHIFT) | flags | CHUNK_MAP_ALLOCATED); -} - -JEMALLOC_INLINE void -arena_metadata_allocated_add(arena_t *arena, size_t size) -{ - - atomic_add_z(&arena->stats.metadata_allocated, size); -} - -JEMALLOC_INLINE void -arena_metadata_allocated_sub(arena_t *arena, size_t size) -{ - - atomic_sub_z(&arena->stats.metadata_allocated, size); -} - -JEMALLOC_INLINE size_t -arena_metadata_allocated_get(arena_t *arena) -{ - - return (atomic_read_z(&arena->stats.metadata_allocated)); -} - -JEMALLOC_INLINE bool -arena_prof_accum_impl(arena_t *arena, uint64_t accumbytes) -{ - - cassert(config_prof); - assert(prof_interval != 0); - - arena->prof_accumbytes += accumbytes; - if (arena->prof_accumbytes >= prof_interval) { - arena->prof_accumbytes -= prof_interval; - return (true); - } - return (false); -} - -JEMALLOC_INLINE bool -arena_prof_accum_locked(arena_t *arena, uint64_t accumbytes) -{ - - cassert(config_prof); - - if (likely(prof_interval == 0)) - return (false); - return (arena_prof_accum_impl(arena, accumbytes)); -} - -JEMALLOC_INLINE bool -arena_prof_accum(arena_t *arena, uint64_t accumbytes) -{ - - cassert(config_prof); - - if (likely(prof_interval == 0)) - return (false); - - { - bool ret; - - malloc_mutex_lock(&arena->lock); - ret = arena_prof_accum_impl(arena, accumbytes); - malloc_mutex_unlock(&arena->lock); - return (ret); - } -} - -JEMALLOC_ALWAYS_INLINE szind_t -arena_ptr_small_binind_get(const void *ptr, size_t mapbits) -{ - szind_t binind; - - binind = (mapbits & CHUNK_MAP_BININD_MASK) >> CHUNK_MAP_BININD_SHIFT; - - if (config_debug) { - arena_chunk_t *chunk; - arena_t *arena; - size_t pageind; - size_t actual_mapbits; - size_t rpages_ind; - arena_run_t *run; - arena_bin_t *bin; - szind_t run_binind, actual_binind; - arena_bin_info_t *bin_info; - arena_chunk_map_misc_t *miscelm; - void *rpages; - - assert(binind != BININD_INVALID); - assert(binind < NBINS); - chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr); - arena = extent_node_arena_get(&chunk->node); - pageind = ((uintptr_t)ptr - (uintptr_t)chunk) >> LG_PAGE; - actual_mapbits = arena_mapbits_get(chunk, pageind); - assert(mapbits == actual_mapbits); - assert(arena_mapbits_large_get(chunk, pageind) == 0); - assert(arena_mapbits_allocated_get(chunk, pageind) != 0); - rpages_ind = pageind - arena_mapbits_small_runind_get(chunk, - pageind); - miscelm = arena_miscelm_get(chunk, rpages_ind); - run = &miscelm->run; - run_binind = run->binind; - bin = &arena->bins[run_binind]; - actual_binind = bin - arena->bins; - assert(run_binind == actual_binind); - bin_info = &arena_bin_info[actual_binind]; - rpages = arena_miscelm_to_rpages(miscelm); - assert(((uintptr_t)ptr - ((uintptr_t)rpages + - (uintptr_t)bin_info->reg0_offset)) % bin_info->reg_interval - == 0); - } - - return (binind); -} -# endif /* JEMALLOC_ARENA_INLINE_A */ - -# ifdef JEMALLOC_ARENA_INLINE_B -JEMALLOC_INLINE szind_t -arena_bin_index(arena_t *arena, arena_bin_t *bin) -{ - szind_t binind = bin - arena->bins; - assert(binind < NBINS); - return (binind); -} - -JEMALLOC_INLINE unsigned -arena_run_regind(arena_run_t *run, arena_bin_info_t *bin_info, const void *ptr) -{ - unsigned shift, diff, regind; - size_t interval; - arena_chunk_map_misc_t *miscelm = arena_run_to_miscelm(run); - void *rpages = arena_miscelm_to_rpages(miscelm); - - /* - * Freeing a pointer lower than region zero can cause assertion - * failure. - */ - assert((uintptr_t)ptr >= (uintptr_t)rpages + - (uintptr_t)bin_info->reg0_offset); - - /* - * Avoid doing division with a variable divisor if possible. Using - * actual division here can reduce allocator throughput by over 20%! - */ - diff = (unsigned)((uintptr_t)ptr - (uintptr_t)rpages - - bin_info->reg0_offset); - - /* Rescale (factor powers of 2 out of the numerator and denominator). */ - interval = bin_info->reg_interval; - shift = jemalloc_ffs(interval) - 1; - diff >>= shift; - interval >>= shift; - - if (interval == 1) { - /* The divisor was a power of 2. */ - regind = diff; - } else { - /* - * To divide by a number D that is not a power of two we - * multiply by (2^21 / D) and then right shift by 21 positions. - * - * X / D - * - * becomes - * - * (X * interval_invs[D - 3]) >> SIZE_INV_SHIFT - * - * We can omit the first three elements, because we never - * divide by 0, and 1 and 2 are both powers of two, which are - * handled above. - */ -#define SIZE_INV_SHIFT ((sizeof(unsigned) << 3) - LG_RUN_MAXREGS) -#define SIZE_INV(s) (((1U << SIZE_INV_SHIFT) / (s)) + 1) - static const unsigned interval_invs[] = { - SIZE_INV(3), - SIZE_INV(4), SIZE_INV(5), SIZE_INV(6), SIZE_INV(7), - SIZE_INV(8), SIZE_INV(9), SIZE_INV(10), SIZE_INV(11), - SIZE_INV(12), SIZE_INV(13), SIZE_INV(14), SIZE_INV(15), - SIZE_INV(16), SIZE_INV(17), SIZE_INV(18), SIZE_INV(19), - SIZE_INV(20), SIZE_INV(21), SIZE_INV(22), SIZE_INV(23), - SIZE_INV(24), SIZE_INV(25), SIZE_INV(26), SIZE_INV(27), - SIZE_INV(28), SIZE_INV(29), SIZE_INV(30), SIZE_INV(31) - }; - - if (likely(interval <= ((sizeof(interval_invs) / - sizeof(unsigned)) + 2))) { - regind = (diff * interval_invs[interval - 3]) >> - SIZE_INV_SHIFT; - } else - regind = diff / interval; -#undef SIZE_INV -#undef SIZE_INV_SHIFT - } - assert(diff == regind * interval); - assert(regind < bin_info->nregs); - - return (regind); -} - -JEMALLOC_INLINE prof_tctx_t * -arena_prof_tctx_get(const void *ptr) -{ - prof_tctx_t *ret; - arena_chunk_t *chunk; - - cassert(config_prof); - assert(ptr != NULL); - - chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr); - if (likely(chunk != ptr)) { - size_t pageind = ((uintptr_t)ptr - (uintptr_t)chunk) >> LG_PAGE; - size_t mapbits = arena_mapbits_get(chunk, pageind); - assert((mapbits & CHUNK_MAP_ALLOCATED) != 0); - if (likely((mapbits & CHUNK_MAP_LARGE) == 0)) - ret = (prof_tctx_t *)(uintptr_t)1U; - else { - arena_chunk_map_misc_t *elm = arena_miscelm_get(chunk, - pageind); - ret = atomic_read_p(&elm->prof_tctx_pun); - } - } else - ret = huge_prof_tctx_get(ptr); - - return (ret); -} - -JEMALLOC_INLINE void -arena_prof_tctx_set(const void *ptr, size_t usize, prof_tctx_t *tctx) -{ - arena_chunk_t *chunk; - - cassert(config_prof); - assert(ptr != NULL); - - chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr); - if (likely(chunk != ptr)) { - size_t pageind = ((uintptr_t)ptr - (uintptr_t)chunk) >> LG_PAGE; - - assert(arena_mapbits_allocated_get(chunk, pageind) != 0); - - if (unlikely(usize > SMALL_MAXCLASS || (uintptr_t)tctx > - (uintptr_t)1U)) { - arena_chunk_map_misc_t *elm; - - assert(arena_mapbits_large_get(chunk, pageind) != 0); - - elm = arena_miscelm_get(chunk, pageind); - atomic_write_p(&elm->prof_tctx_pun, tctx); - } else { - /* - * tctx must always be initialized for large runs. - * Assert that the surrounding conditional logic is - * equivalent to checking whether ptr refers to a large - * run. - */ - assert(arena_mapbits_large_get(chunk, pageind) == 0); - } - } else - huge_prof_tctx_set(ptr, tctx); -} - -JEMALLOC_INLINE void -arena_prof_tctx_reset(const void *ptr, size_t usize, const void *old_ptr, - prof_tctx_t *old_tctx) -{ - - cassert(config_prof); - assert(ptr != NULL); - - if (unlikely(usize > SMALL_MAXCLASS || (ptr == old_ptr && - (uintptr_t)old_tctx > (uintptr_t)1U))) { - arena_chunk_t *chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr); - if (likely(chunk != ptr)) { - size_t pageind; - arena_chunk_map_misc_t *elm; - - pageind = ((uintptr_t)ptr - (uintptr_t)chunk) >> - LG_PAGE; - assert(arena_mapbits_allocated_get(chunk, pageind) != - 0); - assert(arena_mapbits_large_get(chunk, pageind) != 0); - - elm = arena_miscelm_get(chunk, pageind); - atomic_write_p(&elm->prof_tctx_pun, - (prof_tctx_t *)(uintptr_t)1U); - } else - huge_prof_tctx_reset(ptr); - } -} - -JEMALLOC_ALWAYS_INLINE void * -arena_malloc(tsd_t *tsd, arena_t *arena, size_t size, bool zero, - tcache_t *tcache) -{ - - assert(size != 0); - - arena = arena_choose(tsd, arena); - if (unlikely(arena == NULL)) - return (NULL); - - if (likely(size <= SMALL_MAXCLASS)) { - if (likely(tcache != NULL)) { - return (tcache_alloc_small(tsd, arena, tcache, size, - zero)); - } else - return (arena_malloc_small(arena, size, zero)); - } else if (likely(size <= large_maxclass)) { - /* - * Initialize tcache after checking size in order to avoid - * infinite recursion during tcache initialization. - */ - if (likely(tcache != NULL) && size <= tcache_maxclass) { - return (tcache_alloc_large(tsd, arena, tcache, size, - zero)); - } else - return (arena_malloc_large(arena, size, zero)); - } else - return (huge_malloc(tsd, arena, size, zero, tcache)); -} - -JEMALLOC_ALWAYS_INLINE arena_t * -arena_aalloc(const void *ptr) -{ - arena_chunk_t *chunk; - - chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr); - if (likely(chunk != ptr)) - return (extent_node_arena_get(&chunk->node)); - else - return (huge_aalloc(ptr)); -} - -/* Return the size of the allocation pointed to by ptr. */ -JEMALLOC_ALWAYS_INLINE size_t -arena_salloc(const void *ptr, bool demote) -{ - size_t ret; - arena_chunk_t *chunk; - size_t pageind; - szind_t binind; - - assert(ptr != NULL); - - chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr); - if (likely(chunk != ptr)) { - pageind = ((uintptr_t)ptr - (uintptr_t)chunk) >> LG_PAGE; - assert(arena_mapbits_allocated_get(chunk, pageind) != 0); - binind = arena_mapbits_binind_get(chunk, pageind); - if (unlikely(binind == BININD_INVALID || (config_prof && !demote - && arena_mapbits_large_get(chunk, pageind) != 0))) { - /* - * Large allocation. In the common case (demote), and - * as this is an inline function, most callers will only - * end up looking at binind to determine that ptr is a - * small allocation. - */ - assert(config_cache_oblivious || ((uintptr_t)ptr & - PAGE_MASK) == 0); - ret = arena_mapbits_large_size_get(chunk, pageind) - - large_pad; - assert(ret != 0); - assert(pageind + ((ret+large_pad)>>LG_PAGE) <= - chunk_npages); - assert(arena_mapbits_dirty_get(chunk, pageind) == - arena_mapbits_dirty_get(chunk, - pageind+((ret+large_pad)>>LG_PAGE)-1)); - } else { - /* - * Small allocation (possibly promoted to a large - * object). - */ - assert(arena_mapbits_large_get(chunk, pageind) != 0 || - arena_ptr_small_binind_get(ptr, - arena_mapbits_get(chunk, pageind)) == binind); - ret = index2size(binind); - } - } else - ret = huge_salloc(ptr); - - return (ret); -} - -JEMALLOC_ALWAYS_INLINE void -arena_dalloc(tsd_t *tsd, void *ptr, tcache_t *tcache) -{ - arena_chunk_t *chunk; - size_t pageind, mapbits; - - assert(ptr != NULL); - - chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr); - if (likely(chunk != ptr)) { - pageind = ((uintptr_t)ptr - (uintptr_t)chunk) >> LG_PAGE; - mapbits = arena_mapbits_get(chunk, pageind); - assert(arena_mapbits_allocated_get(chunk, pageind) != 0); - if (likely((mapbits & CHUNK_MAP_LARGE) == 0)) { - /* Small allocation. */ - if (likely(tcache != NULL)) { - szind_t binind = arena_ptr_small_binind_get(ptr, - mapbits); - tcache_dalloc_small(tsd, tcache, ptr, binind); - } else { - arena_dalloc_small(extent_node_arena_get( - &chunk->node), chunk, ptr, pageind); - } - } else { - size_t size = arena_mapbits_large_size_get(chunk, - pageind); - - assert(config_cache_oblivious || ((uintptr_t)ptr & - PAGE_MASK) == 0); - - if (likely(tcache != NULL) && size - large_pad <= - tcache_maxclass) { - tcache_dalloc_large(tsd, tcache, ptr, size - - large_pad); - } else { - arena_dalloc_large(extent_node_arena_get( - &chunk->node), chunk, ptr); - } - } - } else - huge_dalloc(tsd, ptr, tcache); -} - -JEMALLOC_ALWAYS_INLINE void -arena_sdalloc(tsd_t *tsd, void *ptr, size_t size, tcache_t *tcache) -{ - arena_chunk_t *chunk; - - chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr); - if (likely(chunk != ptr)) { - if (config_prof && opt_prof) { - size_t pageind = ((uintptr_t)ptr - (uintptr_t)chunk) >> - LG_PAGE; - assert(arena_mapbits_allocated_get(chunk, pageind) != 0); - if (arena_mapbits_large_get(chunk, pageind) != 0) { - /* - * Make sure to use promoted size, not request - * size. - */ - size = arena_mapbits_large_size_get(chunk, - pageind) - large_pad; - } - } - assert(s2u(size) == s2u(arena_salloc(ptr, false))); - - if (likely(size <= SMALL_MAXCLASS)) { - /* Small allocation. */ - if (likely(tcache != NULL)) { - szind_t binind = size2index(size); - tcache_dalloc_small(tsd, tcache, ptr, binind); - } else { - size_t pageind = ((uintptr_t)ptr - - (uintptr_t)chunk) >> LG_PAGE; - arena_dalloc_small(extent_node_arena_get( - &chunk->node), chunk, ptr, pageind); - } - } else { - assert(config_cache_oblivious || ((uintptr_t)ptr & - PAGE_MASK) == 0); - - if (likely(tcache != NULL) && size <= tcache_maxclass) - tcache_dalloc_large(tsd, tcache, ptr, size); - else { - arena_dalloc_large(extent_node_arena_get( - &chunk->node), chunk, ptr); - } - } - } else - huge_dalloc(tsd, ptr, tcache); -} -# endif /* JEMALLOC_ARENA_INLINE_B */ -#endif - -#endif /* JEMALLOC_H_INLINES */ -/******************************************************************************/ diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/base.h b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/base.h deleted file mode 100644 index 39e46ee..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/base.h +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************/ -#ifdef JEMALLOC_H_TYPES - -#endif /* JEMALLOC_H_TYPES */ -/******************************************************************************/ -#ifdef JEMALLOC_H_STRUCTS - -#endif /* JEMALLOC_H_STRUCTS */ -/******************************************************************************/ -#ifdef JEMALLOC_H_EXTERNS - -void *base_alloc(size_t size); -void base_stats_get(size_t *allocated, size_t *resident, size_t *mapped); -bool base_boot(void); -void base_prefork(void); -void base_postfork_parent(void); -void base_postfork_child(void); - -#endif /* JEMALLOC_H_EXTERNS */ -/******************************************************************************/ -#ifdef JEMALLOC_H_INLINES - -#endif /* JEMALLOC_H_INLINES */ -/******************************************************************************/ diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/chunk.h b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/chunk.h deleted file mode 100644 index 5d19383..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/chunk.h +++ /dev/null @@ -1,99 +0,0 @@ -/******************************************************************************/ -#ifdef JEMALLOC_H_TYPES - -/* - * Size and alignment of memory chunks that are allocated by the OS's virtual - * memory system. - */ -#define LG_CHUNK_DEFAULT 21 - -/* Return the chunk address for allocation address a. */ -#define CHUNK_ADDR2BASE(a) \ - ((void *)((uintptr_t)(a) & ~chunksize_mask)) - -/* Return the chunk offset of address a. */ -#define CHUNK_ADDR2OFFSET(a) \ - ((size_t)((uintptr_t)(a) & chunksize_mask)) - -/* Return the smallest chunk multiple that is >= s. */ -#define CHUNK_CEILING(s) \ - (((s) + chunksize_mask) & ~chunksize_mask) - -#define CHUNK_HOOKS_INITIALIZER { \ - NULL, \ - NULL, \ - NULL, \ - NULL, \ - NULL, \ - NULL, \ - NULL \ -} - -#endif /* JEMALLOC_H_TYPES */ -/******************************************************************************/ -#ifdef JEMALLOC_H_STRUCTS - -#endif /* JEMALLOC_H_STRUCTS */ -/******************************************************************************/ -#ifdef JEMALLOC_H_EXTERNS - -extern size_t opt_lg_chunk; -extern const char *opt_dss; - -extern rtree_t chunks_rtree; - -extern size_t chunksize; -extern size_t chunksize_mask; /* (chunksize - 1). */ -extern size_t chunk_npages; - -extern const chunk_hooks_t chunk_hooks_default; - -chunk_hooks_t chunk_hooks_get(arena_t *arena); -chunk_hooks_t chunk_hooks_set(arena_t *arena, - const chunk_hooks_t *chunk_hooks); - -bool chunk_register(const void *chunk, const extent_node_t *node); -void chunk_deregister(const void *chunk, const extent_node_t *node); -void *chunk_alloc_base(size_t size); -void *chunk_alloc_cache(arena_t *arena, chunk_hooks_t *chunk_hooks, - void *new_addr, size_t size, size_t alignment, bool *zero, - bool dalloc_node); -void *chunk_alloc_wrapper(arena_t *arena, chunk_hooks_t *chunk_hooks, - void *new_addr, size_t size, size_t alignment, bool *zero, bool *commit); -void chunk_dalloc_cache(arena_t *arena, chunk_hooks_t *chunk_hooks, - void *chunk, size_t size, bool committed); -void chunk_dalloc_arena(arena_t *arena, chunk_hooks_t *chunk_hooks, - void *chunk, size_t size, bool zeroed, bool committed); -void chunk_dalloc_wrapper(arena_t *arena, chunk_hooks_t *chunk_hooks, - void *chunk, size_t size, bool committed); -bool chunk_purge_arena(arena_t *arena, void *chunk, size_t offset, - size_t length); -bool chunk_purge_wrapper(arena_t *arena, chunk_hooks_t *chunk_hooks, - void *chunk, size_t size, size_t offset, size_t length); -bool chunk_boot(void); -void chunk_prefork(void); -void chunk_postfork_parent(void); -void chunk_postfork_child(void); - -#endif /* JEMALLOC_H_EXTERNS */ -/******************************************************************************/ -#ifdef JEMALLOC_H_INLINES - -#ifndef JEMALLOC_ENABLE_INLINE -extent_node_t *chunk_lookup(const void *chunk, bool dependent); -#endif - -#if (defined(JEMALLOC_ENABLE_INLINE) || defined(JEMALLOC_CHUNK_C_)) -JEMALLOC_INLINE extent_node_t * -chunk_lookup(const void *ptr, bool dependent) -{ - - return (rtree_get(&chunks_rtree, (uintptr_t)ptr, dependent)); -} -#endif - -#endif /* JEMALLOC_H_INLINES */ -/******************************************************************************/ - -#include "jemalloc/internal/chunk_dss.h" -#include "jemalloc/internal/chunk_mmap.h" diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/chunk_dss.h b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/chunk_dss.h deleted file mode 100644 index 388f46b..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/chunk_dss.h +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************/ -#ifdef JEMALLOC_H_TYPES - -typedef enum { - dss_prec_disabled = 0, - dss_prec_primary = 1, - dss_prec_secondary = 2, - - dss_prec_limit = 3 -} dss_prec_t; -#define DSS_PREC_DEFAULT dss_prec_secondary -#define DSS_DEFAULT "secondary" - -#endif /* JEMALLOC_H_TYPES */ -/******************************************************************************/ -#ifdef JEMALLOC_H_STRUCTS - -extern const char *dss_prec_names[]; - -#endif /* JEMALLOC_H_STRUCTS */ -/******************************************************************************/ -#ifdef JEMALLOC_H_EXTERNS - -dss_prec_t chunk_dss_prec_get(void); -bool chunk_dss_prec_set(dss_prec_t dss_prec); -void *chunk_alloc_dss(arena_t *arena, void *new_addr, size_t size, - size_t alignment, bool *zero, bool *commit); -bool chunk_in_dss(void *chunk); -bool chunk_dss_boot(void); -void chunk_dss_prefork(void); -void chunk_dss_postfork_parent(void); -void chunk_dss_postfork_child(void); - -#endif /* JEMALLOC_H_EXTERNS */ -/******************************************************************************/ -#ifdef JEMALLOC_H_INLINES - -#endif /* JEMALLOC_H_INLINES */ -/******************************************************************************/ diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/chunk_mmap.h b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/chunk_mmap.h deleted file mode 100644 index 7d8014c..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/chunk_mmap.h +++ /dev/null @@ -1,21 +0,0 @@ -/******************************************************************************/ -#ifdef JEMALLOC_H_TYPES - -#endif /* JEMALLOC_H_TYPES */ -/******************************************************************************/ -#ifdef JEMALLOC_H_STRUCTS - -#endif /* JEMALLOC_H_STRUCTS */ -/******************************************************************************/ -#ifdef JEMALLOC_H_EXTERNS - -void *chunk_alloc_mmap(size_t size, size_t alignment, bool *zero, - bool *commit); -bool chunk_dalloc_mmap(void *chunk, size_t size); - -#endif /* JEMALLOC_H_EXTERNS */ -/******************************************************************************/ -#ifdef JEMALLOC_H_INLINES - -#endif /* JEMALLOC_H_INLINES */ -/******************************************************************************/ diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/extent.h b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/extent.h deleted file mode 100644 index 386d50e..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/extent.h +++ /dev/null @@ -1,239 +0,0 @@ -/******************************************************************************/ -#ifdef JEMALLOC_H_TYPES - -typedef struct extent_node_s extent_node_t; - -#endif /* JEMALLOC_H_TYPES */ -/******************************************************************************/ -#ifdef JEMALLOC_H_STRUCTS - -/* Tree of extents. Use accessor functions for en_* fields. */ -struct extent_node_s { - /* Arena from which this extent came, if any. */ - arena_t *en_arena; - - /* Pointer to the extent that this tree node is responsible for. */ - void *en_addr; - - /* Total region size. */ - size_t en_size; - - /* - * The zeroed flag is used by chunk recycling code to track whether - * memory is zero-filled. - */ - bool en_zeroed; - - /* - * True if physical memory is committed to the extent, whether - * explicitly or implicitly as on a system that overcommits and - * satisfies physical memory needs on demand via soft page faults. - */ - bool en_committed; - - /* - * The achunk flag is used to validate that huge allocation lookups - * don't return arena chunks. - */ - bool en_achunk; - - /* Profile counters, used for huge objects. */ - prof_tctx_t *en_prof_tctx; - - /* Linkage for arena's runs_dirty and chunks_cache rings. */ - arena_runs_dirty_link_t rd; - qr(extent_node_t) cc_link; - - union { - /* Linkage for the size/address-ordered tree. */ - rb_node(extent_node_t) szad_link; - - /* Linkage for arena's huge and node_cache lists. */ - ql_elm(extent_node_t) ql_link; - }; - - /* Linkage for the address-ordered tree. */ - rb_node(extent_node_t) ad_link; -}; -typedef rb_tree(extent_node_t) extent_tree_t; - -#endif /* JEMALLOC_H_STRUCTS */ -/******************************************************************************/ -#ifdef JEMALLOC_H_EXTERNS - -rb_proto(, extent_tree_szad_, extent_tree_t, extent_node_t) - -rb_proto(, extent_tree_ad_, extent_tree_t, extent_node_t) - -#endif /* JEMALLOC_H_EXTERNS */ -/******************************************************************************/ -#ifdef JEMALLOC_H_INLINES - -#ifndef JEMALLOC_ENABLE_INLINE -arena_t *extent_node_arena_get(const extent_node_t *node); -void *extent_node_addr_get(const extent_node_t *node); -size_t extent_node_size_get(const extent_node_t *node); -bool extent_node_zeroed_get(const extent_node_t *node); -bool extent_node_committed_get(const extent_node_t *node); -bool extent_node_achunk_get(const extent_node_t *node); -prof_tctx_t *extent_node_prof_tctx_get(const extent_node_t *node); -void extent_node_arena_set(extent_node_t *node, arena_t *arena); -void extent_node_addr_set(extent_node_t *node, void *addr); -void extent_node_size_set(extent_node_t *node, size_t size); -void extent_node_zeroed_set(extent_node_t *node, bool zeroed); -void extent_node_committed_set(extent_node_t *node, bool committed); -void extent_node_achunk_set(extent_node_t *node, bool achunk); -void extent_node_prof_tctx_set(extent_node_t *node, prof_tctx_t *tctx); -void extent_node_init(extent_node_t *node, arena_t *arena, void *addr, - size_t size, bool zeroed, bool committed); -void extent_node_dirty_linkage_init(extent_node_t *node); -void extent_node_dirty_insert(extent_node_t *node, - arena_runs_dirty_link_t *runs_dirty, extent_node_t *chunks_dirty); -void extent_node_dirty_remove(extent_node_t *node); -#endif - -#if (defined(JEMALLOC_ENABLE_INLINE) || defined(JEMALLOC_EXTENT_C_)) -JEMALLOC_INLINE arena_t * -extent_node_arena_get(const extent_node_t *node) -{ - - return (node->en_arena); -} - -JEMALLOC_INLINE void * -extent_node_addr_get(const extent_node_t *node) -{ - - return (node->en_addr); -} - -JEMALLOC_INLINE size_t -extent_node_size_get(const extent_node_t *node) -{ - - return (node->en_size); -} - -JEMALLOC_INLINE bool -extent_node_zeroed_get(const extent_node_t *node) -{ - - return (node->en_zeroed); -} - -JEMALLOC_INLINE bool -extent_node_committed_get(const extent_node_t *node) -{ - - assert(!node->en_achunk); - return (node->en_committed); -} - -JEMALLOC_INLINE bool -extent_node_achunk_get(const extent_node_t *node) -{ - - return (node->en_achunk); -} - -JEMALLOC_INLINE prof_tctx_t * -extent_node_prof_tctx_get(const extent_node_t *node) -{ - - return (node->en_prof_tctx); -} - -JEMALLOC_INLINE void -extent_node_arena_set(extent_node_t *node, arena_t *arena) -{ - - node->en_arena = arena; -} - -JEMALLOC_INLINE void -extent_node_addr_set(extent_node_t *node, void *addr) -{ - - node->en_addr = addr; -} - -JEMALLOC_INLINE void -extent_node_size_set(extent_node_t *node, size_t size) -{ - - node->en_size = size; -} - -JEMALLOC_INLINE void -extent_node_zeroed_set(extent_node_t *node, bool zeroed) -{ - - node->en_zeroed = zeroed; -} - -JEMALLOC_INLINE void -extent_node_committed_set(extent_node_t *node, bool committed) -{ - - node->en_committed = committed; -} - -JEMALLOC_INLINE void -extent_node_achunk_set(extent_node_t *node, bool achunk) -{ - - node->en_achunk = achunk; -} - -JEMALLOC_INLINE void -extent_node_prof_tctx_set(extent_node_t *node, prof_tctx_t *tctx) -{ - - node->en_prof_tctx = tctx; -} - -JEMALLOC_INLINE void -extent_node_init(extent_node_t *node, arena_t *arena, void *addr, size_t size, - bool zeroed, bool committed) -{ - - extent_node_arena_set(node, arena); - extent_node_addr_set(node, addr); - extent_node_size_set(node, size); - extent_node_zeroed_set(node, zeroed); - extent_node_committed_set(node, committed); - extent_node_achunk_set(node, false); - if (config_prof) - extent_node_prof_tctx_set(node, NULL); -} - -JEMALLOC_INLINE void -extent_node_dirty_linkage_init(extent_node_t *node) -{ - - qr_new(&node->rd, rd_link); - qr_new(node, cc_link); -} - -JEMALLOC_INLINE void -extent_node_dirty_insert(extent_node_t *node, - arena_runs_dirty_link_t *runs_dirty, extent_node_t *chunks_dirty) -{ - - qr_meld(runs_dirty, &node->rd, rd_link); - qr_meld(chunks_dirty, node, cc_link); -} - -JEMALLOC_INLINE void -extent_node_dirty_remove(extent_node_t *node) -{ - - qr_remove(&node->rd, rd_link); - qr_remove(node, cc_link); -} - -#endif - -#endif /* JEMALLOC_H_INLINES */ -/******************************************************************************/ - diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/huge.h b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/huge.h deleted file mode 100644 index ece7af9..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/huge.h +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************/ -#ifdef JEMALLOC_H_TYPES - -#endif /* JEMALLOC_H_TYPES */ -/******************************************************************************/ -#ifdef JEMALLOC_H_STRUCTS - -#endif /* JEMALLOC_H_STRUCTS */ -/******************************************************************************/ -#ifdef JEMALLOC_H_EXTERNS - -void *huge_malloc(tsd_t *tsd, arena_t *arena, size_t size, bool zero, - tcache_t *tcache); -void *huge_palloc(tsd_t *tsd, arena_t *arena, size_t size, size_t alignment, - bool zero, tcache_t *tcache); -bool huge_ralloc_no_move(void *ptr, size_t oldsize, size_t usize_min, - size_t usize_max, bool zero); -void *huge_ralloc(tsd_t *tsd, arena_t *arena, void *ptr, size_t oldsize, - size_t usize, size_t alignment, bool zero, tcache_t *tcache); -#ifdef JEMALLOC_JET -typedef void (huge_dalloc_junk_t)(void *, size_t); -extern huge_dalloc_junk_t *huge_dalloc_junk; -#endif -void huge_dalloc(tsd_t *tsd, void *ptr, tcache_t *tcache); -arena_t *huge_aalloc(const void *ptr); -size_t huge_salloc(const void *ptr); -prof_tctx_t *huge_prof_tctx_get(const void *ptr); -void huge_prof_tctx_set(const void *ptr, prof_tctx_t *tctx); -void huge_prof_tctx_reset(const void *ptr); - -#endif /* JEMALLOC_H_EXTERNS */ -/******************************************************************************/ -#ifdef JEMALLOC_H_INLINES - -#endif /* JEMALLOC_H_INLINES */ -/******************************************************************************/ diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/jemalloc_internal.h.in b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/jemalloc_internal.h.in deleted file mode 100644 index 8536a3e..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/jemalloc_internal.h.in +++ /dev/null @@ -1,1134 +0,0 @@ -#ifndef JEMALLOC_INTERNAL_H -#define JEMALLOC_INTERNAL_H - -#include "jemalloc_internal_defs.h" -#include "jemalloc/internal/jemalloc_internal_decls.h" - -#ifdef JEMALLOC_UTRACE -#include -#endif - -#define JEMALLOC_NO_DEMANGLE -#ifdef JEMALLOC_JET -# define JEMALLOC_N(n) jet_##n -# include "jemalloc/internal/public_namespace.h" -# define JEMALLOC_NO_RENAME -# include "../jemalloc@install_suffix@.h" -# undef JEMALLOC_NO_RENAME -#else -# define JEMALLOC_N(n) @private_namespace@##n -# include "../jemalloc@install_suffix@.h" -#endif -#include "jemalloc/internal/private_namespace.h" - -static const bool config_debug = -#ifdef JEMALLOC_DEBUG - true -#else - false -#endif - ; -static const bool have_dss = -#ifdef JEMALLOC_DSS - true -#else - false -#endif - ; -static const bool config_fill = -#ifdef JEMALLOC_FILL - true -#else - false -#endif - ; -static const bool config_lazy_lock = -#ifdef JEMALLOC_LAZY_LOCK - true -#else - false -#endif - ; -static const bool config_prof = -#ifdef JEMALLOC_PROF - true -#else - false -#endif - ; -static const bool config_prof_libgcc = -#ifdef JEMALLOC_PROF_LIBGCC - true -#else - false -#endif - ; -static const bool config_prof_libunwind = -#ifdef JEMALLOC_PROF_LIBUNWIND - true -#else - false -#endif - ; -static const bool maps_coalesce = -#ifdef JEMALLOC_MAPS_COALESCE - true -#else - false -#endif - ; -static const bool config_munmap = -#ifdef JEMALLOC_MUNMAP - true -#else - false -#endif - ; -static const bool config_stats = -#ifdef JEMALLOC_STATS - true -#else - false -#endif - ; -static const bool config_tcache = -#ifdef JEMALLOC_TCACHE - true -#else - false -#endif - ; -static const bool config_tls = -#ifdef JEMALLOC_TLS - true -#else - false -#endif - ; -static const bool config_utrace = -#ifdef JEMALLOC_UTRACE - true -#else - false -#endif - ; -static const bool config_valgrind = -#ifdef JEMALLOC_VALGRIND - true -#else - false -#endif - ; -static const bool config_xmalloc = -#ifdef JEMALLOC_XMALLOC - true -#else - false -#endif - ; -static const bool config_ivsalloc = -#ifdef JEMALLOC_IVSALLOC - true -#else - false -#endif - ; -static const bool config_cache_oblivious = -#ifdef JEMALLOC_CACHE_OBLIVIOUS - true -#else - false -#endif - ; - -#ifdef JEMALLOC_C11ATOMICS -#include -#endif - -#ifdef JEMALLOC_ATOMIC9 -#include -#endif - -#if (defined(JEMALLOC_OSATOMIC) || defined(JEMALLOC_OSSPIN)) -#include -#endif - -#ifdef JEMALLOC_ZONE -#include -#include -#include -#include -#endif - -#define RB_COMPACT -#include "jemalloc/internal/rb.h" -#include "jemalloc/internal/qr.h" -#include "jemalloc/internal/ql.h" - -/* - * jemalloc can conceptually be broken into components (arena, tcache, etc.), - * but there are circular dependencies that cannot be broken without - * substantial performance degradation. In order to reduce the effect on - * visual code flow, read the header files in multiple passes, with one of the - * following cpp variables defined during each pass: - * - * JEMALLOC_H_TYPES : Preprocessor-defined constants and psuedo-opaque data - * types. - * JEMALLOC_H_STRUCTS : Data structures. - * JEMALLOC_H_EXTERNS : Extern data declarations and function prototypes. - * JEMALLOC_H_INLINES : Inline functions. - */ -/******************************************************************************/ -#define JEMALLOC_H_TYPES - -#include "jemalloc/internal/jemalloc_internal_macros.h" - -/* Size class index type. */ -typedef unsigned szind_t; - -/* - * Flags bits: - * - * a: arena - * t: tcache - * 0: unused - * z: zero - * n: alignment - * - * aaaaaaaa aaaatttt tttttttt 0znnnnnn - */ -#define MALLOCX_ARENA_MASK ((int)~0xfffff) -#define MALLOCX_ARENA_MAX 0xffe -#define MALLOCX_TCACHE_MASK ((int)~0xfff000ffU) -#define MALLOCX_TCACHE_MAX 0xffd -#define MALLOCX_LG_ALIGN_MASK ((int)0x3f) -/* Use MALLOCX_ALIGN_GET() if alignment may not be specified in flags. */ -#define MALLOCX_ALIGN_GET_SPECIFIED(flags) \ - (ZU(1) << (flags & MALLOCX_LG_ALIGN_MASK)) -#define MALLOCX_ALIGN_GET(flags) \ - (MALLOCX_ALIGN_GET_SPECIFIED(flags) & (SIZE_T_MAX-1)) -#define MALLOCX_ZERO_GET(flags) \ - ((bool)(flags & MALLOCX_ZERO)) - -#define MALLOCX_TCACHE_GET(flags) \ - (((unsigned)((flags & MALLOCX_TCACHE_MASK) >> 8)) - 2) -#define MALLOCX_ARENA_GET(flags) \ - (((unsigned)(((unsigned)flags) >> 20)) - 1) - -/* Smallest size class to support. */ -#define TINY_MIN (1U << LG_TINY_MIN) - -/* - * Minimum allocation alignment is 2^LG_QUANTUM bytes (ignoring tiny size - * classes). - */ -#ifndef LG_QUANTUM -# if (defined(__i386__) || defined(_M_IX86)) -# define LG_QUANTUM 4 -# endif -# ifdef __ia64__ -# define LG_QUANTUM 4 -# endif -# ifdef __alpha__ -# define LG_QUANTUM 4 -# endif -# if (defined(__sparc64__) || defined(__sparcv9)) -# define LG_QUANTUM 4 -# endif -# if (defined(__amd64__) || defined(__x86_64__) || defined(_M_X64)) -# define LG_QUANTUM 4 -# endif -# ifdef __arm__ -# define LG_QUANTUM 3 -# endif -# ifdef __aarch64__ -# define LG_QUANTUM 4 -# endif -# ifdef __hppa__ -# define LG_QUANTUM 4 -# endif -# ifdef __mips__ -# define LG_QUANTUM 3 -# endif -# ifdef __or1k__ -# define LG_QUANTUM 3 -# endif -# ifdef __powerpc__ -# define LG_QUANTUM 4 -# endif -# ifdef __s390__ -# define LG_QUANTUM 4 -# endif -# ifdef __SH4__ -# define LG_QUANTUM 4 -# endif -# ifdef __tile__ -# define LG_QUANTUM 4 -# endif -# ifdef __le32__ -# define LG_QUANTUM 4 -# endif -# ifndef LG_QUANTUM -# error "Unknown minimum alignment for architecture; specify via " - "--with-lg-quantum" -# endif -#endif - -#define QUANTUM ((size_t)(1U << LG_QUANTUM)) -#define QUANTUM_MASK (QUANTUM - 1) - -/* Return the smallest quantum multiple that is >= a. */ -#define QUANTUM_CEILING(a) \ - (((a) + QUANTUM_MASK) & ~QUANTUM_MASK) - -#define LONG ((size_t)(1U << LG_SIZEOF_LONG)) -#define LONG_MASK (LONG - 1) - -/* Return the smallest long multiple that is >= a. */ -#define LONG_CEILING(a) \ - (((a) + LONG_MASK) & ~LONG_MASK) - -#define SIZEOF_PTR (1U << LG_SIZEOF_PTR) -#define PTR_MASK (SIZEOF_PTR - 1) - -/* Return the smallest (void *) multiple that is >= a. */ -#define PTR_CEILING(a) \ - (((a) + PTR_MASK) & ~PTR_MASK) - -/* - * Maximum size of L1 cache line. This is used to avoid cache line aliasing. - * In addition, this controls the spacing of cacheline-spaced size classes. - * - * CACHELINE cannot be based on LG_CACHELINE because __declspec(align()) can - * only handle raw constants. - */ -#define LG_CACHELINE 6 -#define CACHELINE 64 -#define CACHELINE_MASK (CACHELINE - 1) - -/* Return the smallest cacheline multiple that is >= s. */ -#define CACHELINE_CEILING(s) \ - (((s) + CACHELINE_MASK) & ~CACHELINE_MASK) - -/* Page size. LG_PAGE is determined by the configure script. */ -#ifdef PAGE_MASK -# undef PAGE_MASK -#endif -#define PAGE ((size_t)(1U << LG_PAGE)) -#define PAGE_MASK ((size_t)(PAGE - 1)) - -/* Return the smallest pagesize multiple that is >= s. */ -#define PAGE_CEILING(s) \ - (((s) + PAGE_MASK) & ~PAGE_MASK) - -/* Return the nearest aligned address at or below a. */ -#define ALIGNMENT_ADDR2BASE(a, alignment) \ - ((void *)((uintptr_t)(a) & (-(alignment)))) - -/* Return the offset between a and the nearest aligned address at or below a. */ -#define ALIGNMENT_ADDR2OFFSET(a, alignment) \ - ((size_t)((uintptr_t)(a) & (alignment - 1))) - -/* Return the smallest alignment multiple that is >= s. */ -#define ALIGNMENT_CEILING(s, alignment) \ - (((s) + (alignment - 1)) & (-(alignment))) - -/* Declare a variable-length array. */ -#if __STDC_VERSION__ < 199901L -# ifdef _MSC_VER -# include -# define alloca _alloca -# else -# ifdef JEMALLOC_HAS_ALLOCA_H -# include -# else -# include -# endif -# endif -# define VARIABLE_ARRAY(type, name, count) \ - type *name = alloca(sizeof(type) * (count)) -#else -# define VARIABLE_ARRAY(type, name, count) type name[(count)] -#endif - -#include "jemalloc/internal/valgrind.h" -#include "jemalloc/internal/util.h" -#include "jemalloc/internal/atomic.h" -#include "jemalloc/internal/prng.h" -#include "jemalloc/internal/ckh.h" -#include "jemalloc/internal/size_classes.h" -#include "jemalloc/internal/stats.h" -#include "jemalloc/internal/ctl.h" -#include "jemalloc/internal/mutex.h" -#include "jemalloc/internal/tsd.h" -#include "jemalloc/internal/mb.h" -#include "jemalloc/internal/extent.h" -#include "jemalloc/internal/arena.h" -#include "jemalloc/internal/bitmap.h" -#include "jemalloc/internal/base.h" -#include "jemalloc/internal/rtree.h" -#include "jemalloc/internal/pages.h" -#include "jemalloc/internal/chunk.h" -#include "jemalloc/internal/huge.h" -#include "jemalloc/internal/tcache.h" -#include "jemalloc/internal/hash.h" -#include "jemalloc/internal/quarantine.h" -#include "jemalloc/internal/prof.h" - -#undef JEMALLOC_H_TYPES -/******************************************************************************/ -#define JEMALLOC_H_STRUCTS - -#include "jemalloc/internal/valgrind.h" -#include "jemalloc/internal/util.h" -#include "jemalloc/internal/atomic.h" -#include "jemalloc/internal/prng.h" -#include "jemalloc/internal/ckh.h" -#include "jemalloc/internal/size_classes.h" -#include "jemalloc/internal/stats.h" -#include "jemalloc/internal/ctl.h" -#include "jemalloc/internal/mutex.h" -#include "jemalloc/internal/mb.h" -#include "jemalloc/internal/bitmap.h" -#define JEMALLOC_ARENA_STRUCTS_A -#include "jemalloc/internal/arena.h" -#undef JEMALLOC_ARENA_STRUCTS_A -#include "jemalloc/internal/extent.h" -#define JEMALLOC_ARENA_STRUCTS_B -#include "jemalloc/internal/arena.h" -#undef JEMALLOC_ARENA_STRUCTS_B -#include "jemalloc/internal/base.h" -#include "jemalloc/internal/rtree.h" -#include "jemalloc/internal/pages.h" -#include "jemalloc/internal/chunk.h" -#include "jemalloc/internal/huge.h" -#include "jemalloc/internal/tcache.h" -#include "jemalloc/internal/hash.h" -#include "jemalloc/internal/quarantine.h" -#include "jemalloc/internal/prof.h" - -#include "jemalloc/internal/tsd.h" - -#undef JEMALLOC_H_STRUCTS -/******************************************************************************/ -#define JEMALLOC_H_EXTERNS - -extern bool opt_abort; -extern const char *opt_junk; -extern bool opt_junk_alloc; -extern bool opt_junk_free; -extern size_t opt_quarantine; -extern bool opt_redzone; -extern bool opt_utrace; -extern bool opt_xmalloc; -extern bool opt_zero; -extern size_t opt_narenas; - -extern bool in_valgrind; - -/* Number of CPUs. */ -extern unsigned ncpus; - -/* - * index2size_tab encodes the same information as could be computed (at - * unacceptable cost in some code paths) by index2size_compute(). - */ -extern size_t const index2size_tab[NSIZES]; -/* - * size2index_tab is a compact lookup table that rounds request sizes up to - * size classes. In order to reduce cache footprint, the table is compressed, - * and all accesses are via size2index(). - */ -extern uint8_t const size2index_tab[]; - -arena_t *a0get(void); -void *a0malloc(size_t size); -void a0dalloc(void *ptr); -void *bootstrap_malloc(size_t size); -void *bootstrap_calloc(size_t num, size_t size); -void bootstrap_free(void *ptr); -arena_t *arenas_extend(unsigned ind); -arena_t *arena_init(unsigned ind); -unsigned narenas_total_get(void); -arena_t *arena_get_hard(tsd_t *tsd, unsigned ind, bool init_if_missing); -arena_t *arena_choose_hard(tsd_t *tsd); -void arena_migrate(tsd_t *tsd, unsigned oldind, unsigned newind); -unsigned arena_nbound(unsigned ind); -void thread_allocated_cleanup(tsd_t *tsd); -void thread_deallocated_cleanup(tsd_t *tsd); -void arena_cleanup(tsd_t *tsd); -void arenas_cache_cleanup(tsd_t *tsd); -void narenas_cache_cleanup(tsd_t *tsd); -void arenas_cache_bypass_cleanup(tsd_t *tsd); -void jemalloc_prefork(void); -void jemalloc_postfork_parent(void); -void jemalloc_postfork_child(void); - -#include "jemalloc/internal/valgrind.h" -#include "jemalloc/internal/util.h" -#include "jemalloc/internal/atomic.h" -#include "jemalloc/internal/prng.h" -#include "jemalloc/internal/ckh.h" -#include "jemalloc/internal/size_classes.h" -#include "jemalloc/internal/stats.h" -#include "jemalloc/internal/ctl.h" -#include "jemalloc/internal/mutex.h" -#include "jemalloc/internal/mb.h" -#include "jemalloc/internal/bitmap.h" -#include "jemalloc/internal/extent.h" -#include "jemalloc/internal/arena.h" -#include "jemalloc/internal/base.h" -#include "jemalloc/internal/rtree.h" -#include "jemalloc/internal/pages.h" -#include "jemalloc/internal/chunk.h" -#include "jemalloc/internal/huge.h" -#include "jemalloc/internal/tcache.h" -#include "jemalloc/internal/hash.h" -#include "jemalloc/internal/quarantine.h" -#include "jemalloc/internal/prof.h" -#include "jemalloc/internal/tsd.h" - -#undef JEMALLOC_H_EXTERNS -/******************************************************************************/ -#define JEMALLOC_H_INLINES - -#include "jemalloc/internal/valgrind.h" -#include "jemalloc/internal/util.h" -#include "jemalloc/internal/atomic.h" -#include "jemalloc/internal/prng.h" -#include "jemalloc/internal/ckh.h" -#include "jemalloc/internal/size_classes.h" -#include "jemalloc/internal/stats.h" -#include "jemalloc/internal/ctl.h" -#include "jemalloc/internal/mutex.h" -#include "jemalloc/internal/tsd.h" -#include "jemalloc/internal/mb.h" -#include "jemalloc/internal/extent.h" -#include "jemalloc/internal/base.h" -#include "jemalloc/internal/rtree.h" -#include "jemalloc/internal/pages.h" -#include "jemalloc/internal/chunk.h" -#include "jemalloc/internal/huge.h" - -#ifndef JEMALLOC_ENABLE_INLINE -szind_t size2index_compute(size_t size); -szind_t size2index_lookup(size_t size); -szind_t size2index(size_t size); -size_t index2size_compute(szind_t index); -size_t index2size_lookup(szind_t index); -size_t index2size(szind_t index); -size_t s2u_compute(size_t size); -size_t s2u_lookup(size_t size); -size_t s2u(size_t size); -size_t sa2u(size_t size, size_t alignment); -arena_t *arena_choose(tsd_t *tsd, arena_t *arena); -arena_t *arena_get(tsd_t *tsd, unsigned ind, bool init_if_missing, - bool refresh_if_missing); -#endif - -#if (defined(JEMALLOC_ENABLE_INLINE) || defined(JEMALLOC_C_)) -JEMALLOC_INLINE szind_t -size2index_compute(size_t size) -{ - -#if (NTBINS != 0) - if (size <= (ZU(1) << LG_TINY_MAXCLASS)) { - size_t lg_tmin = LG_TINY_MAXCLASS - NTBINS + 1; - size_t lg_ceil = lg_floor(pow2_ceil(size)); - return (lg_ceil < lg_tmin ? 0 : lg_ceil - lg_tmin); - } -#endif - { - size_t x = unlikely(ZI(size) < 0) ? ((size<<1) ? - (ZU(1)<<(LG_SIZEOF_PTR+3)) : ((ZU(1)<<(LG_SIZEOF_PTR+3))-1)) - : lg_floor((size<<1)-1); - size_t shift = (x < LG_SIZE_CLASS_GROUP + LG_QUANTUM) ? 0 : - x - (LG_SIZE_CLASS_GROUP + LG_QUANTUM); - size_t grp = shift << LG_SIZE_CLASS_GROUP; - - size_t lg_delta = (x < LG_SIZE_CLASS_GROUP + LG_QUANTUM + 1) - ? LG_QUANTUM : x - LG_SIZE_CLASS_GROUP - 1; - - size_t delta_inverse_mask = ZI(-1) << lg_delta; - size_t mod = ((((size-1) & delta_inverse_mask) >> lg_delta)) & - ((ZU(1) << LG_SIZE_CLASS_GROUP) - 1); - - size_t index = NTBINS + grp + mod; - return (index); - } -} - -JEMALLOC_ALWAYS_INLINE szind_t -size2index_lookup(size_t size) -{ - - assert(size <= LOOKUP_MAXCLASS); - { - size_t ret = ((size_t)(size2index_tab[(size-1) >> - LG_TINY_MIN])); - assert(ret == size2index_compute(size)); - return (ret); - } -} - -JEMALLOC_ALWAYS_INLINE szind_t -size2index(size_t size) -{ - - assert(size > 0); - if (likely(size <= LOOKUP_MAXCLASS)) - return (size2index_lookup(size)); - return (size2index_compute(size)); -} - -JEMALLOC_INLINE size_t -index2size_compute(szind_t index) -{ - -#if (NTBINS > 0) - if (index < NTBINS) - return (ZU(1) << (LG_TINY_MAXCLASS - NTBINS + 1 + index)); -#endif - { - size_t reduced_index = index - NTBINS; - size_t grp = reduced_index >> LG_SIZE_CLASS_GROUP; - size_t mod = reduced_index & ((ZU(1) << LG_SIZE_CLASS_GROUP) - - 1); - - size_t grp_size_mask = ~((!!grp)-1); - size_t grp_size = ((ZU(1) << (LG_QUANTUM + - (LG_SIZE_CLASS_GROUP-1))) << grp) & grp_size_mask; - - size_t shift = (grp == 0) ? 1 : grp; - size_t lg_delta = shift + (LG_QUANTUM-1); - size_t mod_size = (mod+1) << lg_delta; - - size_t usize = grp_size + mod_size; - return (usize); - } -} - -JEMALLOC_ALWAYS_INLINE size_t -index2size_lookup(szind_t index) -{ - size_t ret = (size_t)index2size_tab[index]; - assert(ret == index2size_compute(index)); - return (ret); -} - -JEMALLOC_ALWAYS_INLINE size_t -index2size(szind_t index) -{ - - assert(index < NSIZES); - return (index2size_lookup(index)); -} - -JEMALLOC_ALWAYS_INLINE size_t -s2u_compute(size_t size) -{ - -#if (NTBINS > 0) - if (size <= (ZU(1) << LG_TINY_MAXCLASS)) { - size_t lg_tmin = LG_TINY_MAXCLASS - NTBINS + 1; - size_t lg_ceil = lg_floor(pow2_ceil(size)); - return (lg_ceil < lg_tmin ? (ZU(1) << lg_tmin) : - (ZU(1) << lg_ceil)); - } -#endif - { - size_t x = unlikely(ZI(size) < 0) ? ((size<<1) ? - (ZU(1)<<(LG_SIZEOF_PTR+3)) : ((ZU(1)<<(LG_SIZEOF_PTR+3))-1)) - : lg_floor((size<<1)-1); - size_t lg_delta = (x < LG_SIZE_CLASS_GROUP + LG_QUANTUM + 1) - ? LG_QUANTUM : x - LG_SIZE_CLASS_GROUP - 1; - size_t delta = ZU(1) << lg_delta; - size_t delta_mask = delta - 1; - size_t usize = (size + delta_mask) & ~delta_mask; - return (usize); - } -} - -JEMALLOC_ALWAYS_INLINE size_t -s2u_lookup(size_t size) -{ - size_t ret = index2size_lookup(size2index_lookup(size)); - - assert(ret == s2u_compute(size)); - return (ret); -} - -/* - * Compute usable size that would result from allocating an object with the - * specified size. - */ -JEMALLOC_ALWAYS_INLINE size_t -s2u(size_t size) -{ - - assert(size > 0); - if (likely(size <= LOOKUP_MAXCLASS)) - return (s2u_lookup(size)); - return (s2u_compute(size)); -} - -/* - * Compute usable size that would result from allocating an object with the - * specified size and alignment. - */ -JEMALLOC_ALWAYS_INLINE size_t -sa2u(size_t size, size_t alignment) -{ - size_t usize; - - assert(alignment != 0 && ((alignment - 1) & alignment) == 0); - - /* Try for a small size class. */ - if (size <= SMALL_MAXCLASS && alignment < PAGE) { - /* - * Round size up to the nearest multiple of alignment. - * - * This done, we can take advantage of the fact that for each - * small size class, every object is aligned at the smallest - * power of two that is non-zero in the base two representation - * of the size. For example: - * - * Size | Base 2 | Minimum alignment - * -----+----------+------------------ - * 96 | 1100000 | 32 - * 144 | 10100000 | 32 - * 192 | 11000000 | 64 - */ - usize = s2u(ALIGNMENT_CEILING(size, alignment)); - if (usize < LARGE_MINCLASS) - return (usize); - } - - /* Try for a large size class. */ - if (likely(size <= large_maxclass) && likely(alignment < chunksize)) { - /* - * We can't achieve subpage alignment, so round up alignment - * to the minimum that can actually be supported. - */ - alignment = PAGE_CEILING(alignment); - - /* Make sure result is a large size class. */ - usize = (size <= LARGE_MINCLASS) ? LARGE_MINCLASS : s2u(size); - - /* - * Calculate the size of the over-size run that arena_palloc() - * would need to allocate in order to guarantee the alignment. - */ - if (usize + large_pad + alignment - PAGE <= arena_maxrun) - return (usize); - } - - /* Huge size class. Beware of size_t overflow. */ - - /* - * We can't achieve subchunk alignment, so round up alignment to the - * minimum that can actually be supported. - */ - alignment = CHUNK_CEILING(alignment); - if (alignment == 0) { - /* size_t overflow. */ - return (0); - } - - /* Make sure result is a huge size class. */ - if (size <= chunksize) - usize = chunksize; - else { - usize = s2u(size); - if (usize < size) { - /* size_t overflow. */ - return (0); - } - } - - /* - * Calculate the multi-chunk mapping that huge_palloc() would need in - * order to guarantee the alignment. - */ - if (usize + alignment - PAGE < usize) { - /* size_t overflow. */ - return (0); - } - return (usize); -} - -/* Choose an arena based on a per-thread value. */ -JEMALLOC_INLINE arena_t * -arena_choose(tsd_t *tsd, arena_t *arena) -{ - arena_t *ret; - - if (arena != NULL) - return (arena); - - if (unlikely((ret = tsd_arena_get(tsd)) == NULL)) - ret = arena_choose_hard(tsd); - - return (ret); -} - -JEMALLOC_INLINE arena_t * -arena_get(tsd_t *tsd, unsigned ind, bool init_if_missing, - bool refresh_if_missing) -{ - arena_t *arena; - arena_t **arenas_cache = tsd_arenas_cache_get(tsd); - - /* init_if_missing requires refresh_if_missing. */ - assert(!init_if_missing || refresh_if_missing); - - if (unlikely(arenas_cache == NULL)) { - /* arenas_cache hasn't been initialized yet. */ - return (arena_get_hard(tsd, ind, init_if_missing)); - } - if (unlikely(ind >= tsd_narenas_cache_get(tsd))) { - /* - * ind is invalid, cache is old (too small), or arena to be - * initialized. - */ - return (refresh_if_missing ? arena_get_hard(tsd, ind, - init_if_missing) : NULL); - } - arena = arenas_cache[ind]; - if (likely(arena != NULL) || !refresh_if_missing) - return (arena); - return (arena_get_hard(tsd, ind, init_if_missing)); -} -#endif - -#include "jemalloc/internal/bitmap.h" -/* - * Include portions of arena.h interleaved with tcache.h in order to resolve - * circular dependencies. - */ -#define JEMALLOC_ARENA_INLINE_A -#include "jemalloc/internal/arena.h" -#undef JEMALLOC_ARENA_INLINE_A -#include "jemalloc/internal/tcache.h" -#define JEMALLOC_ARENA_INLINE_B -#include "jemalloc/internal/arena.h" -#undef JEMALLOC_ARENA_INLINE_B -#include "jemalloc/internal/hash.h" -#include "jemalloc/internal/quarantine.h" - -#ifndef JEMALLOC_ENABLE_INLINE -arena_t *iaalloc(const void *ptr); -size_t isalloc(const void *ptr, bool demote); -void *iallocztm(tsd_t *tsd, size_t size, bool zero, tcache_t *tcache, - bool is_metadata, arena_t *arena); -void *imalloct(tsd_t *tsd, size_t size, tcache_t *tcache, arena_t *arena); -void *imalloc(tsd_t *tsd, size_t size); -void *icalloct(tsd_t *tsd, size_t size, tcache_t *tcache, arena_t *arena); -void *icalloc(tsd_t *tsd, size_t size); -void *ipallocztm(tsd_t *tsd, size_t usize, size_t alignment, bool zero, - tcache_t *tcache, bool is_metadata, arena_t *arena); -void *ipalloct(tsd_t *tsd, size_t usize, size_t alignment, bool zero, - tcache_t *tcache, arena_t *arena); -void *ipalloc(tsd_t *tsd, size_t usize, size_t alignment, bool zero); -size_t ivsalloc(const void *ptr, bool demote); -size_t u2rz(size_t usize); -size_t p2rz(const void *ptr); -void idalloctm(tsd_t *tsd, void *ptr, tcache_t *tcache, bool is_metadata); -void idalloct(tsd_t *tsd, void *ptr, tcache_t *tcache); -void idalloc(tsd_t *tsd, void *ptr); -void iqalloc(tsd_t *tsd, void *ptr, tcache_t *tcache); -void isdalloct(tsd_t *tsd, void *ptr, size_t size, tcache_t *tcache); -void isqalloc(tsd_t *tsd, void *ptr, size_t size, tcache_t *tcache); -void *iralloct_realign(tsd_t *tsd, void *ptr, size_t oldsize, size_t size, - size_t extra, size_t alignment, bool zero, tcache_t *tcache, - arena_t *arena); -void *iralloct(tsd_t *tsd, void *ptr, size_t oldsize, size_t size, - size_t alignment, bool zero, tcache_t *tcache, arena_t *arena); -void *iralloc(tsd_t *tsd, void *ptr, size_t oldsize, size_t size, - size_t alignment, bool zero); -bool ixalloc(void *ptr, size_t oldsize, size_t size, size_t extra, - size_t alignment, bool zero); -#endif - -#if (defined(JEMALLOC_ENABLE_INLINE) || defined(JEMALLOC_C_)) -JEMALLOC_ALWAYS_INLINE arena_t * -iaalloc(const void *ptr) -{ - - assert(ptr != NULL); - - return (arena_aalloc(ptr)); -} - -/* - * Typical usage: - * void *ptr = [...] - * size_t sz = isalloc(ptr, config_prof); - */ -JEMALLOC_ALWAYS_INLINE size_t -isalloc(const void *ptr, bool demote) -{ - - assert(ptr != NULL); - /* Demotion only makes sense if config_prof is true. */ - assert(config_prof || !demote); - - return (arena_salloc(ptr, demote)); -} - -JEMALLOC_ALWAYS_INLINE void * -iallocztm(tsd_t *tsd, size_t size, bool zero, tcache_t *tcache, bool is_metadata, - arena_t *arena) -{ - void *ret; - - assert(size != 0); - - ret = arena_malloc(tsd, arena, size, zero, tcache); - if (config_stats && is_metadata && likely(ret != NULL)) { - arena_metadata_allocated_add(iaalloc(ret), isalloc(ret, - config_prof)); - } - return (ret); -} - -JEMALLOC_ALWAYS_INLINE void * -imalloct(tsd_t *tsd, size_t size, tcache_t *tcache, arena_t *arena) -{ - - return (iallocztm(tsd, size, false, tcache, false, arena)); -} - -JEMALLOC_ALWAYS_INLINE void * -imalloc(tsd_t *tsd, size_t size) -{ - - return (iallocztm(tsd, size, false, tcache_get(tsd, true), false, NULL)); -} - -JEMALLOC_ALWAYS_INLINE void * -icalloct(tsd_t *tsd, size_t size, tcache_t *tcache, arena_t *arena) -{ - - return (iallocztm(tsd, size, true, tcache, false, arena)); -} - -JEMALLOC_ALWAYS_INLINE void * -icalloc(tsd_t *tsd, size_t size) -{ - - return (iallocztm(tsd, size, true, tcache_get(tsd, true), false, NULL)); -} - -JEMALLOC_ALWAYS_INLINE void * -ipallocztm(tsd_t *tsd, size_t usize, size_t alignment, bool zero, - tcache_t *tcache, bool is_metadata, arena_t *arena) -{ - void *ret; - - assert(usize != 0); - assert(usize == sa2u(usize, alignment)); - - ret = arena_palloc(tsd, arena, usize, alignment, zero, tcache); - assert(ALIGNMENT_ADDR2BASE(ret, alignment) == ret); - if (config_stats && is_metadata && likely(ret != NULL)) { - arena_metadata_allocated_add(iaalloc(ret), isalloc(ret, - config_prof)); - } - return (ret); -} - -JEMALLOC_ALWAYS_INLINE void * -ipalloct(tsd_t *tsd, size_t usize, size_t alignment, bool zero, - tcache_t *tcache, arena_t *arena) -{ - - return (ipallocztm(tsd, usize, alignment, zero, tcache, false, arena)); -} - -JEMALLOC_ALWAYS_INLINE void * -ipalloc(tsd_t *tsd, size_t usize, size_t alignment, bool zero) -{ - - return (ipallocztm(tsd, usize, alignment, zero, tcache_get(tsd, - NULL), false, NULL)); -} - -JEMALLOC_ALWAYS_INLINE size_t -ivsalloc(const void *ptr, bool demote) -{ - extent_node_t *node; - - /* Return 0 if ptr is not within a chunk managed by jemalloc. */ - node = chunk_lookup(ptr, false); - if (node == NULL) - return (0); - /* Only arena chunks should be looked up via interior pointers. */ - assert(extent_node_addr_get(node) == ptr || - extent_node_achunk_get(node)); - - return (isalloc(ptr, demote)); -} - -JEMALLOC_INLINE size_t -u2rz(size_t usize) -{ - size_t ret; - - if (usize <= SMALL_MAXCLASS) { - szind_t binind = size2index(usize); - ret = arena_bin_info[binind].redzone_size; - } else - ret = 0; - - return (ret); -} - -JEMALLOC_INLINE size_t -p2rz(const void *ptr) -{ - size_t usize = isalloc(ptr, false); - - return (u2rz(usize)); -} - -JEMALLOC_ALWAYS_INLINE void -idalloctm(tsd_t *tsd, void *ptr, tcache_t *tcache, bool is_metadata) -{ - - assert(ptr != NULL); - if (config_stats && is_metadata) { - arena_metadata_allocated_sub(iaalloc(ptr), isalloc(ptr, - config_prof)); - } - - arena_dalloc(tsd, ptr, tcache); -} - -JEMALLOC_ALWAYS_INLINE void -idalloct(tsd_t *tsd, void *ptr, tcache_t *tcache) -{ - - idalloctm(tsd, ptr, tcache, false); -} - -JEMALLOC_ALWAYS_INLINE void -idalloc(tsd_t *tsd, void *ptr) -{ - - idalloctm(tsd, ptr, tcache_get(tsd, false), false); -} - -JEMALLOC_ALWAYS_INLINE void -iqalloc(tsd_t *tsd, void *ptr, tcache_t *tcache) -{ - - if (config_fill && unlikely(opt_quarantine)) - quarantine(tsd, ptr); - else - idalloctm(tsd, ptr, tcache, false); -} - -JEMALLOC_ALWAYS_INLINE void -isdalloct(tsd_t *tsd, void *ptr, size_t size, tcache_t *tcache) -{ - - arena_sdalloc(tsd, ptr, size, tcache); -} - -JEMALLOC_ALWAYS_INLINE void -isqalloc(tsd_t *tsd, void *ptr, size_t size, tcache_t *tcache) -{ - - if (config_fill && unlikely(opt_quarantine)) - quarantine(tsd, ptr); - else - isdalloct(tsd, ptr, size, tcache); -} - -JEMALLOC_ALWAYS_INLINE void * -iralloct_realign(tsd_t *tsd, void *ptr, size_t oldsize, size_t size, - size_t extra, size_t alignment, bool zero, tcache_t *tcache, arena_t *arena) -{ - void *p; - size_t usize, copysize; - - usize = sa2u(size + extra, alignment); - if (usize == 0) - return (NULL); - p = ipalloct(tsd, usize, alignment, zero, tcache, arena); - if (p == NULL) { - if (extra == 0) - return (NULL); - /* Try again, without extra this time. */ - usize = sa2u(size, alignment); - if (usize == 0) - return (NULL); - p = ipalloct(tsd, usize, alignment, zero, tcache, arena); - if (p == NULL) - return (NULL); - } - /* - * Copy at most size bytes (not size+extra), since the caller has no - * expectation that the extra bytes will be reliably preserved. - */ - copysize = (size < oldsize) ? size : oldsize; - memcpy(p, ptr, copysize); - isqalloc(tsd, ptr, oldsize, tcache); - return (p); -} - -JEMALLOC_ALWAYS_INLINE void * -iralloct(tsd_t *tsd, void *ptr, size_t oldsize, size_t size, size_t alignment, - bool zero, tcache_t *tcache, arena_t *arena) -{ - - assert(ptr != NULL); - assert(size != 0); - - if (alignment != 0 && ((uintptr_t)ptr & ((uintptr_t)alignment-1)) - != 0) { - /* - * Existing object alignment is inadequate; allocate new space - * and copy. - */ - return (iralloct_realign(tsd, ptr, oldsize, size, 0, alignment, - zero, tcache, arena)); - } - - return (arena_ralloc(tsd, arena, ptr, oldsize, size, alignment, zero, - tcache)); -} - -JEMALLOC_ALWAYS_INLINE void * -iralloc(tsd_t *tsd, void *ptr, size_t oldsize, size_t size, size_t alignment, - bool zero) -{ - - return (iralloct(tsd, ptr, oldsize, size, alignment, zero, - tcache_get(tsd, true), NULL)); -} - -JEMALLOC_ALWAYS_INLINE bool -ixalloc(void *ptr, size_t oldsize, size_t size, size_t extra, size_t alignment, - bool zero) -{ - - assert(ptr != NULL); - assert(size != 0); - - if (alignment != 0 && ((uintptr_t)ptr & ((uintptr_t)alignment-1)) - != 0) { - /* Existing object alignment is inadequate. */ - return (true); - } - - return (arena_ralloc_no_move(ptr, oldsize, size, extra, zero)); -} -#endif - -#include "jemalloc/internal/prof.h" - -#undef JEMALLOC_H_INLINES -/******************************************************************************/ -#endif /* JEMALLOC_INTERNAL_H */ diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/mb.h b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/mb.h deleted file mode 100644 index 3cfa787..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/mb.h +++ /dev/null @@ -1,115 +0,0 @@ -/******************************************************************************/ -#ifdef JEMALLOC_H_TYPES - -#endif /* JEMALLOC_H_TYPES */ -/******************************************************************************/ -#ifdef JEMALLOC_H_STRUCTS - -#endif /* JEMALLOC_H_STRUCTS */ -/******************************************************************************/ -#ifdef JEMALLOC_H_EXTERNS - -#endif /* JEMALLOC_H_EXTERNS */ -/******************************************************************************/ -#ifdef JEMALLOC_H_INLINES - -#ifndef JEMALLOC_ENABLE_INLINE -void mb_write(void); -#endif - -#if (defined(JEMALLOC_ENABLE_INLINE) || defined(JEMALLOC_MB_C_)) -#ifdef __i386__ -/* - * According to the Intel Architecture Software Developer's Manual, current - * processors execute instructions in order from the perspective of other - * processors in a multiprocessor system, but 1) Intel reserves the right to - * change that, and 2) the compiler's optimizer could re-order instructions if - * there weren't some form of barrier. Therefore, even if running on an - * architecture that does not need memory barriers (everything through at least - * i686), an "optimizer barrier" is necessary. - */ -JEMALLOC_INLINE void -mb_write(void) -{ - -# if 0 - /* This is a true memory barrier. */ - asm volatile ("pusha;" - "xor %%eax,%%eax;" - "cpuid;" - "popa;" - : /* Outputs. */ - : /* Inputs. */ - : "memory" /* Clobbers. */ - ); -#else - /* - * This is hopefully enough to keep the compiler from reordering - * instructions around this one. - */ - asm volatile ("nop;" - : /* Outputs. */ - : /* Inputs. */ - : "memory" /* Clobbers. */ - ); -#endif -} -#elif (defined(__amd64__) || defined(__x86_64__)) -JEMALLOC_INLINE void -mb_write(void) -{ - - asm volatile ("sfence" - : /* Outputs. */ - : /* Inputs. */ - : "memory" /* Clobbers. */ - ); -} -#elif defined(__powerpc__) -JEMALLOC_INLINE void -mb_write(void) -{ - - asm volatile ("eieio" - : /* Outputs. */ - : /* Inputs. */ - : "memory" /* Clobbers. */ - ); -} -#elif defined(__sparc64__) -JEMALLOC_INLINE void -mb_write(void) -{ - - asm volatile ("membar #StoreStore" - : /* Outputs. */ - : /* Inputs. */ - : "memory" /* Clobbers. */ - ); -} -#elif defined(__tile__) -JEMALLOC_INLINE void -mb_write(void) -{ - - __sync_synchronize(); -} -#else -/* - * This is much slower than a simple memory barrier, but the semantics of mutex - * unlock make this work. - */ -JEMALLOC_INLINE void -mb_write(void) -{ - malloc_mutex_t mtx; - - malloc_mutex_init(&mtx); - malloc_mutex_lock(&mtx); - malloc_mutex_unlock(&mtx); -} -#endif -#endif - -#endif /* JEMALLOC_H_INLINES */ -/******************************************************************************/ diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/private_symbols.txt b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/private_symbols.txt deleted file mode 100644 index a90021a..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/private_symbols.txt +++ /dev/null @@ -1,499 +0,0 @@ -a0dalloc -a0get -a0malloc -arena_aalloc -arena_alloc_junk_small -arena_bin_index -arena_bin_info -arena_bitselm_get -arena_boot -arena_choose -arena_choose_hard -arena_chunk_alloc_huge -arena_chunk_cache_maybe_insert -arena_chunk_cache_maybe_remove -arena_chunk_dalloc_huge -arena_chunk_ralloc_huge_expand -arena_chunk_ralloc_huge_shrink -arena_chunk_ralloc_huge_similar -arena_cleanup -arena_dalloc -arena_dalloc_bin -arena_dalloc_bin_junked_locked -arena_dalloc_junk_large -arena_dalloc_junk_small -arena_dalloc_large -arena_dalloc_large_junked_locked -arena_dalloc_small -arena_dss_prec_get -arena_dss_prec_set -arena_get -arena_get_hard -arena_init -arena_lg_dirty_mult_default_get -arena_lg_dirty_mult_default_set -arena_lg_dirty_mult_get -arena_lg_dirty_mult_set -arena_malloc -arena_malloc_large -arena_malloc_small -arena_mapbits_allocated_get -arena_mapbits_binind_get -arena_mapbits_decommitted_get -arena_mapbits_dirty_get -arena_mapbits_get -arena_mapbits_internal_set -arena_mapbits_large_binind_set -arena_mapbits_large_get -arena_mapbits_large_set -arena_mapbits_large_size_get -arena_mapbitsp_get -arena_mapbitsp_read -arena_mapbitsp_write -arena_mapbits_size_decode -arena_mapbits_size_encode -arena_mapbits_small_runind_get -arena_mapbits_small_set -arena_mapbits_unallocated_set -arena_mapbits_unallocated_size_get -arena_mapbits_unallocated_size_set -arena_mapbits_unzeroed_get -arena_maxrun -arena_maybe_purge -arena_metadata_allocated_add -arena_metadata_allocated_get -arena_metadata_allocated_sub -arena_migrate -arena_miscelm_get -arena_miscelm_to_pageind -arena_miscelm_to_rpages -arena_nbound -arena_new -arena_node_alloc -arena_node_dalloc -arena_palloc -arena_postfork_child -arena_postfork_parent -arena_prefork -arena_prof_accum -arena_prof_accum_impl -arena_prof_accum_locked -arena_prof_promoted -arena_prof_tctx_get -arena_prof_tctx_reset -arena_prof_tctx_set -arena_ptr_small_binind_get -arena_purge_all -arena_quarantine_junk_small -arena_ralloc -arena_ralloc_junk_large -arena_ralloc_no_move -arena_rd_to_miscelm -arena_redzone_corruption -arena_run_regind -arena_run_to_miscelm -arena_salloc -arenas_cache_bypass_cleanup -arenas_cache_cleanup -arena_sdalloc -arena_stats_merge -arena_tcache_fill_small -atomic_add_p -atomic_add_u -atomic_add_uint32 -atomic_add_uint64 -atomic_add_z -atomic_cas_p -atomic_cas_u -atomic_cas_uint32 -atomic_cas_uint64 -atomic_cas_z -atomic_sub_p -atomic_sub_u -atomic_sub_uint32 -atomic_sub_uint64 -atomic_sub_z -base_alloc -base_boot -base_postfork_child -base_postfork_parent -base_prefork -base_stats_get -bitmap_full -bitmap_get -bitmap_info_init -bitmap_info_ngroups -bitmap_init -bitmap_set -bitmap_sfu -bitmap_size -bitmap_unset -bootstrap_calloc -bootstrap_free -bootstrap_malloc -bt_init -buferror -chunk_alloc_base -chunk_alloc_cache -chunk_alloc_dss -chunk_alloc_mmap -chunk_alloc_wrapper -chunk_boot -chunk_dalloc_arena -chunk_dalloc_cache -chunk_dalloc_mmap -chunk_dalloc_wrapper -chunk_deregister -chunk_dss_boot -chunk_dss_postfork_child -chunk_dss_postfork_parent -chunk_dss_prec_get -chunk_dss_prec_set -chunk_dss_prefork -chunk_hooks_default -chunk_hooks_get -chunk_hooks_set -chunk_in_dss -chunk_lookup -chunk_npages -chunk_postfork_child -chunk_postfork_parent -chunk_prefork -chunk_purge_arena -chunk_purge_wrapper -chunk_register -chunksize -chunksize_mask -chunks_rtree -ckh_count -ckh_delete -ckh_insert -ckh_iter -ckh_new -ckh_pointer_hash -ckh_pointer_keycomp -ckh_remove -ckh_search -ckh_string_hash -ckh_string_keycomp -ctl_boot -ctl_bymib -ctl_byname -ctl_nametomib -ctl_postfork_child -ctl_postfork_parent -ctl_prefork -dss_prec_names -extent_node_achunk_get -extent_node_achunk_set -extent_node_addr_get -extent_node_addr_set -extent_node_arena_get -extent_node_arena_set -extent_node_dirty_insert -extent_node_dirty_linkage_init -extent_node_dirty_remove -extent_node_init -extent_node_prof_tctx_get -extent_node_prof_tctx_set -extent_node_size_get -extent_node_size_set -extent_node_zeroed_get -extent_node_zeroed_set -extent_tree_ad_empty -extent_tree_ad_first -extent_tree_ad_insert -extent_tree_ad_iter -extent_tree_ad_iter_recurse -extent_tree_ad_iter_start -extent_tree_ad_last -extent_tree_ad_new -extent_tree_ad_next -extent_tree_ad_nsearch -extent_tree_ad_prev -extent_tree_ad_psearch -extent_tree_ad_remove -extent_tree_ad_reverse_iter -extent_tree_ad_reverse_iter_recurse -extent_tree_ad_reverse_iter_start -extent_tree_ad_search -extent_tree_szad_empty -extent_tree_szad_first -extent_tree_szad_insert -extent_tree_szad_iter -extent_tree_szad_iter_recurse -extent_tree_szad_iter_start -extent_tree_szad_last -extent_tree_szad_new -extent_tree_szad_next -extent_tree_szad_nsearch -extent_tree_szad_prev -extent_tree_szad_psearch -extent_tree_szad_remove -extent_tree_szad_reverse_iter -extent_tree_szad_reverse_iter_recurse -extent_tree_szad_reverse_iter_start -extent_tree_szad_search -get_errno -hash -hash_fmix_32 -hash_fmix_64 -hash_get_block_32 -hash_get_block_64 -hash_rotl_32 -hash_rotl_64 -hash_x64_128 -hash_x86_128 -hash_x86_32 -huge_aalloc -huge_dalloc -huge_dalloc_junk -huge_malloc -huge_palloc -huge_prof_tctx_get -huge_prof_tctx_reset -huge_prof_tctx_set -huge_ralloc -huge_ralloc_no_move -huge_salloc -iaalloc -iallocztm -icalloc -icalloct -idalloc -idalloct -idalloctm -imalloc -imalloct -index2size -index2size_compute -index2size_lookup -index2size_tab -in_valgrind -ipalloc -ipalloct -ipallocztm -iqalloc -iralloc -iralloct -iralloct_realign -isalloc -isdalloct -isqalloc -isthreaded -ivsalloc -ixalloc -jemalloc_postfork_child -jemalloc_postfork_parent -jemalloc_prefork -large_maxclass -lg_floor -malloc_cprintf -malloc_mutex_init -malloc_mutex_lock -malloc_mutex_postfork_child -malloc_mutex_postfork_parent -malloc_mutex_prefork -malloc_mutex_unlock -malloc_printf -malloc_snprintf -malloc_strtoumax -malloc_tsd_boot0 -malloc_tsd_boot1 -malloc_tsd_cleanup_register -malloc_tsd_dalloc -malloc_tsd_malloc -malloc_tsd_no_cleanup -malloc_vcprintf -malloc_vsnprintf -malloc_write -map_bias -map_misc_offset -mb_write -mutex_boot -narenas_cache_cleanup -narenas_total_get -ncpus -nhbins -opt_abort -opt_dss -opt_junk -opt_junk_alloc -opt_junk_free -opt_lg_chunk -opt_lg_dirty_mult -opt_lg_prof_interval -opt_lg_prof_sample -opt_lg_tcache_max -opt_narenas -opt_prof -opt_prof_accum -opt_prof_active -opt_prof_final -opt_prof_gdump -opt_prof_leak -opt_prof_prefix -opt_prof_thread_active_init -opt_quarantine -opt_redzone -opt_stats_print -opt_tcache -opt_utrace -opt_xmalloc -opt_zero -p2rz -pages_commit -pages_decommit -pages_map -pages_purge -pages_trim -pages_unmap -pow2_ceil -prof_active_get -prof_active_get_unlocked -prof_active_set -prof_alloc_prep -prof_alloc_rollback -prof_backtrace -prof_boot0 -prof_boot1 -prof_boot2 -prof_dump_header -prof_dump_open -prof_free -prof_free_sampled_object -prof_gdump -prof_gdump_get -prof_gdump_get_unlocked -prof_gdump_set -prof_gdump_val -prof_idump -prof_interval -prof_lookup -prof_malloc -prof_malloc_sample_object -prof_mdump -prof_postfork_child -prof_postfork_parent -prof_prefork -prof_realloc -prof_reset -prof_sample_accum_update -prof_sample_threshold_update -prof_tctx_get -prof_tctx_reset -prof_tctx_set -prof_tdata_cleanup -prof_tdata_get -prof_tdata_init -prof_tdata_reinit -prof_thread_active_get -prof_thread_active_init_get -prof_thread_active_init_set -prof_thread_active_set -prof_thread_name_get -prof_thread_name_set -quarantine -quarantine_alloc_hook -quarantine_alloc_hook_work -quarantine_cleanup -register_zone -rtree_child_read -rtree_child_read_hard -rtree_child_tryread -rtree_delete -rtree_get -rtree_new -rtree_node_valid -rtree_set -rtree_start_level -rtree_subkey -rtree_subtree_read -rtree_subtree_read_hard -rtree_subtree_tryread -rtree_val_read -rtree_val_write -s2u -s2u_compute -s2u_lookup -sa2u -set_errno -size2index -size2index_compute -size2index_lookup -size2index_tab -stats_cactive -stats_cactive_add -stats_cactive_get -stats_cactive_sub -stats_print -tcache_alloc_easy -tcache_alloc_large -tcache_alloc_small -tcache_alloc_small_hard -tcache_arena_associate -tcache_arena_dissociate -tcache_arena_reassociate -tcache_bin_flush_large -tcache_bin_flush_small -tcache_bin_info -tcache_boot -tcache_cleanup -tcache_create -tcache_dalloc_large -tcache_dalloc_small -tcache_enabled_cleanup -tcache_enabled_get -tcache_enabled_set -tcache_event -tcache_event_hard -tcache_flush -tcache_get -tcache_get_hard -tcache_maxclass -tcaches -tcache_salloc -tcaches_create -tcaches_destroy -tcaches_flush -tcaches_get -tcache_stats_merge -thread_allocated_cleanup -thread_deallocated_cleanup -tsd_arena_get -tsd_arena_set -tsd_boot -tsd_boot0 -tsd_boot1 -tsd_booted -tsd_cleanup -tsd_cleanup_wrapper -tsd_fetch -tsd_get -tsd_wrapper_get -tsd_wrapper_set -tsd_initialized -tsd_init_check_recursion -tsd_init_finish -tsd_init_head -tsd_nominal -tsd_quarantine_get -tsd_quarantine_set -tsd_set -tsd_tcache_enabled_get -tsd_tcache_enabled_set -tsd_tcache_get -tsd_tcache_set -tsd_tls -tsd_tsd -tsd_prof_tdata_get -tsd_prof_tdata_set -tsd_thread_allocated_get -tsd_thread_allocated_set -tsd_thread_deallocated_get -tsd_thread_deallocated_set -u2rz -valgrind_freelike_block -valgrind_make_mem_defined -valgrind_make_mem_noaccess -valgrind_make_mem_undefined diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/private_unnamespace.sh b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/private_unnamespace.sh deleted file mode 100755 index 23fed8e..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/private_unnamespace.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -for symbol in `cat $1` ; do - echo "#undef ${symbol}" -done diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/prof.h b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/prof.h deleted file mode 100644 index e5198c3..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/prof.h +++ /dev/null @@ -1,545 +0,0 @@ -/******************************************************************************/ -#ifdef JEMALLOC_H_TYPES - -typedef struct prof_bt_s prof_bt_t; -typedef struct prof_cnt_s prof_cnt_t; -typedef struct prof_tctx_s prof_tctx_t; -typedef struct prof_gctx_s prof_gctx_t; -typedef struct prof_tdata_s prof_tdata_t; - -/* Option defaults. */ -#ifdef JEMALLOC_PROF -# define PROF_PREFIX_DEFAULT "jeprof" -#else -# define PROF_PREFIX_DEFAULT "" -#endif -#define LG_PROF_SAMPLE_DEFAULT 19 -#define LG_PROF_INTERVAL_DEFAULT -1 - -/* - * Hard limit on stack backtrace depth. The version of prof_backtrace() that - * is based on __builtin_return_address() necessarily has a hard-coded number - * of backtrace frame handlers, and should be kept in sync with this setting. - */ -#define PROF_BT_MAX 128 - -/* Initial hash table size. */ -#define PROF_CKH_MINITEMS 64 - -/* Size of memory buffer to use when writing dump files. */ -#define PROF_DUMP_BUFSIZE 65536 - -/* Size of stack-allocated buffer used by prof_printf(). */ -#define PROF_PRINTF_BUFSIZE 128 - -/* - * Number of mutexes shared among all gctx's. No space is allocated for these - * unless profiling is enabled, so it's okay to over-provision. - */ -#define PROF_NCTX_LOCKS 1024 - -/* - * Number of mutexes shared among all tdata's. No space is allocated for these - * unless profiling is enabled, so it's okay to over-provision. - */ -#define PROF_NTDATA_LOCKS 256 - -/* - * prof_tdata pointers close to NULL are used to encode state information that - * is used for cleaning up during thread shutdown. - */ -#define PROF_TDATA_STATE_REINCARNATED ((prof_tdata_t *)(uintptr_t)1) -#define PROF_TDATA_STATE_PURGATORY ((prof_tdata_t *)(uintptr_t)2) -#define PROF_TDATA_STATE_MAX PROF_TDATA_STATE_PURGATORY - -#endif /* JEMALLOC_H_TYPES */ -/******************************************************************************/ -#ifdef JEMALLOC_H_STRUCTS - -struct prof_bt_s { - /* Backtrace, stored as len program counters. */ - void **vec; - unsigned len; -}; - -#ifdef JEMALLOC_PROF_LIBGCC -/* Data structure passed to libgcc _Unwind_Backtrace() callback functions. */ -typedef struct { - prof_bt_t *bt; - unsigned max; -} prof_unwind_data_t; -#endif - -struct prof_cnt_s { - /* Profiling counters. */ - uint64_t curobjs; - uint64_t curbytes; - uint64_t accumobjs; - uint64_t accumbytes; -}; - -typedef enum { - prof_tctx_state_initializing, - prof_tctx_state_nominal, - prof_tctx_state_dumping, - prof_tctx_state_purgatory /* Dumper must finish destroying. */ -} prof_tctx_state_t; - -struct prof_tctx_s { - /* Thread data for thread that performed the allocation. */ - prof_tdata_t *tdata; - - /* - * Copy of tdata->thr_{uid,discrim}, necessary because tdata may be - * defunct during teardown. - */ - uint64_t thr_uid; - uint64_t thr_discrim; - - /* Profiling counters, protected by tdata->lock. */ - prof_cnt_t cnts; - - /* Associated global context. */ - prof_gctx_t *gctx; - - /* - * UID that distinguishes multiple tctx's created by the same thread, - * but coexisting in gctx->tctxs. There are two ways that such - * coexistence can occur: - * - A dumper thread can cause a tctx to be retained in the purgatory - * state. - * - Although a single "producer" thread must create all tctx's which - * share the same thr_uid, multiple "consumers" can each concurrently - * execute portions of prof_tctx_destroy(). prof_tctx_destroy() only - * gets called once each time cnts.cur{objs,bytes} drop to 0, but this - * threshold can be hit again before the first consumer finishes - * executing prof_tctx_destroy(). - */ - uint64_t tctx_uid; - - /* Linkage into gctx's tctxs. */ - rb_node(prof_tctx_t) tctx_link; - - /* - * True during prof_alloc_prep()..prof_malloc_sample_object(), prevents - * sample vs destroy race. - */ - bool prepared; - - /* Current dump-related state, protected by gctx->lock. */ - prof_tctx_state_t state; - - /* - * Copy of cnts snapshotted during early dump phase, protected by - * dump_mtx. - */ - prof_cnt_t dump_cnts; -}; -typedef rb_tree(prof_tctx_t) prof_tctx_tree_t; - -struct prof_gctx_s { - /* Protects nlimbo, cnt_summed, and tctxs. */ - malloc_mutex_t *lock; - - /* - * Number of threads that currently cause this gctx to be in a state of - * limbo due to one of: - * - Initializing this gctx. - * - Initializing per thread counters associated with this gctx. - * - Preparing to destroy this gctx. - * - Dumping a heap profile that includes this gctx. - * nlimbo must be 1 (single destroyer) in order to safely destroy the - * gctx. - */ - unsigned nlimbo; - - /* - * Tree of profile counters, one for each thread that has allocated in - * this context. - */ - prof_tctx_tree_t tctxs; - - /* Linkage for tree of contexts to be dumped. */ - rb_node(prof_gctx_t) dump_link; - - /* Temporary storage for summation during dump. */ - prof_cnt_t cnt_summed; - - /* Associated backtrace. */ - prof_bt_t bt; - - /* Backtrace vector, variable size, referred to by bt. */ - void *vec[1]; -}; -typedef rb_tree(prof_gctx_t) prof_gctx_tree_t; - -struct prof_tdata_s { - malloc_mutex_t *lock; - - /* Monotonically increasing unique thread identifier. */ - uint64_t thr_uid; - - /* - * Monotonically increasing discriminator among tdata structures - * associated with the same thr_uid. - */ - uint64_t thr_discrim; - - /* Included in heap profile dumps if non-NULL. */ - char *thread_name; - - bool attached; - bool expired; - - rb_node(prof_tdata_t) tdata_link; - - /* - * Counter used to initialize prof_tctx_t's tctx_uid. No locking is - * necessary when incrementing this field, because only one thread ever - * does so. - */ - uint64_t tctx_uid_next; - - /* - * Hash of (prof_bt_t *)-->(prof_tctx_t *). Each thread tracks - * backtraces for which it has non-zero allocation/deallocation counters - * associated with thread-specific prof_tctx_t objects. Other threads - * may write to prof_tctx_t contents when freeing associated objects. - */ - ckh_t bt2tctx; - - /* Sampling state. */ - uint64_t prng_state; - uint64_t bytes_until_sample; - - /* State used to avoid dumping while operating on prof internals. */ - bool enq; - bool enq_idump; - bool enq_gdump; - - /* - * Set to true during an early dump phase for tdata's which are - * currently being dumped. New threads' tdata's have this initialized - * to false so that they aren't accidentally included in later dump - * phases. - */ - bool dumping; - - /* - * True if profiling is active for this tdata's thread - * (thread.prof.active mallctl). - */ - bool active; - - /* Temporary storage for summation during dump. */ - prof_cnt_t cnt_summed; - - /* Backtrace vector, used for calls to prof_backtrace(). */ - void *vec[PROF_BT_MAX]; -}; -typedef rb_tree(prof_tdata_t) prof_tdata_tree_t; - -#endif /* JEMALLOC_H_STRUCTS */ -/******************************************************************************/ -#ifdef JEMALLOC_H_EXTERNS - -extern bool opt_prof; -extern bool opt_prof_active; -extern bool opt_prof_thread_active_init; -extern size_t opt_lg_prof_sample; /* Mean bytes between samples. */ -extern ssize_t opt_lg_prof_interval; /* lg(prof_interval). */ -extern bool opt_prof_gdump; /* High-water memory dumping. */ -extern bool opt_prof_final; /* Final profile dumping. */ -extern bool opt_prof_leak; /* Dump leak summary at exit. */ -extern bool opt_prof_accum; /* Report cumulative bytes. */ -extern char opt_prof_prefix[ - /* Minimize memory bloat for non-prof builds. */ -#ifdef JEMALLOC_PROF - PATH_MAX + -#endif - 1]; - -/* Accessed via prof_active_[gs]et{_unlocked,}(). */ -extern bool prof_active; - -/* Accessed via prof_gdump_[gs]et{_unlocked,}(). */ -extern bool prof_gdump_val; - -/* - * Profile dump interval, measured in bytes allocated. Each arena triggers a - * profile dump when it reaches this threshold. The effect is that the - * interval between profile dumps averages prof_interval, though the actual - * interval between dumps will tend to be sporadic, and the interval will be a - * maximum of approximately (prof_interval * narenas). - */ -extern uint64_t prof_interval; - -/* - * Initialized as opt_lg_prof_sample, and potentially modified during profiling - * resets. - */ -extern size_t lg_prof_sample; - -void prof_alloc_rollback(tsd_t *tsd, prof_tctx_t *tctx, bool updated); -void prof_malloc_sample_object(const void *ptr, size_t usize, - prof_tctx_t *tctx); -void prof_free_sampled_object(tsd_t *tsd, size_t usize, prof_tctx_t *tctx); -void bt_init(prof_bt_t *bt, void **vec); -void prof_backtrace(prof_bt_t *bt); -prof_tctx_t *prof_lookup(tsd_t *tsd, prof_bt_t *bt); -#ifdef JEMALLOC_JET -size_t prof_tdata_count(void); -size_t prof_bt_count(void); -const prof_cnt_t *prof_cnt_all(void); -typedef int (prof_dump_open_t)(bool, const char *); -extern prof_dump_open_t *prof_dump_open; -typedef bool (prof_dump_header_t)(bool, const prof_cnt_t *); -extern prof_dump_header_t *prof_dump_header; -#endif -void prof_idump(void); -bool prof_mdump(const char *filename); -void prof_gdump(void); -prof_tdata_t *prof_tdata_init(tsd_t *tsd); -prof_tdata_t *prof_tdata_reinit(tsd_t *tsd, prof_tdata_t *tdata); -void prof_reset(tsd_t *tsd, size_t lg_sample); -void prof_tdata_cleanup(tsd_t *tsd); -const char *prof_thread_name_get(void); -bool prof_active_get(void); -bool prof_active_set(bool active); -int prof_thread_name_set(tsd_t *tsd, const char *thread_name); -bool prof_thread_active_get(void); -bool prof_thread_active_set(bool active); -bool prof_thread_active_init_get(void); -bool prof_thread_active_init_set(bool active_init); -bool prof_gdump_get(void); -bool prof_gdump_set(bool active); -void prof_boot0(void); -void prof_boot1(void); -bool prof_boot2(void); -void prof_prefork(void); -void prof_postfork_parent(void); -void prof_postfork_child(void); -void prof_sample_threshold_update(prof_tdata_t *tdata); - -#endif /* JEMALLOC_H_EXTERNS */ -/******************************************************************************/ -#ifdef JEMALLOC_H_INLINES - -#ifndef JEMALLOC_ENABLE_INLINE -bool prof_active_get_unlocked(void); -bool prof_gdump_get_unlocked(void); -prof_tdata_t *prof_tdata_get(tsd_t *tsd, bool create); -bool prof_sample_accum_update(tsd_t *tsd, size_t usize, bool commit, - prof_tdata_t **tdata_out); -prof_tctx_t *prof_alloc_prep(tsd_t *tsd, size_t usize, bool prof_active, - bool update); -prof_tctx_t *prof_tctx_get(const void *ptr); -void prof_tctx_set(const void *ptr, size_t usize, prof_tctx_t *tctx); -void prof_tctx_reset(const void *ptr, size_t usize, const void *old_ptr, - prof_tctx_t *tctx); -void prof_malloc_sample_object(const void *ptr, size_t usize, - prof_tctx_t *tctx); -void prof_malloc(const void *ptr, size_t usize, prof_tctx_t *tctx); -void prof_realloc(tsd_t *tsd, const void *ptr, size_t usize, - prof_tctx_t *tctx, bool prof_active, bool updated, const void *old_ptr, - size_t old_usize, prof_tctx_t *old_tctx); -void prof_free(tsd_t *tsd, const void *ptr, size_t usize); -#endif - -#if (defined(JEMALLOC_ENABLE_INLINE) || defined(JEMALLOC_PROF_C_)) -JEMALLOC_ALWAYS_INLINE bool -prof_active_get_unlocked(void) -{ - - /* - * Even if opt_prof is true, sampling can be temporarily disabled by - * setting prof_active to false. No locking is used when reading - * prof_active in the fast path, so there are no guarantees regarding - * how long it will take for all threads to notice state changes. - */ - return (prof_active); -} - -JEMALLOC_ALWAYS_INLINE bool -prof_gdump_get_unlocked(void) -{ - - /* - * No locking is used when reading prof_gdump_val in the fast path, so - * there are no guarantees regarding how long it will take for all - * threads to notice state changes. - */ - return (prof_gdump_val); -} - -JEMALLOC_ALWAYS_INLINE prof_tdata_t * -prof_tdata_get(tsd_t *tsd, bool create) -{ - prof_tdata_t *tdata; - - cassert(config_prof); - - tdata = tsd_prof_tdata_get(tsd); - if (create) { - if (unlikely(tdata == NULL)) { - if (tsd_nominal(tsd)) { - tdata = prof_tdata_init(tsd); - tsd_prof_tdata_set(tsd, tdata); - } - } else if (unlikely(tdata->expired)) { - tdata = prof_tdata_reinit(tsd, tdata); - tsd_prof_tdata_set(tsd, tdata); - } - assert(tdata == NULL || tdata->attached); - } - - return (tdata); -} - -JEMALLOC_ALWAYS_INLINE prof_tctx_t * -prof_tctx_get(const void *ptr) -{ - - cassert(config_prof); - assert(ptr != NULL); - - return (arena_prof_tctx_get(ptr)); -} - -JEMALLOC_ALWAYS_INLINE void -prof_tctx_set(const void *ptr, size_t usize, prof_tctx_t *tctx) -{ - - cassert(config_prof); - assert(ptr != NULL); - - arena_prof_tctx_set(ptr, usize, tctx); -} - -JEMALLOC_ALWAYS_INLINE void -prof_tctx_reset(const void *ptr, size_t usize, const void *old_ptr, - prof_tctx_t *old_tctx) -{ - - cassert(config_prof); - assert(ptr != NULL); - - arena_prof_tctx_reset(ptr, usize, old_ptr, old_tctx); -} - -JEMALLOC_ALWAYS_INLINE bool -prof_sample_accum_update(tsd_t *tsd, size_t usize, bool update, - prof_tdata_t **tdata_out) -{ - prof_tdata_t *tdata; - - cassert(config_prof); - - tdata = prof_tdata_get(tsd, true); - if ((uintptr_t)tdata <= (uintptr_t)PROF_TDATA_STATE_MAX) - tdata = NULL; - - if (tdata_out != NULL) - *tdata_out = tdata; - - if (tdata == NULL) - return (true); - - if (tdata->bytes_until_sample >= usize) { - if (update) - tdata->bytes_until_sample -= usize; - return (true); - } else { - /* Compute new sample threshold. */ - if (update) - prof_sample_threshold_update(tdata); - return (!tdata->active); - } -} - -JEMALLOC_ALWAYS_INLINE prof_tctx_t * -prof_alloc_prep(tsd_t *tsd, size_t usize, bool prof_active, bool update) -{ - prof_tctx_t *ret; - prof_tdata_t *tdata; - prof_bt_t bt; - - assert(usize == s2u(usize)); - - if (!prof_active || likely(prof_sample_accum_update(tsd, usize, update, - &tdata))) - ret = (prof_tctx_t *)(uintptr_t)1U; - else { - bt_init(&bt, tdata->vec); - prof_backtrace(&bt); - ret = prof_lookup(tsd, &bt); - } - - return (ret); -} - -JEMALLOC_ALWAYS_INLINE void -prof_malloc(const void *ptr, size_t usize, prof_tctx_t *tctx) -{ - - cassert(config_prof); - assert(ptr != NULL); - assert(usize == isalloc(ptr, true)); - - if (unlikely((uintptr_t)tctx > (uintptr_t)1U)) - prof_malloc_sample_object(ptr, usize, tctx); - else - prof_tctx_set(ptr, usize, (prof_tctx_t *)(uintptr_t)1U); -} - -JEMALLOC_ALWAYS_INLINE void -prof_realloc(tsd_t *tsd, const void *ptr, size_t usize, prof_tctx_t *tctx, - bool prof_active, bool updated, const void *old_ptr, size_t old_usize, - prof_tctx_t *old_tctx) -{ - bool sampled, old_sampled; - - cassert(config_prof); - assert(ptr != NULL || (uintptr_t)tctx <= (uintptr_t)1U); - - if (prof_active && !updated && ptr != NULL) { - assert(usize == isalloc(ptr, true)); - if (prof_sample_accum_update(tsd, usize, true, NULL)) { - /* - * Don't sample. The usize passed to prof_alloc_prep() - * was larger than what actually got allocated, so a - * backtrace was captured for this allocation, even - * though its actual usize was insufficient to cross the - * sample threshold. - */ - tctx = (prof_tctx_t *)(uintptr_t)1U; - } - } - - sampled = ((uintptr_t)tctx > (uintptr_t)1U); - old_sampled = ((uintptr_t)old_tctx > (uintptr_t)1U); - - if (unlikely(sampled)) - prof_malloc_sample_object(ptr, usize, tctx); - else - prof_tctx_reset(ptr, usize, old_ptr, old_tctx); - - if (unlikely(old_sampled)) - prof_free_sampled_object(tsd, old_usize, old_tctx); -} - -JEMALLOC_ALWAYS_INLINE void -prof_free(tsd_t *tsd, const void *ptr, size_t usize) -{ - prof_tctx_t *tctx = prof_tctx_get(ptr); - - cassert(config_prof); - assert(usize == isalloc(ptr, true)); - - if (unlikely((uintptr_t)tctx > (uintptr_t)1U)) - prof_free_sampled_object(tsd, usize, tctx); -} -#endif - -#endif /* JEMALLOC_H_INLINES */ -/******************************************************************************/ diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/quarantine.h b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/quarantine.h deleted file mode 100644 index ae60739..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/quarantine.h +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************/ -#ifdef JEMALLOC_H_TYPES - -typedef struct quarantine_obj_s quarantine_obj_t; -typedef struct quarantine_s quarantine_t; - -/* Default per thread quarantine size if valgrind is enabled. */ -#define JEMALLOC_VALGRIND_QUARANTINE_DEFAULT (ZU(1) << 24) - -#endif /* JEMALLOC_H_TYPES */ -/******************************************************************************/ -#ifdef JEMALLOC_H_STRUCTS - -struct quarantine_obj_s { - void *ptr; - size_t usize; -}; - -struct quarantine_s { - size_t curbytes; - size_t curobjs; - size_t first; -#define LG_MAXOBJS_INIT 10 - size_t lg_maxobjs; - quarantine_obj_t objs[1]; /* Dynamically sized ring buffer. */ -}; - -#endif /* JEMALLOC_H_STRUCTS */ -/******************************************************************************/ -#ifdef JEMALLOC_H_EXTERNS - -void quarantine_alloc_hook_work(tsd_t *tsd); -void quarantine(tsd_t *tsd, void *ptr); -void quarantine_cleanup(tsd_t *tsd); - -#endif /* JEMALLOC_H_EXTERNS */ -/******************************************************************************/ -#ifdef JEMALLOC_H_INLINES - -#ifndef JEMALLOC_ENABLE_INLINE -void quarantine_alloc_hook(void); -#endif - -#if (defined(JEMALLOC_ENABLE_INLINE) || defined(JEMALLOC_QUARANTINE_C_)) -JEMALLOC_ALWAYS_INLINE void -quarantine_alloc_hook(void) -{ - tsd_t *tsd; - - assert(config_fill && opt_quarantine); - - tsd = tsd_fetch(); - if (tsd_quarantine_get(tsd) == NULL) - quarantine_alloc_hook_work(tsd); -} -#endif - -#endif /* JEMALLOC_H_INLINES */ -/******************************************************************************/ - diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/tcache.h b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/tcache.h deleted file mode 100644 index 5079cd2..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/tcache.h +++ /dev/null @@ -1,426 +0,0 @@ -/******************************************************************************/ -#ifdef JEMALLOC_H_TYPES - -typedef struct tcache_bin_info_s tcache_bin_info_t; -typedef struct tcache_bin_s tcache_bin_t; -typedef struct tcache_s tcache_t; -typedef struct tcaches_s tcaches_t; - -/* - * tcache pointers close to NULL are used to encode state information that is - * used for two purposes: preventing thread caching on a per thread basis and - * cleaning up during thread shutdown. - */ -#define TCACHE_STATE_DISABLED ((tcache_t *)(uintptr_t)1) -#define TCACHE_STATE_REINCARNATED ((tcache_t *)(uintptr_t)2) -#define TCACHE_STATE_PURGATORY ((tcache_t *)(uintptr_t)3) -#define TCACHE_STATE_MAX TCACHE_STATE_PURGATORY - -/* - * Absolute minimum number of cache slots for each small bin. - */ -#define TCACHE_NSLOTS_SMALL_MIN 20 - -/* - * Absolute maximum number of cache slots for each small bin in the thread - * cache. This is an additional constraint beyond that imposed as: twice the - * number of regions per run for this size class. - * - * This constant must be an even number. - */ -#define TCACHE_NSLOTS_SMALL_MAX 200 - -/* Number of cache slots for large size classes. */ -#define TCACHE_NSLOTS_LARGE 20 - -/* (1U << opt_lg_tcache_max) is used to compute tcache_maxclass. */ -#define LG_TCACHE_MAXCLASS_DEFAULT 15 - -/* - * TCACHE_GC_SWEEP is the approximate number of allocation events between - * full GC sweeps. Integer rounding may cause the actual number to be - * slightly higher, since GC is performed incrementally. - */ -#define TCACHE_GC_SWEEP 8192 - -/* Number of tcache allocation/deallocation events between incremental GCs. */ -#define TCACHE_GC_INCR \ - ((TCACHE_GC_SWEEP / NBINS) + ((TCACHE_GC_SWEEP / NBINS == 0) ? 0 : 1)) - -#endif /* JEMALLOC_H_TYPES */ -/******************************************************************************/ -#ifdef JEMALLOC_H_STRUCTS - -typedef enum { - tcache_enabled_false = 0, /* Enable cast to/from bool. */ - tcache_enabled_true = 1, - tcache_enabled_default = 2 -} tcache_enabled_t; - -/* - * Read-only information associated with each element of tcache_t's tbins array - * is stored separately, mainly to reduce memory usage. - */ -struct tcache_bin_info_s { - unsigned ncached_max; /* Upper limit on ncached. */ -}; - -struct tcache_bin_s { - tcache_bin_stats_t tstats; - int low_water; /* Min # cached since last GC. */ - unsigned lg_fill_div; /* Fill (ncached_max >> lg_fill_div). */ - unsigned ncached; /* # of cached objects. */ - void **avail; /* Stack of available objects. */ -}; - -struct tcache_s { - ql_elm(tcache_t) link; /* Used for aggregating stats. */ - uint64_t prof_accumbytes;/* Cleared after arena_prof_accum(). */ - unsigned ev_cnt; /* Event count since incremental GC. */ - szind_t next_gc_bin; /* Next bin to GC. */ - tcache_bin_t tbins[1]; /* Dynamically sized. */ - /* - * The pointer stacks associated with tbins follow as a contiguous - * array. During tcache initialization, the avail pointer in each - * element of tbins is initialized to point to the proper offset within - * this array. - */ -}; - -/* Linkage for list of available (previously used) explicit tcache IDs. */ -struct tcaches_s { - union { - tcache_t *tcache; - tcaches_t *next; - }; -}; - -#endif /* JEMALLOC_H_STRUCTS */ -/******************************************************************************/ -#ifdef JEMALLOC_H_EXTERNS - -extern bool opt_tcache; -extern ssize_t opt_lg_tcache_max; - -extern tcache_bin_info_t *tcache_bin_info; - -/* - * Number of tcache bins. There are NBINS small-object bins, plus 0 or more - * large-object bins. - */ -extern size_t nhbins; - -/* Maximum cached size class. */ -extern size_t tcache_maxclass; - -/* - * Explicit tcaches, managed via the tcache.{create,flush,destroy} mallctls and - * usable via the MALLOCX_TCACHE() flag. The automatic per thread tcaches are - * completely disjoint from this data structure. tcaches starts off as a sparse - * array, so it has no physical memory footprint until individual pages are - * touched. This allows the entire array to be allocated the first time an - * explicit tcache is created without a disproportionate impact on memory usage. - */ -extern tcaches_t *tcaches; - -size_t tcache_salloc(const void *ptr); -void tcache_event_hard(tsd_t *tsd, tcache_t *tcache); -void *tcache_alloc_small_hard(tsd_t *tsd, arena_t *arena, tcache_t *tcache, - tcache_bin_t *tbin, szind_t binind); -void tcache_bin_flush_small(tsd_t *tsd, tcache_t *tcache, tcache_bin_t *tbin, - szind_t binind, unsigned rem); -void tcache_bin_flush_large(tsd_t *tsd, tcache_bin_t *tbin, szind_t binind, - unsigned rem, tcache_t *tcache); -void tcache_arena_associate(tcache_t *tcache, arena_t *arena); -void tcache_arena_reassociate(tcache_t *tcache, arena_t *oldarena, - arena_t *newarena); -void tcache_arena_dissociate(tcache_t *tcache, arena_t *arena); -tcache_t *tcache_get_hard(tsd_t *tsd); -tcache_t *tcache_create(tsd_t *tsd, arena_t *arena); -void tcache_cleanup(tsd_t *tsd); -void tcache_enabled_cleanup(tsd_t *tsd); -void tcache_stats_merge(tcache_t *tcache, arena_t *arena); -bool tcaches_create(tsd_t *tsd, unsigned *r_ind); -void tcaches_flush(tsd_t *tsd, unsigned ind); -void tcaches_destroy(tsd_t *tsd, unsigned ind); -bool tcache_boot(void); - -#endif /* JEMALLOC_H_EXTERNS */ -/******************************************************************************/ -#ifdef JEMALLOC_H_INLINES - -#ifndef JEMALLOC_ENABLE_INLINE -void tcache_event(tsd_t *tsd, tcache_t *tcache); -void tcache_flush(void); -bool tcache_enabled_get(void); -tcache_t *tcache_get(tsd_t *tsd, bool create); -void tcache_enabled_set(bool enabled); -void *tcache_alloc_easy(tcache_bin_t *tbin); -void *tcache_alloc_small(tsd_t *tsd, arena_t *arena, tcache_t *tcache, - size_t size, bool zero); -void *tcache_alloc_large(tsd_t *tsd, arena_t *arena, tcache_t *tcache, - size_t size, bool zero); -void tcache_dalloc_small(tsd_t *tsd, tcache_t *tcache, void *ptr, - szind_t binind); -void tcache_dalloc_large(tsd_t *tsd, tcache_t *tcache, void *ptr, - size_t size); -tcache_t *tcaches_get(tsd_t *tsd, unsigned ind); -#endif - -#if (defined(JEMALLOC_ENABLE_INLINE) || defined(JEMALLOC_TCACHE_C_)) -JEMALLOC_INLINE void -tcache_flush(void) -{ - tsd_t *tsd; - - cassert(config_tcache); - - tsd = tsd_fetch(); - tcache_cleanup(tsd); -} - -JEMALLOC_INLINE bool -tcache_enabled_get(void) -{ - tsd_t *tsd; - tcache_enabled_t tcache_enabled; - - cassert(config_tcache); - - tsd = tsd_fetch(); - tcache_enabled = tsd_tcache_enabled_get(tsd); - if (tcache_enabled == tcache_enabled_default) { - tcache_enabled = (tcache_enabled_t)opt_tcache; - tsd_tcache_enabled_set(tsd, tcache_enabled); - } - - return ((bool)tcache_enabled); -} - -JEMALLOC_INLINE void -tcache_enabled_set(bool enabled) -{ - tsd_t *tsd; - tcache_enabled_t tcache_enabled; - - cassert(config_tcache); - - tsd = tsd_fetch(); - - tcache_enabled = (tcache_enabled_t)enabled; - tsd_tcache_enabled_set(tsd, tcache_enabled); - - if (!enabled) - tcache_cleanup(tsd); -} - -JEMALLOC_ALWAYS_INLINE tcache_t * -tcache_get(tsd_t *tsd, bool create) -{ - tcache_t *tcache; - - if (!config_tcache) - return (NULL); - - tcache = tsd_tcache_get(tsd); - if (!create) - return (tcache); - if (unlikely(tcache == NULL) && tsd_nominal(tsd)) { - tcache = tcache_get_hard(tsd); - tsd_tcache_set(tsd, tcache); - } - - return (tcache); -} - -JEMALLOC_ALWAYS_INLINE void -tcache_event(tsd_t *tsd, tcache_t *tcache) -{ - - if (TCACHE_GC_INCR == 0) - return; - - tcache->ev_cnt++; - assert(tcache->ev_cnt <= TCACHE_GC_INCR); - if (unlikely(tcache->ev_cnt == TCACHE_GC_INCR)) - tcache_event_hard(tsd, tcache); -} - -JEMALLOC_ALWAYS_INLINE void * -tcache_alloc_easy(tcache_bin_t *tbin) -{ - void *ret; - - if (unlikely(tbin->ncached == 0)) { - tbin->low_water = -1; - return (NULL); - } - tbin->ncached--; - if (unlikely((int)tbin->ncached < tbin->low_water)) - tbin->low_water = tbin->ncached; - ret = tbin->avail[tbin->ncached]; - return (ret); -} - -JEMALLOC_ALWAYS_INLINE void * -tcache_alloc_small(tsd_t *tsd, arena_t *arena, tcache_t *tcache, size_t size, - bool zero) -{ - void *ret; - szind_t binind; - size_t usize; - tcache_bin_t *tbin; - - binind = size2index(size); - assert(binind < NBINS); - tbin = &tcache->tbins[binind]; - usize = index2size(binind); - ret = tcache_alloc_easy(tbin); - if (unlikely(ret == NULL)) { - ret = tcache_alloc_small_hard(tsd, arena, tcache, tbin, binind); - if (ret == NULL) - return (NULL); - } - assert(tcache_salloc(ret) == usize); - - if (likely(!zero)) { - if (config_fill) { - if (unlikely(opt_junk_alloc)) { - arena_alloc_junk_small(ret, - &arena_bin_info[binind], false); - } else if (unlikely(opt_zero)) - memset(ret, 0, usize); - } - } else { - if (config_fill && unlikely(opt_junk_alloc)) { - arena_alloc_junk_small(ret, &arena_bin_info[binind], - true); - } - memset(ret, 0, usize); - } - - if (config_stats) - tbin->tstats.nrequests++; - if (config_prof) - tcache->prof_accumbytes += usize; - tcache_event(tsd, tcache); - return (ret); -} - -JEMALLOC_ALWAYS_INLINE void * -tcache_alloc_large(tsd_t *tsd, arena_t *arena, tcache_t *tcache, size_t size, - bool zero) -{ - void *ret; - szind_t binind; - size_t usize; - tcache_bin_t *tbin; - - binind = size2index(size); - usize = index2size(binind); - assert(usize <= tcache_maxclass); - assert(binind < nhbins); - tbin = &tcache->tbins[binind]; - ret = tcache_alloc_easy(tbin); - if (unlikely(ret == NULL)) { - /* - * Only allocate one large object at a time, because it's quite - * expensive to create one and not use it. - */ - ret = arena_malloc_large(arena, usize, zero); - if (ret == NULL) - return (NULL); - } else { - if (config_prof && usize == LARGE_MINCLASS) { - arena_chunk_t *chunk = - (arena_chunk_t *)CHUNK_ADDR2BASE(ret); - size_t pageind = (((uintptr_t)ret - (uintptr_t)chunk) >> - LG_PAGE); - arena_mapbits_large_binind_set(chunk, pageind, - BININD_INVALID); - } - if (likely(!zero)) { - if (config_fill) { - if (unlikely(opt_junk_alloc)) - memset(ret, 0xa5, usize); - else if (unlikely(opt_zero)) - memset(ret, 0, usize); - } - } else - memset(ret, 0, usize); - - if (config_stats) - tbin->tstats.nrequests++; - if (config_prof) - tcache->prof_accumbytes += usize; - } - - tcache_event(tsd, tcache); - return (ret); -} - -JEMALLOC_ALWAYS_INLINE void -tcache_dalloc_small(tsd_t *tsd, tcache_t *tcache, void *ptr, szind_t binind) -{ - tcache_bin_t *tbin; - tcache_bin_info_t *tbin_info; - - assert(tcache_salloc(ptr) <= SMALL_MAXCLASS); - - if (config_fill && unlikely(opt_junk_free)) - arena_dalloc_junk_small(ptr, &arena_bin_info[binind]); - - tbin = &tcache->tbins[binind]; - tbin_info = &tcache_bin_info[binind]; - if (unlikely(tbin->ncached == tbin_info->ncached_max)) { - tcache_bin_flush_small(tsd, tcache, tbin, binind, - (tbin_info->ncached_max >> 1)); - } - assert(tbin->ncached < tbin_info->ncached_max); - tbin->avail[tbin->ncached] = ptr; - tbin->ncached++; - - tcache_event(tsd, tcache); -} - -JEMALLOC_ALWAYS_INLINE void -tcache_dalloc_large(tsd_t *tsd, tcache_t *tcache, void *ptr, size_t size) -{ - szind_t binind; - tcache_bin_t *tbin; - tcache_bin_info_t *tbin_info; - - assert((size & PAGE_MASK) == 0); - assert(tcache_salloc(ptr) > SMALL_MAXCLASS); - assert(tcache_salloc(ptr) <= tcache_maxclass); - - binind = size2index(size); - - if (config_fill && unlikely(opt_junk_free)) - arena_dalloc_junk_large(ptr, size); - - tbin = &tcache->tbins[binind]; - tbin_info = &tcache_bin_info[binind]; - if (unlikely(tbin->ncached == tbin_info->ncached_max)) { - tcache_bin_flush_large(tsd, tbin, binind, - (tbin_info->ncached_max >> 1), tcache); - } - assert(tbin->ncached < tbin_info->ncached_max); - tbin->avail[tbin->ncached] = ptr; - tbin->ncached++; - - tcache_event(tsd, tcache); -} - -JEMALLOC_ALWAYS_INLINE tcache_t * -tcaches_get(tsd_t *tsd, unsigned ind) -{ - tcaches_t *elm = &tcaches[ind]; - if (unlikely(elm->tcache == NULL)) - elm->tcache = tcache_create(tsd, arena_choose(tsd, NULL)); - return (elm->tcache); -} -#endif - -#endif /* JEMALLOC_H_INLINES */ -/******************************************************************************/ diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/valgrind.h b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/valgrind.h deleted file mode 100644 index a3380df..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/valgrind.h +++ /dev/null @@ -1,112 +0,0 @@ -/******************************************************************************/ -#ifdef JEMALLOC_H_TYPES - -#ifdef JEMALLOC_VALGRIND -#include - -/* - * The size that is reported to Valgrind must be consistent through a chain of - * malloc..realloc..realloc calls. Request size isn't recorded anywhere in - * jemalloc, so it is critical that all callers of these macros provide usize - * rather than request size. As a result, buffer overflow detection is - * technically weakened for the standard API, though it is generally accepted - * practice to consider any extra bytes reported by malloc_usable_size() as - * usable space. - */ -#define JEMALLOC_VALGRIND_MAKE_MEM_NOACCESS(ptr, usize) do { \ - if (unlikely(in_valgrind)) \ - valgrind_make_mem_noaccess(ptr, usize); \ -} while (0) -#define JEMALLOC_VALGRIND_MAKE_MEM_UNDEFINED(ptr, usize) do { \ - if (unlikely(in_valgrind)) \ - valgrind_make_mem_undefined(ptr, usize); \ -} while (0) -#define JEMALLOC_VALGRIND_MAKE_MEM_DEFINED(ptr, usize) do { \ - if (unlikely(in_valgrind)) \ - valgrind_make_mem_defined(ptr, usize); \ -} while (0) -/* - * The VALGRIND_MALLOCLIKE_BLOCK() and VALGRIND_RESIZEINPLACE_BLOCK() macro - * calls must be embedded in macros rather than in functions so that when - * Valgrind reports errors, there are no extra stack frames in the backtraces. - */ -#define JEMALLOC_VALGRIND_MALLOC(cond, ptr, usize, zero) do { \ - if (unlikely(in_valgrind && cond)) \ - VALGRIND_MALLOCLIKE_BLOCK(ptr, usize, p2rz(ptr), zero); \ -} while (0) -#define JEMALLOC_VALGRIND_REALLOC(maybe_moved, ptr, usize, \ - ptr_maybe_null, old_ptr, old_usize, old_rzsize, old_ptr_maybe_null, \ - zero) do { \ - if (unlikely(in_valgrind)) { \ - size_t rzsize = p2rz(ptr); \ - \ - if (!maybe_moved || ptr == old_ptr) { \ - VALGRIND_RESIZEINPLACE_BLOCK(ptr, old_usize, \ - usize, rzsize); \ - if (zero && old_usize < usize) { \ - valgrind_make_mem_defined( \ - (void *)((uintptr_t)ptr + \ - old_usize), usize - old_usize); \ - } \ - } else { \ - if (!old_ptr_maybe_null || old_ptr != NULL) { \ - valgrind_freelike_block(old_ptr, \ - old_rzsize); \ - } \ - if (!ptr_maybe_null || ptr != NULL) { \ - size_t copy_size = (old_usize < usize) \ - ? old_usize : usize; \ - size_t tail_size = usize - copy_size; \ - VALGRIND_MALLOCLIKE_BLOCK(ptr, usize, \ - rzsize, false); \ - if (copy_size > 0) { \ - valgrind_make_mem_defined(ptr, \ - copy_size); \ - } \ - if (zero && tail_size > 0) { \ - valgrind_make_mem_defined( \ - (void *)((uintptr_t)ptr + \ - copy_size), tail_size); \ - } \ - } \ - } \ - } \ -} while (0) -#define JEMALLOC_VALGRIND_FREE(ptr, rzsize) do { \ - if (unlikely(in_valgrind)) \ - valgrind_freelike_block(ptr, rzsize); \ -} while (0) -#else -#define RUNNING_ON_VALGRIND ((unsigned)0) -#define JEMALLOC_VALGRIND_MAKE_MEM_NOACCESS(ptr, usize) do {} while (0) -#define JEMALLOC_VALGRIND_MAKE_MEM_UNDEFINED(ptr, usize) do {} while (0) -#define JEMALLOC_VALGRIND_MAKE_MEM_DEFINED(ptr, usize) do {} while (0) -#define JEMALLOC_VALGRIND_MALLOC(cond, ptr, usize, zero) do {} while (0) -#define JEMALLOC_VALGRIND_REALLOC(maybe_moved, ptr, usize, \ - ptr_maybe_null, old_ptr, old_usize, old_rzsize, old_ptr_maybe_null, \ - zero) do {} while (0) -#define JEMALLOC_VALGRIND_FREE(ptr, rzsize) do {} while (0) -#endif - -#endif /* JEMALLOC_H_TYPES */ -/******************************************************************************/ -#ifdef JEMALLOC_H_STRUCTS - -#endif /* JEMALLOC_H_STRUCTS */ -/******************************************************************************/ -#ifdef JEMALLOC_H_EXTERNS - -#ifdef JEMALLOC_VALGRIND -void valgrind_make_mem_noaccess(void *ptr, size_t usize); -void valgrind_make_mem_undefined(void *ptr, size_t usize); -void valgrind_make_mem_defined(void *ptr, size_t usize); -void valgrind_freelike_block(void *ptr, size_t usize); -#endif - -#endif /* JEMALLOC_H_EXTERNS */ -/******************************************************************************/ -#ifdef JEMALLOC_H_INLINES - -#endif /* JEMALLOC_H_INLINES */ -/******************************************************************************/ - diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/install-sh b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/install-sh deleted file mode 100755 index ebc6691..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/install-sh +++ /dev/null @@ -1,250 +0,0 @@ -#! /bin/sh -# -# install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). -# -# Copyright 1991 by the Massachusetts Institute of Technology -# -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. - - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -transformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac -done - -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -else - true -fi - -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - else - instcmd=mkdir - fi -else - -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f $src -o -d $src ] - then - true - else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - true - fi - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - true - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' -' -IFS="${IFS-${defaultIFS}}" - -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift - - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - true - fi - - pathcomp="${pathcomp}/" -done -fi - -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` - else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename - fi - -# don't allow the sed command to completely eliminate the filename - - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - true - fi - -# Make a temp file name in the proper directory. - - dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - - $doit $instcmd $src $dsttmp && - - trap "rm -f ${dsttmp}" 0 && - -# and set any options; do chmod last to preserve setuid bits - -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && - -# Now rename the file to the real destination. - - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile - -fi && - - -exit 0 diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/release.c b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/release.c deleted file mode 100644 index e69de29..0000000 diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/atomic.c b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/atomic.c deleted file mode 100644 index 77ee313..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/atomic.c +++ /dev/null @@ -1,2 +0,0 @@ -#define JEMALLOC_ATOMIC_C_ -#include "jemalloc/internal/jemalloc_internal.h" diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/chunk.c b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/chunk.c deleted file mode 100644 index 6ba1ca7..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/chunk.c +++ /dev/null @@ -1,761 +0,0 @@ -#define JEMALLOC_CHUNK_C_ -#include "jemalloc/internal/jemalloc_internal.h" - -/******************************************************************************/ -/* Data. */ - -const char *opt_dss = DSS_DEFAULT; -size_t opt_lg_chunk = 0; - -/* Used exclusively for gdump triggering. */ -static size_t curchunks; -static size_t highchunks; - -rtree_t chunks_rtree; - -/* Various chunk-related settings. */ -size_t chunksize; -size_t chunksize_mask; /* (chunksize - 1). */ -size_t chunk_npages; - -static void *chunk_alloc_default(void *new_addr, size_t size, - size_t alignment, bool *zero, bool *commit, unsigned arena_ind); -static bool chunk_dalloc_default(void *chunk, size_t size, bool committed, - unsigned arena_ind); -static bool chunk_commit_default(void *chunk, size_t size, size_t offset, - size_t length, unsigned arena_ind); -static bool chunk_decommit_default(void *chunk, size_t size, size_t offset, - size_t length, unsigned arena_ind); -static bool chunk_purge_default(void *chunk, size_t size, size_t offset, - size_t length, unsigned arena_ind); -static bool chunk_split_default(void *chunk, size_t size, size_t size_a, - size_t size_b, bool committed, unsigned arena_ind); -static bool chunk_merge_default(void *chunk_a, size_t size_a, void *chunk_b, - size_t size_b, bool committed, unsigned arena_ind); - -const chunk_hooks_t chunk_hooks_default = { - chunk_alloc_default, - chunk_dalloc_default, - chunk_commit_default, - chunk_decommit_default, - chunk_purge_default, - chunk_split_default, - chunk_merge_default -}; - -/******************************************************************************/ -/* - * Function prototypes for static functions that are referenced prior to - * definition. - */ - -static void chunk_record(arena_t *arena, chunk_hooks_t *chunk_hooks, - extent_tree_t *chunks_szad, extent_tree_t *chunks_ad, bool cache, - void *chunk, size_t size, bool zeroed, bool committed); - -/******************************************************************************/ - -static chunk_hooks_t -chunk_hooks_get_locked(arena_t *arena) -{ - - return (arena->chunk_hooks); -} - -chunk_hooks_t -chunk_hooks_get(arena_t *arena) -{ - chunk_hooks_t chunk_hooks; - - malloc_mutex_lock(&arena->chunks_mtx); - chunk_hooks = chunk_hooks_get_locked(arena); - malloc_mutex_unlock(&arena->chunks_mtx); - - return (chunk_hooks); -} - -chunk_hooks_t -chunk_hooks_set(arena_t *arena, const chunk_hooks_t *chunk_hooks) -{ - chunk_hooks_t old_chunk_hooks; - - malloc_mutex_lock(&arena->chunks_mtx); - old_chunk_hooks = arena->chunk_hooks; - /* - * Copy each field atomically so that it is impossible for readers to - * see partially updated pointers. There are places where readers only - * need one hook function pointer (therefore no need to copy the - * entirety of arena->chunk_hooks), and stale reads do not affect - * correctness, so they perform unlocked reads. - */ -#define ATOMIC_COPY_HOOK(n) do { \ - union { \ - chunk_##n##_t **n; \ - void **v; \ - } u; \ - u.n = &arena->chunk_hooks.n; \ - atomic_write_p(u.v, chunk_hooks->n); \ -} while (0) - ATOMIC_COPY_HOOK(alloc); - ATOMIC_COPY_HOOK(dalloc); - ATOMIC_COPY_HOOK(commit); - ATOMIC_COPY_HOOK(decommit); - ATOMIC_COPY_HOOK(purge); - ATOMIC_COPY_HOOK(split); - ATOMIC_COPY_HOOK(merge); -#undef ATOMIC_COPY_HOOK - malloc_mutex_unlock(&arena->chunks_mtx); - - return (old_chunk_hooks); -} - -static void -chunk_hooks_assure_initialized_impl(arena_t *arena, chunk_hooks_t *chunk_hooks, - bool locked) -{ - static const chunk_hooks_t uninitialized_hooks = - CHUNK_HOOKS_INITIALIZER; - - if (memcmp(chunk_hooks, &uninitialized_hooks, sizeof(chunk_hooks_t)) == - 0) { - *chunk_hooks = locked ? chunk_hooks_get_locked(arena) : - chunk_hooks_get(arena); - } -} - -static void -chunk_hooks_assure_initialized_locked(arena_t *arena, - chunk_hooks_t *chunk_hooks) -{ - - chunk_hooks_assure_initialized_impl(arena, chunk_hooks, true); -} - -static void -chunk_hooks_assure_initialized(arena_t *arena, chunk_hooks_t *chunk_hooks) -{ - - chunk_hooks_assure_initialized_impl(arena, chunk_hooks, false); -} - -bool -chunk_register(const void *chunk, const extent_node_t *node) -{ - - assert(extent_node_addr_get(node) == chunk); - - if (rtree_set(&chunks_rtree, (uintptr_t)chunk, node)) - return (true); - if (config_prof && opt_prof) { - size_t size = extent_node_size_get(node); - size_t nadd = (size == 0) ? 1 : size / chunksize; - size_t cur = atomic_add_z(&curchunks, nadd); - size_t high = atomic_read_z(&highchunks); - while (cur > high && atomic_cas_z(&highchunks, high, cur)) { - /* - * Don't refresh cur, because it may have decreased - * since this thread lost the highchunks update race. - */ - high = atomic_read_z(&highchunks); - } - if (cur > high && prof_gdump_get_unlocked()) - prof_gdump(); - } - - return (false); -} - -void -chunk_deregister(const void *chunk, const extent_node_t *node) -{ - bool err; - - err = rtree_set(&chunks_rtree, (uintptr_t)chunk, NULL); - assert(!err); - if (config_prof && opt_prof) { - size_t size = extent_node_size_get(node); - size_t nsub = (size == 0) ? 1 : size / chunksize; - assert(atomic_read_z(&curchunks) >= nsub); - atomic_sub_z(&curchunks, nsub); - } -} - -/* - * Do first-best-fit chunk selection, i.e. select the lowest chunk that best - * fits. - */ -static extent_node_t * -chunk_first_best_fit(arena_t *arena, extent_tree_t *chunks_szad, - extent_tree_t *chunks_ad, size_t size) -{ - extent_node_t key; - - assert(size == CHUNK_CEILING(size)); - - extent_node_init(&key, arena, NULL, size, false, false); - return (extent_tree_szad_nsearch(chunks_szad, &key)); -} - -static void * -chunk_recycle(arena_t *arena, chunk_hooks_t *chunk_hooks, - extent_tree_t *chunks_szad, extent_tree_t *chunks_ad, bool cache, - void *new_addr, size_t size, size_t alignment, bool *zero, bool *commit, - bool dalloc_node) -{ - void *ret; - extent_node_t *node; - size_t alloc_size, leadsize, trailsize; - bool zeroed, committed; - - assert(new_addr == NULL || alignment == chunksize); - /* - * Cached chunks use the node linkage embedded in their headers, in - * which case dalloc_node is true, and new_addr is non-NULL because - * we're operating on a specific chunk. - */ - assert(dalloc_node || new_addr != NULL); - - alloc_size = CHUNK_CEILING(s2u(size + alignment - chunksize)); - /* Beware size_t wrap-around. */ - if (alloc_size < size) - return (NULL); - malloc_mutex_lock(&arena->chunks_mtx); - chunk_hooks_assure_initialized_locked(arena, chunk_hooks); - if (new_addr != NULL) { - extent_node_t key; - extent_node_init(&key, arena, new_addr, alloc_size, false, - false); - node = extent_tree_ad_search(chunks_ad, &key); - } else { - node = chunk_first_best_fit(arena, chunks_szad, chunks_ad, - alloc_size); - } - if (node == NULL || (new_addr != NULL && extent_node_size_get(node) < - size)) { - malloc_mutex_unlock(&arena->chunks_mtx); - return (NULL); - } - leadsize = ALIGNMENT_CEILING((uintptr_t)extent_node_addr_get(node), - alignment) - (uintptr_t)extent_node_addr_get(node); - assert(new_addr == NULL || leadsize == 0); - assert(extent_node_size_get(node) >= leadsize + size); - trailsize = extent_node_size_get(node) - leadsize - size; - ret = (void *)((uintptr_t)extent_node_addr_get(node) + leadsize); - zeroed = extent_node_zeroed_get(node); - if (zeroed) - *zero = true; - committed = extent_node_committed_get(node); - if (committed) - *commit = true; - /* Split the lead. */ - if (leadsize != 0 && - chunk_hooks->split(extent_node_addr_get(node), - extent_node_size_get(node), leadsize, size, false, arena->ind)) { - malloc_mutex_unlock(&arena->chunks_mtx); - return (NULL); - } - /* Remove node from the tree. */ - extent_tree_szad_remove(chunks_szad, node); - extent_tree_ad_remove(chunks_ad, node); - arena_chunk_cache_maybe_remove(arena, node, cache); - if (leadsize != 0) { - /* Insert the leading space as a smaller chunk. */ - extent_node_size_set(node, leadsize); - extent_tree_szad_insert(chunks_szad, node); - extent_tree_ad_insert(chunks_ad, node); - arena_chunk_cache_maybe_insert(arena, node, cache); - node = NULL; - } - if (trailsize != 0) { - /* Split the trail. */ - if (chunk_hooks->split(ret, size + trailsize, size, - trailsize, false, arena->ind)) { - if (dalloc_node && node != NULL) - arena_node_dalloc(arena, node); - malloc_mutex_unlock(&arena->chunks_mtx); - chunk_record(arena, chunk_hooks, chunks_szad, chunks_ad, - cache, ret, size + trailsize, zeroed, committed); - return (NULL); - } - /* Insert the trailing space as a smaller chunk. */ - if (node == NULL) { - node = arena_node_alloc(arena); - if (node == NULL) { - malloc_mutex_unlock(&arena->chunks_mtx); - chunk_record(arena, chunk_hooks, chunks_szad, - chunks_ad, cache, ret, size + trailsize, - zeroed, committed); - return (NULL); - } - } - extent_node_init(node, arena, (void *)((uintptr_t)(ret) + size), - trailsize, zeroed, committed); - extent_tree_szad_insert(chunks_szad, node); - extent_tree_ad_insert(chunks_ad, node); - arena_chunk_cache_maybe_insert(arena, node, cache); - node = NULL; - } - if (!committed && chunk_hooks->commit(ret, size, 0, size, arena->ind)) { - malloc_mutex_unlock(&arena->chunks_mtx); - chunk_record(arena, chunk_hooks, chunks_szad, chunks_ad, cache, - ret, size, zeroed, committed); - return (NULL); - } - malloc_mutex_unlock(&arena->chunks_mtx); - - assert(dalloc_node || node != NULL); - if (dalloc_node && node != NULL) - arena_node_dalloc(arena, node); - if (*zero) { - if (!zeroed) - memset(ret, 0, size); - else if (config_debug) { - size_t i; - size_t *p = (size_t *)(uintptr_t)ret; - - JEMALLOC_VALGRIND_MAKE_MEM_DEFINED(ret, size); - for (i = 0; i < size / sizeof(size_t); i++) - assert(p[i] == 0); - } - } - return (ret); -} - -/* - * If the caller specifies (!*zero), it is still possible to receive zeroed - * memory, in which case *zero is toggled to true. arena_chunk_alloc() takes - * advantage of this to avoid demanding zeroed chunks, but taking advantage of - * them if they are returned. - */ -static void * -chunk_alloc_core(arena_t *arena, void *new_addr, size_t size, size_t alignment, - bool *zero, bool *commit, dss_prec_t dss_prec) -{ - void *ret; - chunk_hooks_t chunk_hooks = CHUNK_HOOKS_INITIALIZER; - - assert(size != 0); - assert((size & chunksize_mask) == 0); - assert(alignment != 0); - assert((alignment & chunksize_mask) == 0); - - /* Retained. */ - if ((ret = chunk_recycle(arena, &chunk_hooks, - &arena->chunks_szad_retained, &arena->chunks_ad_retained, false, - new_addr, size, alignment, zero, commit, true)) != NULL) - return (ret); - - /* "primary" dss. */ - if (have_dss && dss_prec == dss_prec_primary && (ret = - chunk_alloc_dss(arena, new_addr, size, alignment, zero, commit)) != - NULL) - return (ret); - /* - * mmap. Requesting an address is not implemented for - * chunk_alloc_mmap(), so only call it if (new_addr == NULL). - */ - if (new_addr == NULL && (ret = chunk_alloc_mmap(size, alignment, zero, - commit)) != NULL) - return (ret); - /* "secondary" dss. */ - if (have_dss && dss_prec == dss_prec_secondary && (ret = - chunk_alloc_dss(arena, new_addr, size, alignment, zero, commit)) != - NULL) - return (ret); - - /* All strategies for allocation failed. */ - return (NULL); -} - -void * -chunk_alloc_base(size_t size) -{ - void *ret; - bool zero, commit; - - /* - * Directly call chunk_alloc_mmap() rather than chunk_alloc_core() - * because it's critical that chunk_alloc_base() return untouched - * demand-zeroed virtual memory. - */ - zero = true; - commit = true; - ret = chunk_alloc_mmap(size, chunksize, &zero, &commit); - if (ret == NULL) - return (NULL); - if (config_valgrind) - JEMALLOC_VALGRIND_MAKE_MEM_UNDEFINED(ret, size); - - return (ret); -} - -void * -chunk_alloc_cache(arena_t *arena, chunk_hooks_t *chunk_hooks, void *new_addr, - size_t size, size_t alignment, bool *zero, bool dalloc_node) -{ - void *ret; - bool commit; - - assert(size != 0); - assert((size & chunksize_mask) == 0); - assert(alignment != 0); - assert((alignment & chunksize_mask) == 0); - - commit = true; - ret = chunk_recycle(arena, chunk_hooks, &arena->chunks_szad_cached, - &arena->chunks_ad_cached, true, new_addr, size, alignment, zero, - &commit, dalloc_node); - if (ret == NULL) - return (NULL); - assert(commit); - if (config_valgrind) - JEMALLOC_VALGRIND_MAKE_MEM_UNDEFINED(ret, size); - return (ret); -} - -static arena_t * -chunk_arena_get(unsigned arena_ind) -{ - arena_t *arena; - - /* Dodge tsd for a0 in order to avoid bootstrapping issues. */ - arena = (arena_ind == 0) ? a0get() : arena_get(tsd_fetch(), arena_ind, - false, true); - /* - * The arena we're allocating on behalf of must have been initialized - * already. - */ - assert(arena != NULL); - return (arena); -} - -static void * -chunk_alloc_default(void *new_addr, size_t size, size_t alignment, bool *zero, - bool *commit, unsigned arena_ind) -{ - void *ret; - arena_t *arena; - - arena = chunk_arena_get(arena_ind); - ret = chunk_alloc_core(arena, new_addr, size, alignment, zero, - commit, arena->dss_prec); - if (ret == NULL) - return (NULL); - if (config_valgrind) - JEMALLOC_VALGRIND_MAKE_MEM_UNDEFINED(ret, size); - - return (ret); -} - -void * -chunk_alloc_wrapper(arena_t *arena, chunk_hooks_t *chunk_hooks, void *new_addr, - size_t size, size_t alignment, bool *zero, bool *commit) -{ - void *ret; - - chunk_hooks_assure_initialized(arena, chunk_hooks); - ret = chunk_hooks->alloc(new_addr, size, alignment, zero, commit, - arena->ind); - if (ret == NULL) - return (NULL); - if (config_valgrind && chunk_hooks->alloc != chunk_alloc_default) - JEMALLOC_VALGRIND_MAKE_MEM_UNDEFINED(ret, chunksize); - return (ret); -} - -static void -chunk_record(arena_t *arena, chunk_hooks_t *chunk_hooks, - extent_tree_t *chunks_szad, extent_tree_t *chunks_ad, bool cache, - void *chunk, size_t size, bool zeroed, bool committed) -{ - bool unzeroed; - extent_node_t *node, *prev; - extent_node_t key; - - assert(!cache || !zeroed); - unzeroed = cache || !zeroed; - JEMALLOC_VALGRIND_MAKE_MEM_NOACCESS(chunk, size); - - malloc_mutex_lock(&arena->chunks_mtx); - chunk_hooks_assure_initialized_locked(arena, chunk_hooks); - extent_node_init(&key, arena, (void *)((uintptr_t)chunk + size), 0, - false, false); - node = extent_tree_ad_nsearch(chunks_ad, &key); - /* Try to coalesce forward. */ - if (node != NULL && extent_node_addr_get(node) == - extent_node_addr_get(&key) && extent_node_committed_get(node) == - committed && !chunk_hooks->merge(chunk, size, - extent_node_addr_get(node), extent_node_size_get(node), false, - arena->ind)) { - /* - * Coalesce chunk with the following address range. This does - * not change the position within chunks_ad, so only - * remove/insert from/into chunks_szad. - */ - extent_tree_szad_remove(chunks_szad, node); - arena_chunk_cache_maybe_remove(arena, node, cache); - extent_node_addr_set(node, chunk); - extent_node_size_set(node, size + extent_node_size_get(node)); - extent_node_zeroed_set(node, extent_node_zeroed_get(node) && - !unzeroed); - extent_tree_szad_insert(chunks_szad, node); - arena_chunk_cache_maybe_insert(arena, node, cache); - } else { - /* Coalescing forward failed, so insert a new node. */ - node = arena_node_alloc(arena); - if (node == NULL) { - /* - * Node allocation failed, which is an exceedingly - * unlikely failure. Leak chunk after making sure its - * pages have already been purged, so that this is only - * a virtual memory leak. - */ - if (cache) { - chunk_purge_wrapper(arena, chunk_hooks, chunk, - size, 0, size); - } - goto label_return; - } - extent_node_init(node, arena, chunk, size, !unzeroed, - committed); - extent_tree_ad_insert(chunks_ad, node); - extent_tree_szad_insert(chunks_szad, node); - arena_chunk_cache_maybe_insert(arena, node, cache); - } - - /* Try to coalesce backward. */ - prev = extent_tree_ad_prev(chunks_ad, node); - if (prev != NULL && (void *)((uintptr_t)extent_node_addr_get(prev) + - extent_node_size_get(prev)) == chunk && - extent_node_committed_get(prev) == committed && - !chunk_hooks->merge(extent_node_addr_get(prev), - extent_node_size_get(prev), chunk, size, false, arena->ind)) { - /* - * Coalesce chunk with the previous address range. This does - * not change the position within chunks_ad, so only - * remove/insert node from/into chunks_szad. - */ - extent_tree_szad_remove(chunks_szad, prev); - extent_tree_ad_remove(chunks_ad, prev); - arena_chunk_cache_maybe_remove(arena, prev, cache); - extent_tree_szad_remove(chunks_szad, node); - arena_chunk_cache_maybe_remove(arena, node, cache); - extent_node_addr_set(node, extent_node_addr_get(prev)); - extent_node_size_set(node, extent_node_size_get(prev) + - extent_node_size_get(node)); - extent_node_zeroed_set(node, extent_node_zeroed_get(prev) && - extent_node_zeroed_get(node)); - extent_tree_szad_insert(chunks_szad, node); - arena_chunk_cache_maybe_insert(arena, node, cache); - - arena_node_dalloc(arena, prev); - } - -label_return: - malloc_mutex_unlock(&arena->chunks_mtx); -} - -void -chunk_dalloc_cache(arena_t *arena, chunk_hooks_t *chunk_hooks, void *chunk, - size_t size, bool committed) -{ - - assert(chunk != NULL); - assert(CHUNK_ADDR2BASE(chunk) == chunk); - assert(size != 0); - assert((size & chunksize_mask) == 0); - - chunk_record(arena, chunk_hooks, &arena->chunks_szad_cached, - &arena->chunks_ad_cached, true, chunk, size, false, committed); - arena_maybe_purge(arena); -} - -void -chunk_dalloc_arena(arena_t *arena, chunk_hooks_t *chunk_hooks, void *chunk, - size_t size, bool zeroed, bool committed) -{ - - assert(chunk != NULL); - assert(CHUNK_ADDR2BASE(chunk) == chunk); - assert(size != 0); - assert((size & chunksize_mask) == 0); - - chunk_hooks_assure_initialized(arena, chunk_hooks); - /* Try to deallocate. */ - if (!chunk_hooks->dalloc(chunk, size, committed, arena->ind)) - return; - /* Try to decommit; purge if that fails. */ - if (committed) { - committed = chunk_hooks->decommit(chunk, size, 0, size, - arena->ind); - } - zeroed = !committed || !chunk_hooks->purge(chunk, size, 0, size, - arena->ind); - chunk_record(arena, chunk_hooks, &arena->chunks_szad_retained, - &arena->chunks_ad_retained, false, chunk, size, zeroed, committed); -} - -static bool -chunk_dalloc_default(void *chunk, size_t size, bool committed, - unsigned arena_ind) -{ - - if (!have_dss || !chunk_in_dss(chunk)) - return (chunk_dalloc_mmap(chunk, size)); - return (true); -} - -void -chunk_dalloc_wrapper(arena_t *arena, chunk_hooks_t *chunk_hooks, void *chunk, - size_t size, bool committed) -{ - - chunk_hooks_assure_initialized(arena, chunk_hooks); - chunk_hooks->dalloc(chunk, size, committed, arena->ind); - if (config_valgrind && chunk_hooks->dalloc != chunk_dalloc_default) - JEMALLOC_VALGRIND_MAKE_MEM_NOACCESS(chunk, size); -} - -static bool -chunk_commit_default(void *chunk, size_t size, size_t offset, size_t length, - unsigned arena_ind) -{ - - return (pages_commit((void *)((uintptr_t)chunk + (uintptr_t)offset), - length)); -} - -static bool -chunk_decommit_default(void *chunk, size_t size, size_t offset, size_t length, - unsigned arena_ind) -{ - - return (pages_decommit((void *)((uintptr_t)chunk + (uintptr_t)offset), - length)); -} - -bool -chunk_purge_arena(arena_t *arena, void *chunk, size_t offset, size_t length) -{ - - assert(chunk != NULL); - assert(CHUNK_ADDR2BASE(chunk) == chunk); - assert((offset & PAGE_MASK) == 0); - assert(length != 0); - assert((length & PAGE_MASK) == 0); - - return (pages_purge((void *)((uintptr_t)chunk + (uintptr_t)offset), - length)); -} - -static bool -chunk_purge_default(void *chunk, size_t size, size_t offset, size_t length, - unsigned arena_ind) -{ - - return (chunk_purge_arena(chunk_arena_get(arena_ind), chunk, offset, - length)); -} - -bool -chunk_purge_wrapper(arena_t *arena, chunk_hooks_t *chunk_hooks, void *chunk, - size_t size, size_t offset, size_t length) -{ - - chunk_hooks_assure_initialized(arena, chunk_hooks); - return (chunk_hooks->purge(chunk, size, offset, length, arena->ind)); -} - -static bool -chunk_split_default(void *chunk, size_t size, size_t size_a, size_t size_b, - bool committed, unsigned arena_ind) -{ - - if (!maps_coalesce) - return (true); - return (false); -} - -static bool -chunk_merge_default(void *chunk_a, size_t size_a, void *chunk_b, size_t size_b, - bool committed, unsigned arena_ind) -{ - - if (!maps_coalesce) - return (true); - if (have_dss && chunk_in_dss(chunk_a) != chunk_in_dss(chunk_b)) - return (true); - - return (false); -} - -static rtree_node_elm_t * -chunks_rtree_node_alloc(size_t nelms) -{ - - return ((rtree_node_elm_t *)base_alloc(nelms * - sizeof(rtree_node_elm_t))); -} - -bool -chunk_boot(void) -{ -#ifdef _WIN32 - SYSTEM_INFO info; - GetSystemInfo(&info); - - /* - * Verify actual page size is equal to or an integral multiple of - * configured page size. - */ - if (info.dwPageSize & ((1U << LG_PAGE) - 1)) - return (true); - - /* - * Configure chunksize (if not set) to match granularity (usually 64K), - * so pages_map will always take fast path. - */ - if (!opt_lg_chunk) { - opt_lg_chunk = jemalloc_ffs((int)info.dwAllocationGranularity) - - 1; - } -#else - if (!opt_lg_chunk) - opt_lg_chunk = LG_CHUNK_DEFAULT; -#endif - - /* Set variables according to the value of opt_lg_chunk. */ - chunksize = (ZU(1) << opt_lg_chunk); - assert(chunksize >= PAGE); - chunksize_mask = chunksize - 1; - chunk_npages = (chunksize >> LG_PAGE); - - if (have_dss && chunk_dss_boot()) - return (true); - if (rtree_new(&chunks_rtree, (ZU(1) << (LG_SIZEOF_PTR+3)) - - opt_lg_chunk, chunks_rtree_node_alloc, NULL)) - return (true); - - return (false); -} - -void -chunk_prefork(void) -{ - - chunk_dss_prefork(); -} - -void -chunk_postfork_parent(void) -{ - - chunk_dss_postfork_parent(); -} - -void -chunk_postfork_child(void) -{ - - chunk_dss_postfork_child(); -} diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/chunk_dss.c b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/chunk_dss.c deleted file mode 100644 index 61fc916..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/chunk_dss.c +++ /dev/null @@ -1,214 +0,0 @@ -#define JEMALLOC_CHUNK_DSS_C_ -#include "jemalloc/internal/jemalloc_internal.h" -/******************************************************************************/ -/* Data. */ - -const char *dss_prec_names[] = { - "disabled", - "primary", - "secondary", - "N/A" -}; - -/* Current dss precedence default, used when creating new arenas. */ -static dss_prec_t dss_prec_default = DSS_PREC_DEFAULT; - -/* - * Protects sbrk() calls. This avoids malloc races among threads, though it - * does not protect against races with threads that call sbrk() directly. - */ -static malloc_mutex_t dss_mtx; - -/* Base address of the DSS. */ -static void *dss_base; -/* Current end of the DSS, or ((void *)-1) if the DSS is exhausted. */ -static void *dss_prev; -/* Current upper limit on DSS addresses. */ -static void *dss_max; - -/******************************************************************************/ - -static void * -chunk_dss_sbrk(intptr_t increment) -{ - -#ifdef JEMALLOC_DSS - return (sbrk(increment)); -#else - not_implemented(); - return (NULL); -#endif -} - -dss_prec_t -chunk_dss_prec_get(void) -{ - dss_prec_t ret; - - if (!have_dss) - return (dss_prec_disabled); - malloc_mutex_lock(&dss_mtx); - ret = dss_prec_default; - malloc_mutex_unlock(&dss_mtx); - return (ret); -} - -bool -chunk_dss_prec_set(dss_prec_t dss_prec) -{ - - if (!have_dss) - return (dss_prec != dss_prec_disabled); - malloc_mutex_lock(&dss_mtx); - dss_prec_default = dss_prec; - malloc_mutex_unlock(&dss_mtx); - return (false); -} - -void * -chunk_alloc_dss(arena_t *arena, void *new_addr, size_t size, size_t alignment, - bool *zero, bool *commit) -{ - cassert(have_dss); - assert(size > 0 && (size & chunksize_mask) == 0); - assert(alignment > 0 && (alignment & chunksize_mask) == 0); - - /* - * sbrk() uses a signed increment argument, so take care not to - * interpret a huge allocation request as a negative increment. - */ - if ((intptr_t)size < 0) - return (NULL); - - malloc_mutex_lock(&dss_mtx); - if (dss_prev != (void *)-1) { - - /* - * The loop is necessary to recover from races with other - * threads that are using the DSS for something other than - * malloc. - */ - do { - void *ret, *cpad, *dss_next; - size_t gap_size, cpad_size; - intptr_t incr; - /* Avoid an unnecessary system call. */ - if (new_addr != NULL && dss_max != new_addr) - break; - - /* Get the current end of the DSS. */ - dss_max = chunk_dss_sbrk(0); - - /* Make sure the earlier condition still holds. */ - if (new_addr != NULL && dss_max != new_addr) - break; - - /* - * Calculate how much padding is necessary to - * chunk-align the end of the DSS. - */ - gap_size = (chunksize - CHUNK_ADDR2OFFSET(dss_max)) & - chunksize_mask; - /* - * Compute how much chunk-aligned pad space (if any) is - * necessary to satisfy alignment. This space can be - * recycled for later use. - */ - cpad = (void *)((uintptr_t)dss_max + gap_size); - ret = (void *)ALIGNMENT_CEILING((uintptr_t)dss_max, - alignment); - cpad_size = (uintptr_t)ret - (uintptr_t)cpad; - dss_next = (void *)((uintptr_t)ret + size); - if ((uintptr_t)ret < (uintptr_t)dss_max || - (uintptr_t)dss_next < (uintptr_t)dss_max) { - /* Wrap-around. */ - malloc_mutex_unlock(&dss_mtx); - return (NULL); - } - incr = gap_size + cpad_size + size; - dss_prev = chunk_dss_sbrk(incr); - if (dss_prev == dss_max) { - /* Success. */ - dss_max = dss_next; - malloc_mutex_unlock(&dss_mtx); - if (cpad_size != 0) { - chunk_hooks_t chunk_hooks = - CHUNK_HOOKS_INITIALIZER; - chunk_dalloc_wrapper(arena, - &chunk_hooks, cpad, cpad_size, - true); - } - if (*zero) { - JEMALLOC_VALGRIND_MAKE_MEM_UNDEFINED( - ret, size); - memset(ret, 0, size); - } - if (!*commit) - *commit = pages_decommit(ret, size); - return (ret); - } - } while (dss_prev != (void *)-1); - } - malloc_mutex_unlock(&dss_mtx); - - return (NULL); -} - -bool -chunk_in_dss(void *chunk) -{ - bool ret; - - cassert(have_dss); - - malloc_mutex_lock(&dss_mtx); - if ((uintptr_t)chunk >= (uintptr_t)dss_base - && (uintptr_t)chunk < (uintptr_t)dss_max) - ret = true; - else - ret = false; - malloc_mutex_unlock(&dss_mtx); - - return (ret); -} - -bool -chunk_dss_boot(void) -{ - - cassert(have_dss); - - if (malloc_mutex_init(&dss_mtx)) - return (true); - dss_base = chunk_dss_sbrk(0); - dss_prev = dss_base; - dss_max = dss_base; - - return (false); -} - -void -chunk_dss_prefork(void) -{ - - if (have_dss) - malloc_mutex_prefork(&dss_mtx); -} - -void -chunk_dss_postfork_parent(void) -{ - - if (have_dss) - malloc_mutex_postfork_parent(&dss_mtx); -} - -void -chunk_dss_postfork_child(void) -{ - - if (have_dss) - malloc_mutex_postfork_child(&dss_mtx); -} - -/******************************************************************************/ diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/chunk_mmap.c b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/chunk_mmap.c deleted file mode 100644 index b9ba741..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/chunk_mmap.c +++ /dev/null @@ -1,80 +0,0 @@ -#define JEMALLOC_CHUNK_MMAP_C_ -#include "jemalloc/internal/jemalloc_internal.h" - -/******************************************************************************/ - -static void * -chunk_alloc_mmap_slow(size_t size, size_t alignment, bool *zero, bool *commit) -{ - void *ret; - size_t alloc_size; - - alloc_size = size + alignment - PAGE; - /* Beware size_t wrap-around. */ - if (alloc_size < size) - return (NULL); - do { - void *pages; - size_t leadsize; - pages = pages_map(NULL, alloc_size); - if (pages == NULL) - return (NULL); - leadsize = ALIGNMENT_CEILING((uintptr_t)pages, alignment) - - (uintptr_t)pages; - ret = pages_trim(pages, alloc_size, leadsize, size); - } while (ret == NULL); - - assert(ret != NULL); - *zero = true; - if (!*commit) - *commit = pages_decommit(ret, size); - return (ret); -} - -void * -chunk_alloc_mmap(size_t size, size_t alignment, bool *zero, bool *commit) -{ - void *ret; - size_t offset; - - /* - * Ideally, there would be a way to specify alignment to mmap() (like - * NetBSD has), but in the absence of such a feature, we have to work - * hard to efficiently create aligned mappings. The reliable, but - * slow method is to create a mapping that is over-sized, then trim the - * excess. However, that always results in one or two calls to - * pages_unmap(). - * - * Optimistically try mapping precisely the right amount before falling - * back to the slow method, with the expectation that the optimistic - * approach works most of the time. - */ - - assert(alignment != 0); - assert((alignment & chunksize_mask) == 0); - - ret = pages_map(NULL, size); - if (ret == NULL) - return (NULL); - offset = ALIGNMENT_ADDR2OFFSET(ret, alignment); - if (offset != 0) { - pages_unmap(ret, size); - return (chunk_alloc_mmap_slow(size, alignment, zero, commit)); - } - - assert(ret != NULL); - *zero = true; - if (!*commit) - *commit = pages_decommit(ret, size); - return (ret); -} - -bool -chunk_dalloc_mmap(void *chunk, size_t size) -{ - - if (config_munmap) - pages_unmap(chunk, size); - - return (!config_munmap); -} diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/huge.c b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/huge.c deleted file mode 100644 index 1e9a665..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/huge.c +++ /dev/null @@ -1,435 +0,0 @@ -#define JEMALLOC_HUGE_C_ -#include "jemalloc/internal/jemalloc_internal.h" - -/******************************************************************************/ - -static extent_node_t * -huge_node_get(const void *ptr) -{ - extent_node_t *node; - - node = chunk_lookup(ptr, true); - assert(!extent_node_achunk_get(node)); - - return (node); -} - -static bool -huge_node_set(const void *ptr, extent_node_t *node) -{ - - assert(extent_node_addr_get(node) == ptr); - assert(!extent_node_achunk_get(node)); - return (chunk_register(ptr, node)); -} - -static void -huge_node_unset(const void *ptr, const extent_node_t *node) -{ - - chunk_deregister(ptr, node); -} - -void * -huge_malloc(tsd_t *tsd, arena_t *arena, size_t size, bool zero, - tcache_t *tcache) -{ - size_t usize; - - usize = s2u(size); - if (usize == 0) { - /* size_t overflow. */ - return (NULL); - } - - return (huge_palloc(tsd, arena, usize, chunksize, zero, tcache)); -} - -void * -huge_palloc(tsd_t *tsd, arena_t *arena, size_t size, size_t alignment, - bool zero, tcache_t *tcache) -{ - void *ret; - size_t usize; - extent_node_t *node; - bool is_zeroed; - - /* Allocate one or more contiguous chunks for this request. */ - - usize = sa2u(size, alignment); - if (unlikely(usize == 0)) - return (NULL); - assert(usize >= chunksize); - - /* Allocate an extent node with which to track the chunk. */ - node = ipallocztm(tsd, CACHELINE_CEILING(sizeof(extent_node_t)), - CACHELINE, false, tcache, true, arena); - if (node == NULL) - return (NULL); - - /* - * Copy zero into is_zeroed and pass the copy to chunk_alloc(), so that - * it is possible to make correct junk/zero fill decisions below. - */ - is_zeroed = zero; - arena = arena_choose(tsd, arena); - if (unlikely(arena == NULL) || (ret = arena_chunk_alloc_huge(arena, - size, alignment, &is_zeroed)) == NULL) { - idalloctm(tsd, node, tcache, true); - return (NULL); - } - - extent_node_init(node, arena, ret, size, is_zeroed, true); - - if (huge_node_set(ret, node)) { - arena_chunk_dalloc_huge(arena, ret, size); - idalloctm(tsd, node, tcache, true); - return (NULL); - } - - /* Insert node into huge. */ - malloc_mutex_lock(&arena->huge_mtx); - ql_elm_new(node, ql_link); - ql_tail_insert(&arena->huge, node, ql_link); - malloc_mutex_unlock(&arena->huge_mtx); - - if (zero || (config_fill && unlikely(opt_zero))) { - if (!is_zeroed) - memset(ret, 0, size); - } else if (config_fill && unlikely(opt_junk_alloc)) - memset(ret, 0xa5, size); - - return (ret); -} - -#ifdef JEMALLOC_JET -#undef huge_dalloc_junk -#define huge_dalloc_junk JEMALLOC_N(huge_dalloc_junk_impl) -#endif -static void -huge_dalloc_junk(void *ptr, size_t usize) -{ - - if (config_fill && have_dss && unlikely(opt_junk_free)) { - /* - * Only bother junk filling if the chunk isn't about to be - * unmapped. - */ - if (!config_munmap || (have_dss && chunk_in_dss(ptr))) - memset(ptr, 0x5a, usize); - } -} -#ifdef JEMALLOC_JET -#undef huge_dalloc_junk -#define huge_dalloc_junk JEMALLOC_N(huge_dalloc_junk) -huge_dalloc_junk_t *huge_dalloc_junk = JEMALLOC_N(huge_dalloc_junk_impl); -#endif - -static void -huge_ralloc_no_move_similar(void *ptr, size_t oldsize, size_t usize_min, - size_t usize_max, bool zero) -{ - size_t usize, usize_next; - extent_node_t *node; - arena_t *arena; - chunk_hooks_t chunk_hooks = CHUNK_HOOKS_INITIALIZER; - bool pre_zeroed, post_zeroed; - - /* Increase usize to incorporate extra. */ - for (usize = usize_min; usize < usize_max && (usize_next = s2u(usize+1)) - <= oldsize; usize = usize_next) - ; /* Do nothing. */ - - if (oldsize == usize) - return; - - node = huge_node_get(ptr); - arena = extent_node_arena_get(node); - pre_zeroed = extent_node_zeroed_get(node); - - /* Fill if necessary (shrinking). */ - if (oldsize > usize) { - size_t sdiff = oldsize - usize; - if (config_fill && unlikely(opt_junk_free)) { - memset((void *)((uintptr_t)ptr + usize), 0x5a, sdiff); - post_zeroed = false; - } else { - post_zeroed = !chunk_purge_wrapper(arena, &chunk_hooks, - ptr, CHUNK_CEILING(oldsize), usize, sdiff); - } - } else - post_zeroed = pre_zeroed; - - malloc_mutex_lock(&arena->huge_mtx); - /* Update the size of the huge allocation. */ - assert(extent_node_size_get(node) != usize); - extent_node_size_set(node, usize); - /* Update zeroed. */ - extent_node_zeroed_set(node, post_zeroed); - malloc_mutex_unlock(&arena->huge_mtx); - - arena_chunk_ralloc_huge_similar(arena, ptr, oldsize, usize); - - /* Fill if necessary (growing). */ - if (oldsize < usize) { - if (zero || (config_fill && unlikely(opt_zero))) { - if (!pre_zeroed) { - memset((void *)((uintptr_t)ptr + oldsize), 0, - usize - oldsize); - } - } else if (config_fill && unlikely(opt_junk_alloc)) { - memset((void *)((uintptr_t)ptr + oldsize), 0xa5, usize - - oldsize); - } - } -} - -static bool -huge_ralloc_no_move_shrink(void *ptr, size_t oldsize, size_t usize) -{ - extent_node_t *node; - arena_t *arena; - chunk_hooks_t chunk_hooks; - size_t cdiff; - bool pre_zeroed, post_zeroed; - - node = huge_node_get(ptr); - arena = extent_node_arena_get(node); - pre_zeroed = extent_node_zeroed_get(node); - chunk_hooks = chunk_hooks_get(arena); - - assert(oldsize > usize); - - /* Split excess chunks. */ - cdiff = CHUNK_CEILING(oldsize) - CHUNK_CEILING(usize); - if (cdiff != 0 && chunk_hooks.split(ptr, CHUNK_CEILING(oldsize), - CHUNK_CEILING(usize), cdiff, true, arena->ind)) - return (true); - - if (oldsize > usize) { - size_t sdiff = oldsize - usize; - if (config_fill && unlikely(opt_junk_free)) { - huge_dalloc_junk((void *)((uintptr_t)ptr + usize), - sdiff); - post_zeroed = false; - } else { - post_zeroed = !chunk_purge_wrapper(arena, &chunk_hooks, - CHUNK_ADDR2BASE((uintptr_t)ptr + usize), - CHUNK_CEILING(oldsize), - CHUNK_ADDR2OFFSET((uintptr_t)ptr + usize), sdiff); - } - } else - post_zeroed = pre_zeroed; - - malloc_mutex_lock(&arena->huge_mtx); - /* Update the size of the huge allocation. */ - extent_node_size_set(node, usize); - /* Update zeroed. */ - extent_node_zeroed_set(node, post_zeroed); - malloc_mutex_unlock(&arena->huge_mtx); - - /* Zap the excess chunks. */ - arena_chunk_ralloc_huge_shrink(arena, ptr, oldsize, usize); - - return (false); -} - -static bool -huge_ralloc_no_move_expand(void *ptr, size_t oldsize, size_t usize, bool zero) { - extent_node_t *node; - arena_t *arena; - bool is_zeroed_subchunk, is_zeroed_chunk; - - node = huge_node_get(ptr); - arena = extent_node_arena_get(node); - malloc_mutex_lock(&arena->huge_mtx); - is_zeroed_subchunk = extent_node_zeroed_get(node); - malloc_mutex_unlock(&arena->huge_mtx); - - /* - * Copy zero into is_zeroed_chunk and pass the copy to chunk_alloc(), so - * that it is possible to make correct junk/zero fill decisions below. - */ - is_zeroed_chunk = zero; - - if (arena_chunk_ralloc_huge_expand(arena, ptr, oldsize, usize, - &is_zeroed_chunk)) - return (true); - - malloc_mutex_lock(&arena->huge_mtx); - /* Update the size of the huge allocation. */ - extent_node_size_set(node, usize); - malloc_mutex_unlock(&arena->huge_mtx); - - if (zero || (config_fill && unlikely(opt_zero))) { - if (!is_zeroed_subchunk) { - memset((void *)((uintptr_t)ptr + oldsize), 0, - CHUNK_CEILING(oldsize) - oldsize); - } - if (!is_zeroed_chunk) { - memset((void *)((uintptr_t)ptr + - CHUNK_CEILING(oldsize)), 0, usize - - CHUNK_CEILING(oldsize)); - } - } else if (config_fill && unlikely(opt_junk_alloc)) { - memset((void *)((uintptr_t)ptr + oldsize), 0xa5, usize - - oldsize); - } - - return (false); -} - -bool -huge_ralloc_no_move(void *ptr, size_t oldsize, size_t usize_min, - size_t usize_max, bool zero) -{ - - assert(s2u(oldsize) == oldsize); - - /* Both allocations must be huge to avoid a move. */ - if (oldsize < chunksize || usize_max < chunksize) - return (true); - - if (CHUNK_CEILING(usize_max) > CHUNK_CEILING(oldsize)) { - /* Attempt to expand the allocation in-place. */ - if (!huge_ralloc_no_move_expand(ptr, oldsize, usize_max, zero)) - return (false); - /* Try again, this time with usize_min. */ - if (usize_min < usize_max && CHUNK_CEILING(usize_min) > - CHUNK_CEILING(oldsize) && huge_ralloc_no_move_expand(ptr, - oldsize, usize_min, zero)) - return (false); - } - - /* - * Avoid moving the allocation if the existing chunk size accommodates - * the new size. - */ - if (CHUNK_CEILING(oldsize) >= CHUNK_CEILING(usize_min) - && CHUNK_CEILING(oldsize) <= CHUNK_CEILING(usize_max)) { - huge_ralloc_no_move_similar(ptr, oldsize, usize_min, usize_max, - zero); - return (false); - } - - /* Attempt to shrink the allocation in-place. */ - if (CHUNK_CEILING(oldsize) > CHUNK_CEILING(usize_max)) - return (huge_ralloc_no_move_shrink(ptr, oldsize, usize_max)); - return (true); -} - -static void * -huge_ralloc_move_helper(tsd_t *tsd, arena_t *arena, size_t usize, - size_t alignment, bool zero, tcache_t *tcache) -{ - - if (alignment <= chunksize) - return (huge_malloc(tsd, arena, usize, zero, tcache)); - return (huge_palloc(tsd, arena, usize, alignment, zero, tcache)); -} - -void * -huge_ralloc(tsd_t *tsd, arena_t *arena, void *ptr, size_t oldsize, size_t usize, - size_t alignment, bool zero, tcache_t *tcache) -{ - void *ret; - size_t copysize; - - /* Try to avoid moving the allocation. */ - if (!huge_ralloc_no_move(ptr, oldsize, usize, usize, zero)) - return (ptr); - - /* - * usize and oldsize are different enough that we need to use a - * different size class. In that case, fall back to allocating new - * space and copying. - */ - ret = huge_ralloc_move_helper(tsd, arena, usize, alignment, zero, - tcache); - if (ret == NULL) - return (NULL); - - copysize = (usize < oldsize) ? usize : oldsize; - memcpy(ret, ptr, copysize); - isqalloc(tsd, ptr, oldsize, tcache); - return (ret); -} - -void -huge_dalloc(tsd_t *tsd, void *ptr, tcache_t *tcache) -{ - extent_node_t *node; - arena_t *arena; - - node = huge_node_get(ptr); - arena = extent_node_arena_get(node); - huge_node_unset(ptr, node); - malloc_mutex_lock(&arena->huge_mtx); - ql_remove(&arena->huge, node, ql_link); - malloc_mutex_unlock(&arena->huge_mtx); - - huge_dalloc_junk(extent_node_addr_get(node), - extent_node_size_get(node)); - arena_chunk_dalloc_huge(extent_node_arena_get(node), - extent_node_addr_get(node), extent_node_size_get(node)); - idalloctm(tsd, node, tcache, true); -} - -arena_t * -huge_aalloc(const void *ptr) -{ - - return (extent_node_arena_get(huge_node_get(ptr))); -} - -size_t -huge_salloc(const void *ptr) -{ - size_t size; - extent_node_t *node; - arena_t *arena; - - node = huge_node_get(ptr); - arena = extent_node_arena_get(node); - malloc_mutex_lock(&arena->huge_mtx); - size = extent_node_size_get(node); - malloc_mutex_unlock(&arena->huge_mtx); - - return (size); -} - -prof_tctx_t * -huge_prof_tctx_get(const void *ptr) -{ - prof_tctx_t *tctx; - extent_node_t *node; - arena_t *arena; - - node = huge_node_get(ptr); - arena = extent_node_arena_get(node); - malloc_mutex_lock(&arena->huge_mtx); - tctx = extent_node_prof_tctx_get(node); - malloc_mutex_unlock(&arena->huge_mtx); - - return (tctx); -} - -void -huge_prof_tctx_set(const void *ptr, prof_tctx_t *tctx) -{ - extent_node_t *node; - arena_t *arena; - - node = huge_node_get(ptr); - arena = extent_node_arena_get(node); - malloc_mutex_lock(&arena->huge_mtx); - extent_node_prof_tctx_set(node, tctx); - malloc_mutex_unlock(&arena->huge_mtx); -} - -void -huge_prof_tctx_reset(const void *ptr) -{ - - huge_prof_tctx_set(ptr, (prof_tctx_t *)(uintptr_t)1U); -} diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/mb.c b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/mb.c deleted file mode 100644 index dc2c0a2..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/mb.c +++ /dev/null @@ -1,2 +0,0 @@ -#define JEMALLOC_MB_C_ -#include "jemalloc/internal/jemalloc_internal.h" diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/quarantine.c b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/quarantine.c deleted file mode 100644 index 6c43dfc..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/quarantine.c +++ /dev/null @@ -1,183 +0,0 @@ -#define JEMALLOC_QUARANTINE_C_ -#include "jemalloc/internal/jemalloc_internal.h" - -/* - * Quarantine pointers close to NULL are used to encode state information that - * is used for cleaning up during thread shutdown. - */ -#define QUARANTINE_STATE_REINCARNATED ((quarantine_t *)(uintptr_t)1) -#define QUARANTINE_STATE_PURGATORY ((quarantine_t *)(uintptr_t)2) -#define QUARANTINE_STATE_MAX QUARANTINE_STATE_PURGATORY - -/******************************************************************************/ -/* Function prototypes for non-inline static functions. */ - -static quarantine_t *quarantine_grow(tsd_t *tsd, quarantine_t *quarantine); -static void quarantine_drain_one(tsd_t *tsd, quarantine_t *quarantine); -static void quarantine_drain(tsd_t *tsd, quarantine_t *quarantine, - size_t upper_bound); - -/******************************************************************************/ - -static quarantine_t * -quarantine_init(tsd_t *tsd, size_t lg_maxobjs) -{ - quarantine_t *quarantine; - - assert(tsd_nominal(tsd)); - - quarantine = (quarantine_t *)iallocztm(tsd, offsetof(quarantine_t, objs) - + ((ZU(1) << lg_maxobjs) * sizeof(quarantine_obj_t)), false, - tcache_get(tsd, true), true, NULL); - if (quarantine == NULL) - return (NULL); - quarantine->curbytes = 0; - quarantine->curobjs = 0; - quarantine->first = 0; - quarantine->lg_maxobjs = lg_maxobjs; - - return (quarantine); -} - -void -quarantine_alloc_hook_work(tsd_t *tsd) -{ - quarantine_t *quarantine; - - if (!tsd_nominal(tsd)) - return; - - quarantine = quarantine_init(tsd, LG_MAXOBJS_INIT); - /* - * Check again whether quarantine has been initialized, because - * quarantine_init() may have triggered recursive initialization. - */ - if (tsd_quarantine_get(tsd) == NULL) - tsd_quarantine_set(tsd, quarantine); - else - idalloctm(tsd, quarantine, tcache_get(tsd, false), true); -} - -static quarantine_t * -quarantine_grow(tsd_t *tsd, quarantine_t *quarantine) -{ - quarantine_t *ret; - - ret = quarantine_init(tsd, quarantine->lg_maxobjs + 1); - if (ret == NULL) { - quarantine_drain_one(tsd, quarantine); - return (quarantine); - } - - ret->curbytes = quarantine->curbytes; - ret->curobjs = quarantine->curobjs; - if (quarantine->first + quarantine->curobjs <= (ZU(1) << - quarantine->lg_maxobjs)) { - /* objs ring buffer data are contiguous. */ - memcpy(ret->objs, &quarantine->objs[quarantine->first], - quarantine->curobjs * sizeof(quarantine_obj_t)); - } else { - /* objs ring buffer data wrap around. */ - size_t ncopy_a = (ZU(1) << quarantine->lg_maxobjs) - - quarantine->first; - size_t ncopy_b = quarantine->curobjs - ncopy_a; - - memcpy(ret->objs, &quarantine->objs[quarantine->first], ncopy_a - * sizeof(quarantine_obj_t)); - memcpy(&ret->objs[ncopy_a], quarantine->objs, ncopy_b * - sizeof(quarantine_obj_t)); - } - idalloctm(tsd, quarantine, tcache_get(tsd, false), true); - - tsd_quarantine_set(tsd, ret); - return (ret); -} - -static void -quarantine_drain_one(tsd_t *tsd, quarantine_t *quarantine) -{ - quarantine_obj_t *obj = &quarantine->objs[quarantine->first]; - assert(obj->usize == isalloc(obj->ptr, config_prof)); - idalloctm(tsd, obj->ptr, NULL, false); - quarantine->curbytes -= obj->usize; - quarantine->curobjs--; - quarantine->first = (quarantine->first + 1) & ((ZU(1) << - quarantine->lg_maxobjs) - 1); -} - -static void -quarantine_drain(tsd_t *tsd, quarantine_t *quarantine, size_t upper_bound) -{ - - while (quarantine->curbytes > upper_bound && quarantine->curobjs > 0) - quarantine_drain_one(tsd, quarantine); -} - -void -quarantine(tsd_t *tsd, void *ptr) -{ - quarantine_t *quarantine; - size_t usize = isalloc(ptr, config_prof); - - cassert(config_fill); - assert(opt_quarantine); - - if ((quarantine = tsd_quarantine_get(tsd)) == NULL) { - idalloctm(tsd, ptr, NULL, false); - return; - } - /* - * Drain one or more objects if the quarantine size limit would be - * exceeded by appending ptr. - */ - if (quarantine->curbytes + usize > opt_quarantine) { - size_t upper_bound = (opt_quarantine >= usize) ? opt_quarantine - - usize : 0; - quarantine_drain(tsd, quarantine, upper_bound); - } - /* Grow the quarantine ring buffer if it's full. */ - if (quarantine->curobjs == (ZU(1) << quarantine->lg_maxobjs)) - quarantine = quarantine_grow(tsd, quarantine); - /* quarantine_grow() must free a slot if it fails to grow. */ - assert(quarantine->curobjs < (ZU(1) << quarantine->lg_maxobjs)); - /* Append ptr if its size doesn't exceed the quarantine size. */ - if (quarantine->curbytes + usize <= opt_quarantine) { - size_t offset = (quarantine->first + quarantine->curobjs) & - ((ZU(1) << quarantine->lg_maxobjs) - 1); - quarantine_obj_t *obj = &quarantine->objs[offset]; - obj->ptr = ptr; - obj->usize = usize; - quarantine->curbytes += usize; - quarantine->curobjs++; - if (config_fill && unlikely(opt_junk_free)) { - /* - * Only do redzone validation if Valgrind isn't in - * operation. - */ - if ((!config_valgrind || likely(!in_valgrind)) - && usize <= SMALL_MAXCLASS) - arena_quarantine_junk_small(ptr, usize); - else - memset(ptr, 0x5a, usize); - } - } else { - assert(quarantine->curbytes == 0); - idalloctm(tsd, ptr, NULL, false); - } -} - -void -quarantine_cleanup(tsd_t *tsd) -{ - quarantine_t *quarantine; - - if (!config_fill) - return; - - quarantine = tsd_quarantine_get(tsd); - if (quarantine != NULL) { - quarantine_drain(tsd, quarantine, 0); - idalloctm(tsd, quarantine, tcache_get(tsd, false), true); - tsd_quarantine_set(tsd, NULL); - } -} diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/util.c b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/util.c deleted file mode 100644 index 4cb0d6c..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/util.c +++ /dev/null @@ -1,650 +0,0 @@ -#define assert(e) do { \ - if (config_debug && !(e)) { \ - malloc_write(": Failed assertion\n"); \ - abort(); \ - } \ -} while (0) - -#define not_reached() do { \ - if (config_debug) { \ - malloc_write(": Unreachable code reached\n"); \ - abort(); \ - } \ -} while (0) - -#define not_implemented() do { \ - if (config_debug) { \ - malloc_write(": Not implemented\n"); \ - abort(); \ - } \ -} while (0) - -#define JEMALLOC_UTIL_C_ -#include "jemalloc/internal/jemalloc_internal.h" - -/******************************************************************************/ -/* Function prototypes for non-inline static functions. */ - -static void wrtmessage(void *cbopaque, const char *s); -#define U2S_BUFSIZE ((1U << (LG_SIZEOF_INTMAX_T + 3)) + 1) -static char *u2s(uintmax_t x, unsigned base, bool uppercase, char *s, - size_t *slen_p); -#define D2S_BUFSIZE (1 + U2S_BUFSIZE) -static char *d2s(intmax_t x, char sign, char *s, size_t *slen_p); -#define O2S_BUFSIZE (1 + U2S_BUFSIZE) -static char *o2s(uintmax_t x, bool alt_form, char *s, size_t *slen_p); -#define X2S_BUFSIZE (2 + U2S_BUFSIZE) -static char *x2s(uintmax_t x, bool alt_form, bool uppercase, char *s, - size_t *slen_p); - -/******************************************************************************/ - -/* malloc_message() setup. */ -static void -wrtmessage(void *cbopaque, const char *s) -{ - -#ifdef SYS_write - /* - * Use syscall(2) rather than write(2) when possible in order to avoid - * the possibility of memory allocation within libc. This is necessary - * on FreeBSD; most operating systems do not have this problem though. - */ - UNUSED int result = syscall(SYS_write, STDERR_FILENO, s, strlen(s)); -#else - UNUSED int result = write(STDERR_FILENO, s, strlen(s)); -#endif -} - -JEMALLOC_EXPORT void (*je_malloc_message)(void *, const char *s); - -/* - * Wrapper around malloc_message() that avoids the need for - * je_malloc_message(...) throughout the code. - */ -void -malloc_write(const char *s) -{ - - if (je_malloc_message != NULL) - je_malloc_message(NULL, s); - else - wrtmessage(NULL, s); -} - -/* - * glibc provides a non-standard strerror_r() when _GNU_SOURCE is defined, so - * provide a wrapper. - */ -int -buferror(int err, char *buf, size_t buflen) -{ - -#ifdef _WIN32 - FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, 0, - (LPSTR)buf, buflen, NULL); - return (0); -#elif defined(__GLIBC__) && defined(_GNU_SOURCE) - char *b = strerror_r(err, buf, buflen); - if (b != buf) { - strncpy(buf, b, buflen); - buf[buflen-1] = '\0'; - } - return (0); -#else - return (strerror_r(err, buf, buflen)); -#endif -} - -uintmax_t -malloc_strtoumax(const char *restrict nptr, char **restrict endptr, int base) -{ - uintmax_t ret, digit; - unsigned b; - bool neg; - const char *p, *ns; - - p = nptr; - if (base < 0 || base == 1 || base > 36) { - ns = p; - set_errno(EINVAL); - ret = UINTMAX_MAX; - goto label_return; - } - b = base; - - /* Swallow leading whitespace and get sign, if any. */ - neg = false; - while (true) { - switch (*p) { - case '\t': case '\n': case '\v': case '\f': case '\r': case ' ': - p++; - break; - case '-': - neg = true; - /* Fall through. */ - case '+': - p++; - /* Fall through. */ - default: - goto label_prefix; - } - } - - /* Get prefix, if any. */ - label_prefix: - /* - * Note where the first non-whitespace/sign character is so that it is - * possible to tell whether any digits are consumed (e.g., " 0" vs. - * " -x"). - */ - ns = p; - if (*p == '0') { - switch (p[1]) { - case '0': case '1': case '2': case '3': case '4': case '5': - case '6': case '7': - if (b == 0) - b = 8; - if (b == 8) - p++; - break; - case 'X': case 'x': - switch (p[2]) { - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - case 'A': case 'B': case 'C': case 'D': case 'E': - case 'F': - case 'a': case 'b': case 'c': case 'd': case 'e': - case 'f': - if (b == 0) - b = 16; - if (b == 16) - p += 2; - break; - default: - break; - } - break; - default: - p++; - ret = 0; - goto label_return; - } - } - if (b == 0) - b = 10; - - /* Convert. */ - ret = 0; - while ((*p >= '0' && *p <= '9' && (digit = *p - '0') < b) - || (*p >= 'A' && *p <= 'Z' && (digit = 10 + *p - 'A') < b) - || (*p >= 'a' && *p <= 'z' && (digit = 10 + *p - 'a') < b)) { - uintmax_t pret = ret; - ret *= b; - ret += digit; - if (ret < pret) { - /* Overflow. */ - set_errno(ERANGE); - ret = UINTMAX_MAX; - goto label_return; - } - p++; - } - if (neg) - ret = -ret; - - if (p == ns) { - /* No conversion performed. */ - set_errno(EINVAL); - ret = UINTMAX_MAX; - goto label_return; - } - -label_return: - if (endptr != NULL) { - if (p == ns) { - /* No characters were converted. */ - *endptr = (char *)nptr; - } else - *endptr = (char *)p; - } - return (ret); -} - -static char * -u2s(uintmax_t x, unsigned base, bool uppercase, char *s, size_t *slen_p) -{ - unsigned i; - - i = U2S_BUFSIZE - 1; - s[i] = '\0'; - switch (base) { - case 10: - do { - i--; - s[i] = "0123456789"[x % (uint64_t)10]; - x /= (uint64_t)10; - } while (x > 0); - break; - case 16: { - const char *digits = (uppercase) - ? "0123456789ABCDEF" - : "0123456789abcdef"; - - do { - i--; - s[i] = digits[x & 0xf]; - x >>= 4; - } while (x > 0); - break; - } default: { - const char *digits = (uppercase) - ? "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" - : "0123456789abcdefghijklmnopqrstuvwxyz"; - - assert(base >= 2 && base <= 36); - do { - i--; - s[i] = digits[x % (uint64_t)base]; - x /= (uint64_t)base; - } while (x > 0); - }} - - *slen_p = U2S_BUFSIZE - 1 - i; - return (&s[i]); -} - -static char * -d2s(intmax_t x, char sign, char *s, size_t *slen_p) -{ - bool neg; - - if ((neg = (x < 0))) - x = -x; - s = u2s(x, 10, false, s, slen_p); - if (neg) - sign = '-'; - switch (sign) { - case '-': - if (!neg) - break; - /* Fall through. */ - case ' ': - case '+': - s--; - (*slen_p)++; - *s = sign; - break; - default: not_reached(); - } - return (s); -} - -static char * -o2s(uintmax_t x, bool alt_form, char *s, size_t *slen_p) -{ - - s = u2s(x, 8, false, s, slen_p); - if (alt_form && *s != '0') { - s--; - (*slen_p)++; - *s = '0'; - } - return (s); -} - -static char * -x2s(uintmax_t x, bool alt_form, bool uppercase, char *s, size_t *slen_p) -{ - - s = u2s(x, 16, uppercase, s, slen_p); - if (alt_form) { - s -= 2; - (*slen_p) += 2; - memcpy(s, uppercase ? "0X" : "0x", 2); - } - return (s); -} - -int -malloc_vsnprintf(char *str, size_t size, const char *format, va_list ap) -{ - int ret; - size_t i; - const char *f; - -#define APPEND_C(c) do { \ - if (i < size) \ - str[i] = (c); \ - i++; \ -} while (0) -#define APPEND_S(s, slen) do { \ - if (i < size) { \ - size_t cpylen = (slen <= size - i) ? slen : size - i; \ - memcpy(&str[i], s, cpylen); \ - } \ - i += slen; \ -} while (0) -#define APPEND_PADDED_S(s, slen, width, left_justify) do { \ - /* Left padding. */ \ - size_t pad_len = (width == -1) ? 0 : ((slen < (size_t)width) ? \ - (size_t)width - slen : 0); \ - if (!left_justify && pad_len != 0) { \ - size_t j; \ - for (j = 0; j < pad_len; j++) \ - APPEND_C(' '); \ - } \ - /* Value. */ \ - APPEND_S(s, slen); \ - /* Right padding. */ \ - if (left_justify && pad_len != 0) { \ - size_t j; \ - for (j = 0; j < pad_len; j++) \ - APPEND_C(' '); \ - } \ -} while (0) -#define GET_ARG_NUMERIC(val, len) do { \ - switch (len) { \ - case '?': \ - val = va_arg(ap, int); \ - break; \ - case '?' | 0x80: \ - val = va_arg(ap, unsigned int); \ - break; \ - case 'l': \ - val = va_arg(ap, long); \ - break; \ - case 'l' | 0x80: \ - val = va_arg(ap, unsigned long); \ - break; \ - case 'q': \ - val = va_arg(ap, long long); \ - break; \ - case 'q' | 0x80: \ - val = va_arg(ap, unsigned long long); \ - break; \ - case 'j': \ - val = va_arg(ap, intmax_t); \ - break; \ - case 'j' | 0x80: \ - val = va_arg(ap, uintmax_t); \ - break; \ - case 't': \ - val = va_arg(ap, ptrdiff_t); \ - break; \ - case 'z': \ - val = va_arg(ap, ssize_t); \ - break; \ - case 'z' | 0x80: \ - val = va_arg(ap, size_t); \ - break; \ - case 'p': /* Synthetic; used for %p. */ \ - val = va_arg(ap, uintptr_t); \ - break; \ - default: \ - not_reached(); \ - val = 0; \ - } \ -} while (0) - - i = 0; - f = format; - while (true) { - switch (*f) { - case '\0': goto label_out; - case '%': { - bool alt_form = false; - bool left_justify = false; - bool plus_space = false; - bool plus_plus = false; - int prec = -1; - int width = -1; - unsigned char len = '?'; - - f++; - /* Flags. */ - while (true) { - switch (*f) { - case '#': - assert(!alt_form); - alt_form = true; - break; - case '-': - assert(!left_justify); - left_justify = true; - break; - case ' ': - assert(!plus_space); - plus_space = true; - break; - case '+': - assert(!plus_plus); - plus_plus = true; - break; - default: goto label_width; - } - f++; - } - /* Width. */ - label_width: - switch (*f) { - case '*': - width = va_arg(ap, int); - f++; - if (width < 0) { - left_justify = true; - width = -width; - } - break; - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': { - uintmax_t uwidth; - set_errno(0); - uwidth = malloc_strtoumax(f, (char **)&f, 10); - assert(uwidth != UINTMAX_MAX || get_errno() != - ERANGE); - width = (int)uwidth; - break; - } default: - break; - } - /* Width/precision separator. */ - if (*f == '.') - f++; - else - goto label_length; - /* Precision. */ - switch (*f) { - case '*': - prec = va_arg(ap, int); - f++; - break; - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': { - uintmax_t uprec; - set_errno(0); - uprec = malloc_strtoumax(f, (char **)&f, 10); - assert(uprec != UINTMAX_MAX || get_errno() != - ERANGE); - prec = (int)uprec; - break; - } - default: break; - } - /* Length. */ - label_length: - switch (*f) { - case 'l': - f++; - if (*f == 'l') { - len = 'q'; - f++; - } else - len = 'l'; - break; - case 'q': case 'j': case 't': case 'z': - len = *f; - f++; - break; - default: break; - } - /* Conversion specifier. */ - switch (*f) { - char *s; - size_t slen; - case '%': - /* %% */ - APPEND_C(*f); - f++; - break; - case 'd': case 'i': { - intmax_t val JEMALLOC_CC_SILENCE_INIT(0); - char buf[D2S_BUFSIZE]; - - GET_ARG_NUMERIC(val, len); - s = d2s(val, (plus_plus ? '+' : (plus_space ? - ' ' : '-')), buf, &slen); - APPEND_PADDED_S(s, slen, width, left_justify); - f++; - break; - } case 'o': { - uintmax_t val JEMALLOC_CC_SILENCE_INIT(0); - char buf[O2S_BUFSIZE]; - - GET_ARG_NUMERIC(val, len | 0x80); - s = o2s(val, alt_form, buf, &slen); - APPEND_PADDED_S(s, slen, width, left_justify); - f++; - break; - } case 'u': { - uintmax_t val JEMALLOC_CC_SILENCE_INIT(0); - char buf[U2S_BUFSIZE]; - - GET_ARG_NUMERIC(val, len | 0x80); - s = u2s(val, 10, false, buf, &slen); - APPEND_PADDED_S(s, slen, width, left_justify); - f++; - break; - } case 'x': case 'X': { - uintmax_t val JEMALLOC_CC_SILENCE_INIT(0); - char buf[X2S_BUFSIZE]; - - GET_ARG_NUMERIC(val, len | 0x80); - s = x2s(val, alt_form, *f == 'X', buf, &slen); - APPEND_PADDED_S(s, slen, width, left_justify); - f++; - break; - } case 'c': { - unsigned char val; - char buf[2]; - - assert(len == '?' || len == 'l'); - assert_not_implemented(len != 'l'); - val = va_arg(ap, int); - buf[0] = val; - buf[1] = '\0'; - APPEND_PADDED_S(buf, 1, width, left_justify); - f++; - break; - } case 's': - assert(len == '?' || len == 'l'); - assert_not_implemented(len != 'l'); - s = va_arg(ap, char *); - slen = (prec < 0) ? strlen(s) : (size_t)prec; - APPEND_PADDED_S(s, slen, width, left_justify); - f++; - break; - case 'p': { - uintmax_t val; - char buf[X2S_BUFSIZE]; - - GET_ARG_NUMERIC(val, 'p'); - s = x2s(val, true, false, buf, &slen); - APPEND_PADDED_S(s, slen, width, left_justify); - f++; - break; - } default: not_reached(); - } - break; - } default: { - APPEND_C(*f); - f++; - break; - }} - } - label_out: - if (i < size) - str[i] = '\0'; - else - str[size - 1] = '\0'; - ret = i; - -#undef APPEND_C -#undef APPEND_S -#undef APPEND_PADDED_S -#undef GET_ARG_NUMERIC - return (ret); -} - -JEMALLOC_FORMAT_PRINTF(3, 4) -int -malloc_snprintf(char *str, size_t size, const char *format, ...) -{ - int ret; - va_list ap; - - va_start(ap, format); - ret = malloc_vsnprintf(str, size, format, ap); - va_end(ap); - - return (ret); -} - -void -malloc_vcprintf(void (*write_cb)(void *, const char *), void *cbopaque, - const char *format, va_list ap) -{ - char buf[MALLOC_PRINTF_BUFSIZE]; - - if (write_cb == NULL) { - /* - * The caller did not provide an alternate write_cb callback - * function, so use the default one. malloc_write() is an - * inline function, so use malloc_message() directly here. - */ - write_cb = (je_malloc_message != NULL) ? je_malloc_message : - wrtmessage; - cbopaque = NULL; - } - - malloc_vsnprintf(buf, sizeof(buf), format, ap); - write_cb(cbopaque, buf); -} - -/* - * Print to a callback function in such a way as to (hopefully) avoid memory - * allocation. - */ -JEMALLOC_FORMAT_PRINTF(3, 4) -void -malloc_cprintf(void (*write_cb)(void *, const char *), void *cbopaque, - const char *format, ...) -{ - va_list ap; - - va_start(ap, format); - malloc_vcprintf(write_cb, cbopaque, format, ap); - va_end(ap); -} - -/* Print to stderr in such a way as to avoid memory allocation. */ -JEMALLOC_FORMAT_PRINTF(1, 2) -void -malloc_printf(const char *format, ...) -{ - va_list ap; - - va_start(ap, format); - malloc_vcprintf(NULL, NULL, format, ap); - va_end(ap); -} diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/valgrind.c b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/valgrind.c deleted file mode 100644 index 8e7ef3a..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/valgrind.c +++ /dev/null @@ -1,34 +0,0 @@ -#include "jemalloc/internal/jemalloc_internal.h" -#ifndef JEMALLOC_VALGRIND -# error "This source file is for Valgrind integration." -#endif - -#include - -void -valgrind_make_mem_noaccess(void *ptr, size_t usize) -{ - - VALGRIND_MAKE_MEM_NOACCESS(ptr, usize); -} - -void -valgrind_make_mem_undefined(void *ptr, size_t usize) -{ - - VALGRIND_MAKE_MEM_UNDEFINED(ptr, usize); -} - -void -valgrind_make_mem_defined(void *ptr, size_t usize) -{ - - VALGRIND_MAKE_MEM_DEFINED(ptr, usize); -} - -void -valgrind_freelike_block(void *ptr, size_t usize) -{ - - VALGRIND_FREELIKE_BLOCK(ptr, usize); -} diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/chunk.c b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/chunk.c deleted file mode 100644 index af1c9a5..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/chunk.c +++ /dev/null @@ -1,276 +0,0 @@ -#include "test/jemalloc_test.h" - -#ifdef JEMALLOC_FILL -const char *malloc_conf = "junk:false"; -#endif - -static chunk_hooks_t orig_hooks; -static chunk_hooks_t old_hooks; - -static bool do_dalloc = true; -static bool do_decommit; - -static bool did_alloc; -static bool did_dalloc; -static bool did_commit; -static bool did_decommit; -static bool did_purge; -static bool did_split; -static bool did_merge; - -#if 0 -# define TRACE_HOOK(fmt, ...) malloc_printf(fmt, __VA_ARGS__) -#else -# define TRACE_HOOK(fmt, ...) -#endif - -void * -chunk_alloc(void *new_addr, size_t size, size_t alignment, bool *zero, - bool *commit, unsigned arena_ind) -{ - - TRACE_HOOK("%s(new_addr=%p, size=%zu, alignment=%zu, *zero=%s, " - "*commit=%s, arena_ind=%u)\n", __func__, new_addr, size, alignment, - *zero ? "true" : "false", *commit ? "true" : "false", arena_ind); - did_alloc = true; - return (old_hooks.alloc(new_addr, size, alignment, zero, commit, - arena_ind)); -} - -bool -chunk_dalloc(void *chunk, size_t size, bool committed, unsigned arena_ind) -{ - - TRACE_HOOK("%s(chunk=%p, size=%zu, committed=%s, arena_ind=%u)\n", - __func__, chunk, size, committed ? "true" : "false", arena_ind); - did_dalloc = true; - if (!do_dalloc) - return (true); - return (old_hooks.dalloc(chunk, size, committed, arena_ind)); -} - -bool -chunk_commit(void *chunk, size_t size, size_t offset, size_t length, - unsigned arena_ind) -{ - bool err; - - TRACE_HOOK("%s(chunk=%p, size=%zu, offset=%zu, length=%zu, " - "arena_ind=%u)\n", __func__, chunk, size, offset, length, - arena_ind); - err = old_hooks.commit(chunk, size, offset, length, arena_ind); - did_commit = !err; - return (err); -} - -bool -chunk_decommit(void *chunk, size_t size, size_t offset, size_t length, - unsigned arena_ind) -{ - bool err; - - TRACE_HOOK("%s(chunk=%p, size=%zu, offset=%zu, length=%zu, " - "arena_ind=%u)\n", __func__, chunk, size, offset, length, - arena_ind); - if (!do_decommit) - return (true); - err = old_hooks.decommit(chunk, size, offset, length, arena_ind); - did_decommit = !err; - return (err); -} - -bool -chunk_purge(void *chunk, size_t size, size_t offset, size_t length, - unsigned arena_ind) -{ - - TRACE_HOOK("%s(chunk=%p, size=%zu, offset=%zu, length=%zu " - "arena_ind=%u)\n", __func__, chunk, size, offset, length, - arena_ind); - did_purge = true; - return (old_hooks.purge(chunk, size, offset, length, arena_ind)); -} - -bool -chunk_split(void *chunk, size_t size, size_t size_a, size_t size_b, - bool committed, unsigned arena_ind) -{ - - TRACE_HOOK("%s(chunk=%p, size=%zu, size_a=%zu, size_b=%zu, " - "committed=%s, arena_ind=%u)\n", __func__, chunk, size, size_a, - size_b, committed ? "true" : "false", arena_ind); - did_split = true; - return (old_hooks.split(chunk, size, size_a, size_b, committed, - arena_ind)); -} - -bool -chunk_merge(void *chunk_a, size_t size_a, void *chunk_b, size_t size_b, - bool committed, unsigned arena_ind) -{ - - TRACE_HOOK("%s(chunk_a=%p, size_a=%zu, chunk_b=%p size_b=%zu, " - "committed=%s, arena_ind=%u)\n", __func__, chunk_a, size_a, chunk_b, - size_b, committed ? "true" : "false", arena_ind); - did_merge = true; - return (old_hooks.merge(chunk_a, size_a, chunk_b, size_b, - committed, arena_ind)); -} - -TEST_BEGIN(test_chunk) -{ - void *p; - size_t old_size, new_size, large0, large1, huge0, huge1, huge2, sz; - chunk_hooks_t new_hooks = { - chunk_alloc, - chunk_dalloc, - chunk_commit, - chunk_decommit, - chunk_purge, - chunk_split, - chunk_merge - }; - bool xallocx_success_a, xallocx_success_b, xallocx_success_c; - - /* Install custom chunk hooks. */ - old_size = sizeof(chunk_hooks_t); - new_size = sizeof(chunk_hooks_t); - assert_d_eq(mallctl("arena.0.chunk_hooks", &old_hooks, &old_size, - &new_hooks, new_size), 0, "Unexpected chunk_hooks error"); - orig_hooks = old_hooks; - assert_ptr_ne(old_hooks.alloc, chunk_alloc, "Unexpected alloc error"); - assert_ptr_ne(old_hooks.dalloc, chunk_dalloc, - "Unexpected dalloc error"); - assert_ptr_ne(old_hooks.commit, chunk_commit, - "Unexpected commit error"); - assert_ptr_ne(old_hooks.decommit, chunk_decommit, - "Unexpected decommit error"); - assert_ptr_ne(old_hooks.purge, chunk_purge, "Unexpected purge error"); - assert_ptr_ne(old_hooks.split, chunk_split, "Unexpected split error"); - assert_ptr_ne(old_hooks.merge, chunk_merge, "Unexpected merge error"); - - /* Get large size classes. */ - sz = sizeof(size_t); - assert_d_eq(mallctl("arenas.lrun.0.size", &large0, &sz, NULL, 0), 0, - "Unexpected arenas.lrun.0.size failure"); - assert_d_eq(mallctl("arenas.lrun.1.size", &large1, &sz, NULL, 0), 0, - "Unexpected arenas.lrun.1.size failure"); - - /* Get huge size classes. */ - assert_d_eq(mallctl("arenas.hchunk.0.size", &huge0, &sz, NULL, 0), 0, - "Unexpected arenas.hchunk.0.size failure"); - assert_d_eq(mallctl("arenas.hchunk.1.size", &huge1, &sz, NULL, 0), 0, - "Unexpected arenas.hchunk.1.size failure"); - assert_d_eq(mallctl("arenas.hchunk.2.size", &huge2, &sz, NULL, 0), 0, - "Unexpected arenas.hchunk.2.size failure"); - - /* Test dalloc/decommit/purge cascade. */ - do_dalloc = false; - do_decommit = false; - p = mallocx(huge0 * 2, 0); - assert_ptr_not_null(p, "Unexpected mallocx() error"); - did_dalloc = false; - did_decommit = false; - did_purge = false; - did_split = false; - xallocx_success_a = (xallocx(p, huge0, 0, 0) == huge0); - assert_d_eq(mallctl("arena.0.purge", NULL, NULL, NULL, 0), 0, - "Unexpected arena.0.purge error"); - if (xallocx_success_a) { - assert_true(did_dalloc, "Expected dalloc"); - assert_false(did_decommit, "Unexpected decommit"); - assert_true(did_purge, "Expected purge"); - } - assert_true(did_split, "Expected split"); - dallocx(p, 0); - do_dalloc = true; - - /* Test decommit/commit and observe split/merge. */ - do_dalloc = false; - do_decommit = true; - p = mallocx(huge0 * 2, 0); - assert_ptr_not_null(p, "Unexpected mallocx() error"); - did_decommit = false; - did_commit = false; - did_split = false; - did_merge = false; - xallocx_success_b = (xallocx(p, huge0, 0, 0) == huge0); - assert_d_eq(mallctl("arena.0.purge", NULL, NULL, NULL, 0), 0, - "Unexpected arena.0.purge error"); - if (xallocx_success_b) - assert_true(did_split, "Expected split"); - xallocx_success_c = (xallocx(p, huge0 * 2, 0, 0) == huge0 * 2); - assert_b_eq(did_decommit, did_commit, "Expected decommit/commit match"); - if (xallocx_success_b && xallocx_success_c) - assert_true(did_merge, "Expected merge"); - dallocx(p, 0); - do_dalloc = true; - do_decommit = false; - - /* Test purge for partial-chunk huge allocations. */ - if (huge0 * 2 > huge2) { - /* - * There are at least four size classes per doubling, so a - * successful xallocx() from size=huge2 to size=huge1 is - * guaranteed to leave trailing purgeable memory. - */ - p = mallocx(huge2, 0); - assert_ptr_not_null(p, "Unexpected mallocx() error"); - did_purge = false; - assert_zu_eq(xallocx(p, huge1, 0, 0), huge1, - "Unexpected xallocx() failure"); - assert_true(did_purge, "Expected purge"); - dallocx(p, 0); - } - - /* Test decommit for large allocations. */ - do_decommit = true; - p = mallocx(large1, 0); - assert_ptr_not_null(p, "Unexpected mallocx() error"); - assert_d_eq(mallctl("arena.0.purge", NULL, NULL, NULL, 0), 0, - "Unexpected arena.0.purge error"); - did_decommit = false; - assert_zu_eq(xallocx(p, large0, 0, 0), large0, - "Unexpected xallocx() failure"); - assert_d_eq(mallctl("arena.0.purge", NULL, NULL, NULL, 0), 0, - "Unexpected arena.0.purge error"); - did_commit = false; - assert_zu_eq(xallocx(p, large1, 0, 0), large1, - "Unexpected xallocx() failure"); - assert_b_eq(did_decommit, did_commit, "Expected decommit/commit match"); - dallocx(p, 0); - do_decommit = false; - - /* Make sure non-huge allocation succeeds. */ - p = mallocx(42, 0); - assert_ptr_not_null(p, "Unexpected mallocx() error"); - dallocx(p, 0); - - /* Restore chunk hooks. */ - assert_d_eq(mallctl("arena.0.chunk_hooks", NULL, NULL, &old_hooks, - new_size), 0, "Unexpected chunk_hooks error"); - assert_d_eq(mallctl("arena.0.chunk_hooks", &old_hooks, &old_size, - NULL, 0), 0, "Unexpected chunk_hooks error"); - assert_ptr_eq(old_hooks.alloc, orig_hooks.alloc, - "Unexpected alloc error"); - assert_ptr_eq(old_hooks.dalloc, orig_hooks.dalloc, - "Unexpected dalloc error"); - assert_ptr_eq(old_hooks.commit, orig_hooks.commit, - "Unexpected commit error"); - assert_ptr_eq(old_hooks.decommit, orig_hooks.decommit, - "Unexpected decommit error"); - assert_ptr_eq(old_hooks.purge, orig_hooks.purge, - "Unexpected purge error"); - assert_ptr_eq(old_hooks.split, orig_hooks.split, - "Unexpected split error"); - assert_ptr_eq(old_hooks.merge, orig_hooks.merge, - "Unexpected merge error"); -} -TEST_END - -int -main(void) -{ - - return (test(test_chunk)); -} diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/lg_chunk.c b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/lg_chunk.c deleted file mode 100644 index 7e5df38..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/lg_chunk.c +++ /dev/null @@ -1,26 +0,0 @@ -#include "test/jemalloc_test.h" - -/* - * Make sure that opt.lg_chunk clamping is sufficient. In practice, this test - * program will fail a debug assertion during initialization and abort (rather - * than the test soft-failing) if clamping is insufficient. - */ -const char *malloc_conf = "lg_chunk:0"; - -TEST_BEGIN(test_lg_chunk_clamp) -{ - void *p; - - p = mallocx(1, 0); - assert_ptr_not_null(p, "Unexpected mallocx() failure"); - dallocx(p, 0); -} -TEST_END - -int -main(void) -{ - - return (test( - test_lg_chunk_clamp)); -} diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/quarantine.c b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/quarantine.c deleted file mode 100644 index bbd48a5..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/quarantine.c +++ /dev/null @@ -1,108 +0,0 @@ -#include "test/jemalloc_test.h" - -#define QUARANTINE_SIZE 8192 -#define STRINGIFY_HELPER(x) #x -#define STRINGIFY(x) STRINGIFY_HELPER(x) - -#ifdef JEMALLOC_FILL -const char *malloc_conf = "abort:false,junk:true,redzone:true,quarantine:" - STRINGIFY(QUARANTINE_SIZE); -#endif - -void -quarantine_clear(void) -{ - void *p; - - p = mallocx(QUARANTINE_SIZE*2, 0); - assert_ptr_not_null(p, "Unexpected mallocx() failure"); - dallocx(p, 0); -} - -TEST_BEGIN(test_quarantine) -{ -#define SZ ZU(256) -#define NQUARANTINED (QUARANTINE_SIZE/SZ) - void *quarantined[NQUARANTINED+1]; - size_t i, j; - - test_skip_if(!config_fill); - - assert_zu_eq(nallocx(SZ, 0), SZ, - "SZ=%zu does not precisely equal a size class", SZ); - - quarantine_clear(); - - /* - * Allocate enough regions to completely fill the quarantine, plus one - * more. The last iteration occurs with a completely full quarantine, - * but no regions should be drained from the quarantine until the last - * deallocation occurs. Therefore no region recycling should occur - * until after this loop completes. - */ - for (i = 0; i < NQUARANTINED+1; i++) { - void *p = mallocx(SZ, 0); - assert_ptr_not_null(p, "Unexpected mallocx() failure"); - quarantined[i] = p; - dallocx(p, 0); - for (j = 0; j < i; j++) { - assert_ptr_ne(p, quarantined[j], - "Quarantined region recycled too early; " - "i=%zu, j=%zu", i, j); - } - } -#undef NQUARANTINED -#undef SZ -} -TEST_END - -static bool detected_redzone_corruption; - -static void -arena_redzone_corruption_replacement(void *ptr, size_t usize, bool after, - size_t offset, uint8_t byte) -{ - - detected_redzone_corruption = true; -} - -TEST_BEGIN(test_quarantine_redzone) -{ - char *s; - arena_redzone_corruption_t *arena_redzone_corruption_orig; - - test_skip_if(!config_fill); - - arena_redzone_corruption_orig = arena_redzone_corruption; - arena_redzone_corruption = arena_redzone_corruption_replacement; - - /* Test underflow. */ - detected_redzone_corruption = false; - s = (char *)mallocx(1, 0); - assert_ptr_not_null((void *)s, "Unexpected mallocx() failure"); - s[-1] = 0xbb; - dallocx(s, 0); - assert_true(detected_redzone_corruption, - "Did not detect redzone corruption"); - - /* Test overflow. */ - detected_redzone_corruption = false; - s = (char *)mallocx(1, 0); - assert_ptr_not_null((void *)s, "Unexpected mallocx() failure"); - s[sallocx(s, 0)] = 0xbb; - dallocx(s, 0); - assert_true(detected_redzone_corruption, - "Did not detect redzone corruption"); - - arena_redzone_corruption = arena_redzone_corruption_orig; -} -TEST_END - -int -main(void) -{ - - return (test( - test_quarantine, - test_quarantine_redzone)); -} diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/util.c b/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/util.c deleted file mode 100644 index 8ab39a4..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/util.c +++ /dev/null @@ -1,294 +0,0 @@ -#include "test/jemalloc_test.h" - -TEST_BEGIN(test_pow2_ceil) -{ - unsigned i, pow2; - size_t x; - - assert_zu_eq(pow2_ceil(0), 0, "Unexpected result"); - - for (i = 0; i < sizeof(size_t) * 8; i++) { - assert_zu_eq(pow2_ceil(ZU(1) << i), ZU(1) << i, - "Unexpected result"); - } - - for (i = 2; i < sizeof(size_t) * 8; i++) { - assert_zu_eq(pow2_ceil((ZU(1) << i) - 1), ZU(1) << i, - "Unexpected result"); - } - - for (i = 0; i < sizeof(size_t) * 8 - 1; i++) { - assert_zu_eq(pow2_ceil((ZU(1) << i) + 1), ZU(1) << (i+1), - "Unexpected result"); - } - - for (pow2 = 1; pow2 < 25; pow2++) { - for (x = (ZU(1) << (pow2-1)) + 1; x <= ZU(1) << pow2; x++) { - assert_zu_eq(pow2_ceil(x), ZU(1) << pow2, - "Unexpected result, x=%zu", x); - } - } -} -TEST_END - -TEST_BEGIN(test_malloc_strtoumax_no_endptr) -{ - int err; - - set_errno(0); - assert_ju_eq(malloc_strtoumax("0", NULL, 0), 0, "Unexpected result"); - err = get_errno(); - assert_d_eq(err, 0, "Unexpected failure"); -} -TEST_END - -TEST_BEGIN(test_malloc_strtoumax) -{ - struct test_s { - const char *input; - const char *expected_remainder; - int base; - int expected_errno; - const char *expected_errno_name; - uintmax_t expected_x; - }; -#define ERR(e) e, #e -#define KUMAX(x) ((uintmax_t)x##ULL) - struct test_s tests[] = { - {"0", "0", -1, ERR(EINVAL), UINTMAX_MAX}, - {"0", "0", 1, ERR(EINVAL), UINTMAX_MAX}, - {"0", "0", 37, ERR(EINVAL), UINTMAX_MAX}, - - {"", "", 0, ERR(EINVAL), UINTMAX_MAX}, - {"+", "+", 0, ERR(EINVAL), UINTMAX_MAX}, - {"++3", "++3", 0, ERR(EINVAL), UINTMAX_MAX}, - {"-", "-", 0, ERR(EINVAL), UINTMAX_MAX}, - - {"42", "", 0, ERR(0), KUMAX(42)}, - {"+42", "", 0, ERR(0), KUMAX(42)}, - {"-42", "", 0, ERR(0), KUMAX(-42)}, - {"042", "", 0, ERR(0), KUMAX(042)}, - {"+042", "", 0, ERR(0), KUMAX(042)}, - {"-042", "", 0, ERR(0), KUMAX(-042)}, - {"0x42", "", 0, ERR(0), KUMAX(0x42)}, - {"+0x42", "", 0, ERR(0), KUMAX(0x42)}, - {"-0x42", "", 0, ERR(0), KUMAX(-0x42)}, - - {"0", "", 0, ERR(0), KUMAX(0)}, - {"1", "", 0, ERR(0), KUMAX(1)}, - - {"42", "", 0, ERR(0), KUMAX(42)}, - {" 42", "", 0, ERR(0), KUMAX(42)}, - {"42 ", " ", 0, ERR(0), KUMAX(42)}, - {"0x", "x", 0, ERR(0), KUMAX(0)}, - {"42x", "x", 0, ERR(0), KUMAX(42)}, - - {"07", "", 0, ERR(0), KUMAX(7)}, - {"010", "", 0, ERR(0), KUMAX(8)}, - {"08", "8", 0, ERR(0), KUMAX(0)}, - {"0_", "_", 0, ERR(0), KUMAX(0)}, - - {"0x", "x", 0, ERR(0), KUMAX(0)}, - {"0X", "X", 0, ERR(0), KUMAX(0)}, - {"0xg", "xg", 0, ERR(0), KUMAX(0)}, - {"0XA", "", 0, ERR(0), KUMAX(10)}, - - {"010", "", 10, ERR(0), KUMAX(10)}, - {"0x3", "x3", 10, ERR(0), KUMAX(0)}, - - {"12", "2", 2, ERR(0), KUMAX(1)}, - {"78", "8", 8, ERR(0), KUMAX(7)}, - {"9a", "a", 10, ERR(0), KUMAX(9)}, - {"9A", "A", 10, ERR(0), KUMAX(9)}, - {"fg", "g", 16, ERR(0), KUMAX(15)}, - {"FG", "G", 16, ERR(0), KUMAX(15)}, - {"0xfg", "g", 16, ERR(0), KUMAX(15)}, - {"0XFG", "G", 16, ERR(0), KUMAX(15)}, - {"z_", "_", 36, ERR(0), KUMAX(35)}, - {"Z_", "_", 36, ERR(0), KUMAX(35)} - }; -#undef ERR -#undef KUMAX - unsigned i; - - for (i = 0; i < sizeof(tests)/sizeof(struct test_s); i++) { - struct test_s *test = &tests[i]; - int err; - uintmax_t result; - char *remainder; - - set_errno(0); - result = malloc_strtoumax(test->input, &remainder, test->base); - err = get_errno(); - assert_d_eq(err, test->expected_errno, - "Expected errno %s for \"%s\", base %d", - test->expected_errno_name, test->input, test->base); - assert_str_eq(remainder, test->expected_remainder, - "Unexpected remainder for \"%s\", base %d", - test->input, test->base); - if (err == 0) { - assert_ju_eq(result, test->expected_x, - "Unexpected result for \"%s\", base %d", - test->input, test->base); - } - } -} -TEST_END - -TEST_BEGIN(test_malloc_snprintf_truncated) -{ -#define BUFLEN 15 - char buf[BUFLEN]; - int result; - size_t len; -#define TEST(expected_str_untruncated, ...) do { \ - result = malloc_snprintf(buf, len, __VA_ARGS__); \ - assert_d_eq(strncmp(buf, expected_str_untruncated, len-1), 0, \ - "Unexpected string inequality (\"%s\" vs \"%s\")", \ - buf, expected_str_untruncated); \ - assert_d_eq(result, strlen(expected_str_untruncated), \ - "Unexpected result"); \ -} while (0) - - for (len = 1; len < BUFLEN; len++) { - TEST("012346789", "012346789"); - TEST("a0123b", "a%sb", "0123"); - TEST("a01234567", "a%s%s", "0123", "4567"); - TEST("a0123 ", "a%-6s", "0123"); - TEST("a 0123", "a%6s", "0123"); - TEST("a 012", "a%6.3s", "0123"); - TEST("a 012", "a%*.*s", 6, 3, "0123"); - TEST("a 123b", "a% db", 123); - TEST("a123b", "a%-db", 123); - TEST("a-123b", "a%-db", -123); - TEST("a+123b", "a%+db", 123); - } -#undef BUFLEN -#undef TEST -} -TEST_END - -TEST_BEGIN(test_malloc_snprintf) -{ -#define BUFLEN 128 - char buf[BUFLEN]; - int result; -#define TEST(expected_str, ...) do { \ - result = malloc_snprintf(buf, sizeof(buf), __VA_ARGS__); \ - assert_str_eq(buf, expected_str, "Unexpected output"); \ - assert_d_eq(result, strlen(expected_str), "Unexpected result"); \ -} while (0) - - TEST("hello", "hello"); - - TEST("50%, 100%", "50%%, %d%%", 100); - - TEST("a0123b", "a%sb", "0123"); - - TEST("a 0123b", "a%5sb", "0123"); - TEST("a 0123b", "a%*sb", 5, "0123"); - - TEST("a0123 b", "a%-5sb", "0123"); - TEST("a0123b", "a%*sb", -1, "0123"); - TEST("a0123 b", "a%*sb", -5, "0123"); - TEST("a0123 b", "a%-*sb", -5, "0123"); - - TEST("a012b", "a%.3sb", "0123"); - TEST("a012b", "a%.*sb", 3, "0123"); - TEST("a0123b", "a%.*sb", -3, "0123"); - - TEST("a 012b", "a%5.3sb", "0123"); - TEST("a 012b", "a%5.*sb", 3, "0123"); - TEST("a 012b", "a%*.3sb", 5, "0123"); - TEST("a 012b", "a%*.*sb", 5, 3, "0123"); - TEST("a 0123b", "a%*.*sb", 5, -3, "0123"); - - TEST("_abcd_", "_%x_", 0xabcd); - TEST("_0xabcd_", "_%#x_", 0xabcd); - TEST("_1234_", "_%o_", 01234); - TEST("_01234_", "_%#o_", 01234); - TEST("_1234_", "_%u_", 1234); - - TEST("_1234_", "_%d_", 1234); - TEST("_ 1234_", "_% d_", 1234); - TEST("_+1234_", "_%+d_", 1234); - TEST("_-1234_", "_%d_", -1234); - TEST("_-1234_", "_% d_", -1234); - TEST("_-1234_", "_%+d_", -1234); - - TEST("_-1234_", "_%d_", -1234); - TEST("_1234_", "_%d_", 1234); - TEST("_-1234_", "_%i_", -1234); - TEST("_1234_", "_%i_", 1234); - TEST("_01234_", "_%#o_", 01234); - TEST("_1234_", "_%u_", 1234); - TEST("_0x1234abc_", "_%#x_", 0x1234abc); - TEST("_0X1234ABC_", "_%#X_", 0x1234abc); - TEST("_c_", "_%c_", 'c'); - TEST("_string_", "_%s_", "string"); - TEST("_0x42_", "_%p_", ((void *)0x42)); - - TEST("_-1234_", "_%ld_", ((long)-1234)); - TEST("_1234_", "_%ld_", ((long)1234)); - TEST("_-1234_", "_%li_", ((long)-1234)); - TEST("_1234_", "_%li_", ((long)1234)); - TEST("_01234_", "_%#lo_", ((long)01234)); - TEST("_1234_", "_%lu_", ((long)1234)); - TEST("_0x1234abc_", "_%#lx_", ((long)0x1234abc)); - TEST("_0X1234ABC_", "_%#lX_", ((long)0x1234ABC)); - - TEST("_-1234_", "_%lld_", ((long long)-1234)); - TEST("_1234_", "_%lld_", ((long long)1234)); - TEST("_-1234_", "_%lli_", ((long long)-1234)); - TEST("_1234_", "_%lli_", ((long long)1234)); - TEST("_01234_", "_%#llo_", ((long long)01234)); - TEST("_1234_", "_%llu_", ((long long)1234)); - TEST("_0x1234abc_", "_%#llx_", ((long long)0x1234abc)); - TEST("_0X1234ABC_", "_%#llX_", ((long long)0x1234ABC)); - - TEST("_-1234_", "_%qd_", ((long long)-1234)); - TEST("_1234_", "_%qd_", ((long long)1234)); - TEST("_-1234_", "_%qi_", ((long long)-1234)); - TEST("_1234_", "_%qi_", ((long long)1234)); - TEST("_01234_", "_%#qo_", ((long long)01234)); - TEST("_1234_", "_%qu_", ((long long)1234)); - TEST("_0x1234abc_", "_%#qx_", ((long long)0x1234abc)); - TEST("_0X1234ABC_", "_%#qX_", ((long long)0x1234ABC)); - - TEST("_-1234_", "_%jd_", ((intmax_t)-1234)); - TEST("_1234_", "_%jd_", ((intmax_t)1234)); - TEST("_-1234_", "_%ji_", ((intmax_t)-1234)); - TEST("_1234_", "_%ji_", ((intmax_t)1234)); - TEST("_01234_", "_%#jo_", ((intmax_t)01234)); - TEST("_1234_", "_%ju_", ((intmax_t)1234)); - TEST("_0x1234abc_", "_%#jx_", ((intmax_t)0x1234abc)); - TEST("_0X1234ABC_", "_%#jX_", ((intmax_t)0x1234ABC)); - - TEST("_1234_", "_%td_", ((ptrdiff_t)1234)); - TEST("_-1234_", "_%td_", ((ptrdiff_t)-1234)); - TEST("_1234_", "_%ti_", ((ptrdiff_t)1234)); - TEST("_-1234_", "_%ti_", ((ptrdiff_t)-1234)); - - TEST("_-1234_", "_%zd_", ((ssize_t)-1234)); - TEST("_1234_", "_%zd_", ((ssize_t)1234)); - TEST("_-1234_", "_%zi_", ((ssize_t)-1234)); - TEST("_1234_", "_%zi_", ((ssize_t)1234)); - TEST("_01234_", "_%#zo_", ((ssize_t)01234)); - TEST("_1234_", "_%zu_", ((ssize_t)1234)); - TEST("_0x1234abc_", "_%#zx_", ((ssize_t)0x1234abc)); - TEST("_0X1234ABC_", "_%#zX_", ((ssize_t)0x1234ABC)); -#undef BUFLEN -} -TEST_END - -int -main(void) -{ - - return (test( - test_pow2_ceil, - test_malloc_strtoumax_no_endptr, - test_malloc_strtoumax, - test_malloc_snprintf_truncated, - test_malloc_snprintf)); -} diff --git a/redis-android/src/main/jni/redis-5.0.2/src/version.h b/redis-android/src/main/jni/redis-5.0.2/src/version.h deleted file mode 100644 index c10f010..0000000 --- a/redis-android/src/main/jni/redis-5.0.2/src/version.h +++ /dev/null @@ -1 +0,0 @@ -#define REDIS_VERSION "5.0.2" diff --git a/redis-android/src/main/jni/redis-5.0.2/.gitignore b/redis-android/src/main/jni/redis-5.0.3/.gitignore similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/.gitignore rename to redis-android/src/main/jni/redis-5.0.3/.gitignore diff --git a/redis-android/src/main/jni/redis-5.0.2/00-RELEASENOTES b/redis-android/src/main/jni/redis-5.0.3/00-RELEASENOTES similarity index 92% rename from redis-android/src/main/jni/redis-5.0.2/00-RELEASENOTES rename to redis-android/src/main/jni/redis-5.0.3/00-RELEASENOTES index ef1aab2..da324a6 100644 --- a/redis-android/src/main/jni/redis-5.0.2/00-RELEASENOTES +++ b/redis-android/src/main/jni/redis-5.0.3/00-RELEASENOTES @@ -11,6 +11,214 @@ CRITICAL: There is a critical bug affecting MOST USERS. Upgrade ASAP. SECURITY: There are security fixes in the release. -------------------------------------------------------------------------------- +================================================================================ +Redis 5.0.3 Released Tue Dec 11 18:17:26 CET 2018 +================================================================================ + +Upgrade urgency HIGH: Redis 5 is consolidating, upgrading is a good idea. + However there is nothing very critical here, but certain + issues resolved could lead to very rare crashes. + +Welcome to Redis 5.0.3, several interesting bug fixes here: + +* Redis no longer panics when you send data to a replica-mode connection that + is in MONITOR or SYNC mode. + +* Fixes to certain sorted set edge cases. You are unlikely to ever notice those + issues, but now it is more correct. + +* Certain BSD variants now are better supported: build & register logging + on crash. + +* The networking core now recovers if an IPv6 address is listed in bind but + is actually not able to work because there is no such protocol in the + system. + +* redis-cli cluster mode improved in many ways. Especially the fix subcommand + work was enhanced to cover other edge cases that were still not covered + after the work done for Redis 5. + +* MEMORY USAGE is now more accurate. + +* DEBUG DIGEST-VALUE added in case you want to make sure a given set of keys + (and not the whole DB) are excatly the same between two instances. + +* Fix a potential crash in the networking code related to recent changes + to the way the reply is consumed. + +* Reject EXEC containing write commands against an instance that changed role + from master to replica during our transaction. + +* Fix a crash in KEYS and other commands using pattern matching, in an edge + case where the pattern contains a zero byte. + +* Fix eviction during AOF loading due to maxmemory triggered by commands + executed in loading state. + +The following is the list of commmits if you want to check credits or dig +further in the details. + +commit 2c6ee0f9b3d9ca48c6da8bd18796186784216bff +Author: antirez +Date: Wed Dec 12 11:37:15 2018 +0100 + + freeMemoryIfNeeded() small refactoring. + + Related to issue #5686 and PR #5689. + +commit 107e93e75acfd5def0252efb6870751940816395 +Author: zhaozhao.zz +Date: Wed Dec 12 00:25:24 2018 +0800 + + evict: don't care about mem if loading + + When loading data, we call processEventsWhileBlocked + to process events and execute commands. + But if we are loading AOF it's dangerous, because + processCommand would call freeMemoryIfNeeded to evict, + and that will break data consistency, see issue #5686. + +antirez in commit ee93dc0b: + Crashing is too much in addReplyErrorLength(). + 1 file changed, 6 deletions(-) + +hdmg in commit c55254a5: + fix comments fault discription + 1 file changed, 1 insertion(+), 1 deletion(-) + +lsytj0413 in commit dfd25013: + fix a typo: craeted -> created + 1 file changed, 1 insertion(+), 1 deletion(-) + +antirez in commit 392a2566: + stringmatchlen() fuzz test added. + 3 files changed, 22 insertions(+) + +antirez in commit 7602f695: + Fix stringmatchlen() read past buffer bug. + 1 file changed, 1 insertion(+), 1 deletion(-) + +zhaozhao.zz in commit c4f3585e: + multi: ignore multiState's cmd_flags when loading AOF + 1 file changed, 1 insertion(+), 1 deletion(-) + +antirez in commit d037e987: + Reject EXEC containing write commands against RO replica. + 2 files changed, 20 insertions(+) + +artix in commit e00ab324: + Cluster Manager: - Multiple owners checking in 'fix'/'check' commands is + now optional (using --cluster-search-multiple-owners). - Updated help. + 1 file changed, 14 insertions(+), 5 deletions(-) + +artix in commit 94f64de3: + Cluster Manager: FixOpenSlot now correctly updates in-memory cluster + configuration. Improved output messages. + 1 file changed, 17 insertions(+), 5 deletions(-) + +artix in commit 752d636f: + Cluster Manager: 'fix' command now handles open slots with migrating state + in one node and importing state in multiple nodes. + 1 file changed, 74 insertions(+), 6 deletions(-) + +artix in commit 552091f9: + Cluster Manager: setting new slot owner is now handled atomically in + 'fix' command. + 1 file changed, 72 insertions(+), 31 deletions(-) + +artix in commit 2280f4f7: + Cluster Manager: code cleanup. + 1 file changed, 41 insertions(+), 87 deletions(-) + +artix in commit e084b8cc: + Cluster Manager: check/fix commands now handle multiple owners even + if all slots are covered and not open. + 1 file changed, 129 insertions(+), 6 deletions(-) + +zhaozhao.zz in commit fa726e2a: + remove useless tryObjectEncoding in debug assert + 1 file changed, 1 deletion(-) + +Oran Agra in commit 40244b10: + fix #5580, display fragmentation and rss overhead bytes as signed + 2 files changed, 6 insertions(+), 6 deletions(-) + +zhaozhao.zz in commit beab3151: + networking: current_client should not be NULL when trim qb_pos + 1 file changed, 1 insertion(+), 1 deletion(-) + +antirez in commit 07ccb642: + Remove no longer relevant comment in processCommand(). + 1 file changed, 2 insertions(+), 6 deletions(-) + +antirez in commit 60fdaf07: + DEBUG DIGEST-VALUE implemented. + 1 file changed, 17 insertions(+), 3 deletions(-) + +antirez in commit 48b31b0d: + DEBUG DIGEST refactoring: extract function to digest a value. + 1 file changed, 142 insertions(+), 131 deletions(-) + +yura in commit ef3ff402: + redis-cli reshard/rebalance: ability to force replacement on existing keys + 1 file changed, 6 insertions(+), 5 deletions(-) + +Thomas Orozco in commit ee223fb8: + cli: pass auth through REDISCLI_AUTH + 1 file changed, 14 insertions(+) + +yongman in commit 41295e55: + Fix cluster call reply format readable + 1 file changed, 1 insertion(+), 1 deletion(-) + +Oran Agra in commit 0ed3970f: + fix small test suite race conditions + 3 files changed, 11 insertions(+) + +zhaozhao.zz in commit 605dddbb: + MEMORY command: make USAGE more accurate + 1 file changed, 7 insertions(+), 6 deletions(-) + +yongman in commit 1f43bf29: + Fix choose a random master node for slot assignment + 1 file changed, 29 insertions(+), 5 deletions(-) + +Weiliang Li in commit 69f0c678: + fix comment typo in util.c + 1 file changed, 1 insertion(+), 1 deletion(-) + +Chris Lamb in commit bc53a3ab: + Clarify the "Creating Server TCP listening socket" error. + 1 file changed, 1 insertion(+), 1 deletion(-) + +Chris Lamb in commit fefe5460: + Don't treat unsupported protocols as fatal errors + 1 file changed, 4 insertions(+) + +David Carlier in commit a8862972: + OpenBSD support. + 3 files changed, 74 insertions(+), 1 deletion(-) + +David Carlier in commit 5e86daf9: + Backtrace/register dump on BSD. + 3 files changed, 97 insertions(+), 3 deletions(-) + +Guy Benoish in commit 7c8cf5ac: + Don't call sdscmp() with shared.maxstring or shared.minstring + 2 files changed, 23 insertions(+), 9 deletions(-) + +Qu Chen in commit 39e9eda3: + Add unit test for stream XCLAIM command. + 1 file changed, 48 insertions(+) + +antirez in commit 62485232: + Abort instead of crashing when loading bad stream master key. + 1 file changed, 3 insertions(+) + +Madelyn Olson in commit a5487309: + Fixed a serverPanic when sending an invalid command to a monitor client + 1 file changed, 1 insertion(+), 1 deletion(-) + ================================================================================ Redis 5.0.2 Released Thu Nov 22 11:22:37 CET 2018 ================================================================================ diff --git a/redis-android/src/main/jni/redis-5.0.2/Android.mk b/redis-android/src/main/jni/redis-5.0.3/Android.mk similarity index 96% rename from redis-android/src/main/jni/redis-5.0.2/Android.mk rename to redis-android/src/main/jni/redis-5.0.3/Android.mk index 6db38a5..0100fe5 100644 --- a/redis-android/src/main/jni/redis-5.0.2/Android.mk +++ b/redis-android/src/main/jni/redis-5.0.3/Android.mk @@ -19,7 +19,7 @@ RELEASE_HDR := $(shell sh -c '$(SRC)/mkreleasehdr.sh') LOCAL_MODULE := redis REDIS_ANDROID := redis-android -REDIS_DIR := redis-5.0.2 +REDIS_DIR := redis-5.0.3 LOCAL_LDLIBS := -llog LOCAL_CFLAGS := -O3 -D__ANDROID__ -D__REDIS_ANDROID__ @@ -57,7 +57,7 @@ LOCAL_STATIC_LIBRARIES += linenoise # LOCAL_STATIC_LIBRARIES += jemalloc -ifeq ($(REDIS_DIR),redis-5.0.2) +ifeq ($(REDIS_DIR),redis-5.0.3) LOCAL_SRC_FILES += \ $(SRC)/adlist.c $(SRC)/ae.c \ @@ -100,8 +100,8 @@ HAVE_EVPORT := 0 HAVE_EPOLL := 0 HAVE_KQUEUE := 0 -REDIS_ANDROID_DIR := redis-5.0.2 -REDIS_DIR := redis-5.0.2 +REDIS_ANDROID_DIR := redis-5.0.3 +REDIS_DIR := redis-5.0.3 # Includes lua library LOCAL_STATIC_LIBRARIES += lua @@ -128,7 +128,7 @@ LOCAL_CFLAGS += -funwind-tables LOCAL_C_INCLUDES += $(LOCAL_PATH)/../ -ifeq ($(REDIS_DIR),redis-5.0.2) +ifeq ($(REDIS_DIR),redis-5.0.3) LOCAL_SRC_FILES += \ $(SRC)/adlist.c $(SRC)/ae.c \ @@ -164,8 +164,8 @@ include $(BUILD_EXECUTABLE) include $(CLEAR_VARS) LOCAL_MODULE := redis-check-aof -REDIS_ANDROID_DIR := redis-5.0.2 -REDIS_DIR := redis-5.0.2 +REDIS_ANDROID_DIR := redis-5.0.3 +REDIS_DIR := redis-5.0.3 # Includes lua library LOCAL_STATIC_LIBRARIES += lua @@ -192,7 +192,7 @@ LOCAL_CFLAGS += -funwind-tables LOCAL_C_INCLUDES += $(LOCAL_PATH)/../ -ifeq ($(REDIS_DIR),redis-5.0.2) +ifeq ($(REDIS_DIR),redis-5.0.3) LOCAL_SRC_FILES += \ @@ -231,8 +231,8 @@ include $(BUILD_EXECUTABLE) include $(CLEAR_VARS) LOCAL_MODULE := redis-cli -REDIS_ANDROID_DIR := redis-5.0.2 -REDIS_DIR := redis-5.0.2 +REDIS_ANDROID_DIR := redis-5.0.3 +REDIS_DIR := redis-5.0.3 # Includes linenoise library diff --git a/redis-android/src/main/jni/redis-5.0.2/BUGS b/redis-android/src/main/jni/redis-5.0.3/BUGS similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/BUGS rename to redis-android/src/main/jni/redis-5.0.3/BUGS diff --git a/redis-android/src/main/jni/redis-5.0.2/CONTRIBUTING b/redis-android/src/main/jni/redis-5.0.3/CONTRIBUTING similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/CONTRIBUTING rename to redis-android/src/main/jni/redis-5.0.3/CONTRIBUTING diff --git a/redis-android/src/main/jni/redis-5.0.2/COPYING b/redis-android/src/main/jni/redis-5.0.3/COPYING similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/COPYING rename to redis-android/src/main/jni/redis-5.0.3/COPYING diff --git a/redis-android/src/main/jni/redis-5.0.2/INSTALL b/redis-android/src/main/jni/redis-5.0.3/INSTALL similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/INSTALL rename to redis-android/src/main/jni/redis-5.0.3/INSTALL diff --git a/redis-android/src/main/jni/redis-5.0.2/MANIFESTO b/redis-android/src/main/jni/redis-5.0.3/MANIFESTO similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/MANIFESTO rename to redis-android/src/main/jni/redis-5.0.3/MANIFESTO diff --git a/redis-android/src/main/jni/redis-5.0.2/Makefile b/redis-android/src/main/jni/redis-5.0.3/Makefile similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/Makefile rename to redis-android/src/main/jni/redis-5.0.3/Makefile diff --git a/redis-android/src/main/jni/redis-5.0.2/README.md b/redis-android/src/main/jni/redis-5.0.3/README.md similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/README.md rename to redis-android/src/main/jni/redis-5.0.3/README.md diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/Android.mk b/redis-android/src/main/jni/redis-5.0.3/deps/Android.mk similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/Android.mk rename to redis-android/src/main/jni/redis-5.0.3/deps/Android.mk diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/Makefile b/redis-android/src/main/jni/redis-5.0.3/deps/Makefile similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/Makefile rename to redis-android/src/main/jni/redis-5.0.3/deps/Makefile diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/README.md b/redis-android/src/main/jni/redis-5.0.3/deps/README.md similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/README.md rename to redis-android/src/main/jni/redis-5.0.3/deps/README.md diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/.appveyor.yml b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/.appveyor.yml similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/.appveyor.yml rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/.appveyor.yml diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/.autom4te.cfg b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/.autom4te.cfg similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/.autom4te.cfg rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/.autom4te.cfg diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/.gitattributes b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/.gitattributes similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/.gitattributes rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/.gitattributes diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/.gitignore b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/.gitignore similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/.gitignore rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/.gitignore diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/.travis.yml b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/.travis.yml similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/.travis.yml rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/.travis.yml diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/Android.mk b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/Android.mk similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/Android.mk rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/Android.mk diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/COPYING b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/COPYING similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/COPYING rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/COPYING diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/ChangeLog b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/ChangeLog similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/ChangeLog rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/ChangeLog diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/INSTALL.md b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/INSTALL.md similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/INSTALL.md rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/INSTALL.md diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/Makefile.in b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/Makefile.in similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/Makefile.in rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/Makefile.in diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/README b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/README similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/README rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/README diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/TUNING.md b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/TUNING.md similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/TUNING.md rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/TUNING.md diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/autogen.sh b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/autogen.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/autogen.sh rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/autogen.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/bin/jemalloc-config.in b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/bin/jemalloc-config.in similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/bin/jemalloc-config.in rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/bin/jemalloc-config.in diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/bin/jemalloc.sh.in b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/bin/jemalloc.sh.in similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/bin/jemalloc.sh.in rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/bin/jemalloc.sh.in diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/bin/jeprof.in b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/bin/jeprof.in similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/bin/jeprof.in rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/bin/jeprof.in diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/build-aux/config.guess b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/build-aux/config.guess similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/build-aux/config.guess rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/build-aux/config.guess diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/build-aux/config.sub b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/build-aux/config.sub similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/build-aux/config.sub rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/build-aux/config.sub diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/build-aux/install-sh b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/build-aux/install-sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/build-aux/install-sh rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/build-aux/install-sh diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/config.stamp.in b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/config.stamp.in similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/config.stamp.in rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/config.stamp.in diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/configure.ac b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/configure.ac similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/configure.ac rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/configure.ac diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/doc/html.xsl.in b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/doc/html.xsl.in similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/doc/html.xsl.in rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/doc/html.xsl.in diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/doc/jemalloc.xml.in b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/doc/jemalloc.xml.in similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/doc/jemalloc.xml.in rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/doc/jemalloc.xml.in diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/doc/manpages.xsl.in b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/doc/manpages.xsl.in similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/doc/manpages.xsl.in rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/doc/manpages.xsl.in diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/doc/stylesheet.xsl b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/doc/stylesheet.xsl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/doc/stylesheet.xsl rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/doc/stylesheet.xsl diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/arena_externs.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/arena_externs.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/arena_externs.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/arena_externs.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/arena_inlines_a.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/arena_inlines_a.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/arena_inlines_a.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/arena_inlines_a.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/arena_inlines_b.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/arena_inlines_b.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/arena_inlines_b.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/arena_inlines_b.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/arena_stats.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/arena_stats.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/arena_stats.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/arena_stats.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/arena_structs_a.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/arena_structs_a.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/arena_structs_a.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/arena_structs_a.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/arena_structs_b.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/arena_structs_b.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/arena_structs_b.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/arena_structs_b.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/arena_types.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/arena_types.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/arena_types.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/arena_types.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/assert.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/assert.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/assert.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/assert.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/atomic.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/atomic.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/atomic.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/atomic.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/atomic_c11.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/atomic_c11.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/atomic_c11.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/atomic_c11.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/atomic_gcc_atomic.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/atomic_gcc_atomic.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/atomic_gcc_atomic.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/atomic_gcc_atomic.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/atomic_gcc_sync.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/atomic_gcc_sync.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/atomic_gcc_sync.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/atomic_gcc_sync.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/atomic_msvc.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/atomic_msvc.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/atomic_msvc.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/atomic_msvc.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/background_thread_externs.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/background_thread_externs.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/background_thread_externs.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/background_thread_externs.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/background_thread_inlines.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/background_thread_inlines.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/background_thread_inlines.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/background_thread_inlines.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/background_thread_structs.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/background_thread_structs.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/background_thread_structs.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/background_thread_structs.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/base_externs.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/base_externs.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/base_externs.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/base_externs.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/base_inlines.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/base_inlines.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/base_inlines.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/base_inlines.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/base_structs.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/base_structs.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/base_structs.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/base_structs.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/base_types.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/base_types.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/base_types.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/base_types.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/bin.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/bin.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/bin.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/bin.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/bin_stats.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/bin_stats.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/bin_stats.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/bin_stats.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/bit_util.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/bit_util.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/bit_util.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/bit_util.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/bitmap.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/bitmap.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/bitmap.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/bitmap.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/cache_bin.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/cache_bin.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/cache_bin.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/cache_bin.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/ckh.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/ckh.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/ckh.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/ckh.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/ctl.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/ctl.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/ctl.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/ctl.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/div.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/div.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/div.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/div.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/emitter.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/emitter.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/emitter.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/emitter.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/extent_dss.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/extent_dss.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/extent_dss.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/extent_dss.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/extent_externs.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/extent_externs.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/extent_externs.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/extent_externs.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/extent_inlines.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/extent_inlines.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/extent_inlines.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/extent_inlines.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/extent_mmap.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/extent_mmap.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/extent_mmap.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/extent_mmap.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/extent_structs.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/extent_structs.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/extent_structs.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/extent_structs.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/extent_types.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/extent_types.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/extent_types.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/extent_types.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/hash.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/hash.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/hash.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/hash.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/hooks.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/hooks.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/hooks.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/hooks.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_decls.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_decls.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_decls.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_decls.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h.in b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h.in similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h.in rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h.in diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_externs.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_externs.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_externs.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_externs.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_includes.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_includes.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_includes.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_includes.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_a.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_a.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_a.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_a.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_b.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_b.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_b.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_b.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_macros.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_macros.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_macros.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_macros.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/jemalloc_preamble.h.in b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/jemalloc_preamble.h.in similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/jemalloc_preamble.h.in rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/jemalloc_preamble.h.in diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/large_externs.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/large_externs.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/large_externs.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/large_externs.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/log.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/log.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/log.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/log.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/malloc_io.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/malloc_io.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/malloc_io.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/malloc_io.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/mutex.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/mutex.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/mutex.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/mutex.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/mutex_pool.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/mutex_pool.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/mutex_pool.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/mutex_pool.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/mutex_prof.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/mutex_prof.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/mutex_prof.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/mutex_prof.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/nstime.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/nstime.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/nstime.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/nstime.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/pages.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/pages.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/pages.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/pages.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/ph.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/ph.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/ph.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/ph.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/private_namespace.sh b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/private_namespace.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/private_namespace.sh rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/private_namespace.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/private_symbols.sh b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/private_symbols.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/private_symbols.sh rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/private_symbols.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/prng.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/prng.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/prng.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/prng.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/prof_externs.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/prof_externs.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/prof_externs.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/prof_externs.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/prof_inlines_a.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/prof_inlines_a.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/prof_inlines_a.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/prof_inlines_a.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/prof_inlines_b.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/prof_inlines_b.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/prof_inlines_b.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/prof_inlines_b.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/prof_structs.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/prof_structs.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/prof_structs.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/prof_structs.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/prof_types.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/prof_types.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/prof_types.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/prof_types.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/public_namespace.sh b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/public_namespace.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/public_namespace.sh rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/public_namespace.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/public_unnamespace.sh b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/public_unnamespace.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/public_unnamespace.sh rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/public_unnamespace.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/ql.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/ql.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/ql.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/ql.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/qr.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/qr.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/qr.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/qr.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/rb.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/rb.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/rb.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/rb.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/rtree.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/rtree.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/rtree.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/rtree.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/rtree_tsd.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/rtree_tsd.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/rtree_tsd.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/rtree_tsd.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/size_classes.sh b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/size_classes.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/size_classes.sh rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/size_classes.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/smoothstep.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/smoothstep.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/smoothstep.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/smoothstep.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/smoothstep.sh b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/smoothstep.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/smoothstep.sh rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/smoothstep.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/spin.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/spin.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/spin.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/spin.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/stats.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/stats.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/stats.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/stats.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/sz.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/sz.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/sz.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/sz.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/tcache_externs.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/tcache_externs.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/tcache_externs.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/tcache_externs.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/tcache_inlines.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/tcache_inlines.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/tcache_inlines.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/tcache_inlines.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/tcache_structs.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/tcache_structs.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/tcache_structs.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/tcache_structs.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/tcache_types.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/tcache_types.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/tcache_types.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/tcache_types.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/ticker.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/ticker.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/ticker.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/ticker.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/tsd.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/tsd.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/tsd.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/tsd.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/tsd_generic.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/tsd_generic.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/tsd_generic.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/tsd_generic.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/tsd_malloc_thread_cleanup.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/tsd_malloc_thread_cleanup.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/tsd_malloc_thread_cleanup.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/tsd_malloc_thread_cleanup.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/tsd_tls.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/tsd_tls.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/tsd_tls.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/tsd_tls.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/tsd_types.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/tsd_types.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/tsd_types.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/tsd_types.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/tsd_win.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/tsd_win.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/tsd_win.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/tsd_win.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/util.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/util.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/util.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/util.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/witness.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/witness.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/internal/witness.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/internal/witness.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/jemalloc.sh b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/jemalloc.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/jemalloc.sh rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/jemalloc.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/jemalloc_defs.h.in b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/jemalloc_defs.h.in similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/jemalloc_defs.h.in rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/jemalloc_defs.h.in diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/jemalloc_macros.h.in b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/jemalloc_macros.h.in similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/jemalloc_macros.h.in rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/jemalloc_macros.h.in diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/jemalloc_mangle.sh b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/jemalloc_mangle.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/jemalloc_mangle.sh rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/jemalloc_mangle.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/jemalloc_protos.h.in b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/jemalloc_protos.h.in similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/jemalloc_protos.h.in rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/jemalloc_protos.h.in diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/jemalloc_rename.sh b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/jemalloc_rename.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/jemalloc_rename.sh rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/jemalloc_rename.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/jemalloc_typedefs.h.in b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/jemalloc_typedefs.h.in similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/jemalloc/jemalloc_typedefs.h.in rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/jemalloc/jemalloc_typedefs.h.in diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/msvc_compat/C99/stdbool.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/msvc_compat/C99/stdbool.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/msvc_compat/C99/stdbool.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/msvc_compat/C99/stdbool.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/msvc_compat/C99/stdint.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/msvc_compat/C99/stdint.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/msvc_compat/C99/stdint.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/msvc_compat/C99/stdint.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/msvc_compat/strings.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/msvc_compat/strings.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/msvc_compat/strings.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/msvc_compat/strings.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/msvc_compat/windows_extra.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/msvc_compat/windows_extra.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/include/msvc_compat/windows_extra.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/include/msvc_compat/windows_extra.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/jemalloc.pc.in b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/jemalloc.pc.in similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/jemalloc.pc.in rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/jemalloc.pc.in diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/m4/ax_cxx_compile_stdcxx.m4 b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/m4/ax_cxx_compile_stdcxx.m4 similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/m4/ax_cxx_compile_stdcxx.m4 rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/m4/ax_cxx_compile_stdcxx.m4 diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/msvc/ReadMe.txt b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/msvc/ReadMe.txt similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/msvc/ReadMe.txt rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/msvc/ReadMe.txt diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/msvc/jemalloc_vc2015.sln b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/msvc/jemalloc_vc2015.sln similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/msvc/jemalloc_vc2015.sln rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/msvc/jemalloc_vc2015.sln diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/msvc/jemalloc_vc2017.sln b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/msvc/jemalloc_vc2017.sln similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/msvc/jemalloc_vc2017.sln rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/msvc/jemalloc_vc2017.sln diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/msvc/projects/vc2015/jemalloc/jemalloc.vcxproj b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/msvc/projects/vc2015/jemalloc/jemalloc.vcxproj similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/msvc/projects/vc2015/jemalloc/jemalloc.vcxproj rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/msvc/projects/vc2015/jemalloc/jemalloc.vcxproj diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/msvc/projects/vc2015/jemalloc/jemalloc.vcxproj.filters b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/msvc/projects/vc2015/jemalloc/jemalloc.vcxproj.filters similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/msvc/projects/vc2015/jemalloc/jemalloc.vcxproj.filters rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/msvc/projects/vc2015/jemalloc/jemalloc.vcxproj.filters diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/msvc/projects/vc2015/test_threads/test_threads.vcxproj b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/msvc/projects/vc2015/test_threads/test_threads.vcxproj similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/msvc/projects/vc2015/test_threads/test_threads.vcxproj rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/msvc/projects/vc2015/test_threads/test_threads.vcxproj diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/msvc/projects/vc2015/test_threads/test_threads.vcxproj.filters b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/msvc/projects/vc2015/test_threads/test_threads.vcxproj.filters similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/msvc/projects/vc2015/test_threads/test_threads.vcxproj.filters rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/msvc/projects/vc2015/test_threads/test_threads.vcxproj.filters diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/msvc/projects/vc2017/jemalloc/jemalloc.vcxproj b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/msvc/projects/vc2017/jemalloc/jemalloc.vcxproj similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/msvc/projects/vc2017/jemalloc/jemalloc.vcxproj rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/msvc/projects/vc2017/jemalloc/jemalloc.vcxproj diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/msvc/projects/vc2017/jemalloc/jemalloc.vcxproj.filters b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/msvc/projects/vc2017/jemalloc/jemalloc.vcxproj.filters similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/msvc/projects/vc2017/jemalloc/jemalloc.vcxproj.filters rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/msvc/projects/vc2017/jemalloc/jemalloc.vcxproj.filters diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/msvc/projects/vc2017/test_threads/test_threads.vcxproj b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/msvc/projects/vc2017/test_threads/test_threads.vcxproj similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/msvc/projects/vc2017/test_threads/test_threads.vcxproj rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/msvc/projects/vc2017/test_threads/test_threads.vcxproj diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/msvc/projects/vc2017/test_threads/test_threads.vcxproj.filters b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/msvc/projects/vc2017/test_threads/test_threads.vcxproj.filters similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/msvc/projects/vc2017/test_threads/test_threads.vcxproj.filters rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/msvc/projects/vc2017/test_threads/test_threads.vcxproj.filters diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/msvc/test_threads/test_threads.cpp b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/msvc/test_threads/test_threads.cpp similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/msvc/test_threads/test_threads.cpp rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/msvc/test_threads/test_threads.cpp diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/msvc/test_threads/test_threads.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/msvc/test_threads/test_threads.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/msvc/test_threads/test_threads.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/msvc/test_threads/test_threads.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/msvc/test_threads/test_threads_main.cpp b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/msvc/test_threads/test_threads_main.cpp similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/msvc/test_threads/test_threads_main.cpp rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/msvc/test_threads/test_threads_main.cpp diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/run_tests.sh b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/run_tests.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/run_tests.sh rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/run_tests.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/scripts/gen_run_tests.py b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/scripts/gen_run_tests.py similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/scripts/gen_run_tests.py rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/scripts/gen_run_tests.py diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/scripts/gen_travis.py b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/scripts/gen_travis.py similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/scripts/gen_travis.py rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/scripts/gen_travis.py diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/arena.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/arena.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/arena.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/arena.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/background_thread.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/background_thread.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/background_thread.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/background_thread.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/base.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/base.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/base.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/base.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/bin.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/bin.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/bin.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/bin.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/bitmap.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/bitmap.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/bitmap.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/bitmap.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/ckh.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/ckh.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/ckh.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/ckh.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/ctl.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/ctl.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/ctl.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/ctl.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/div.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/div.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/div.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/div.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/extent.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/extent.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/extent.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/extent.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/extent_dss.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/extent_dss.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/extent_dss.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/extent_dss.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/extent_mmap.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/extent_mmap.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/extent_mmap.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/extent_mmap.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/hash.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/hash.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/hash.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/hash.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/hooks.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/hooks.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/hooks.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/hooks.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/jemalloc.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/jemalloc.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/jemalloc.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/jemalloc.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/jemalloc_cpp.cpp b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/jemalloc_cpp.cpp similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/jemalloc_cpp.cpp rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/jemalloc_cpp.cpp diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/large.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/large.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/large.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/large.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/log.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/log.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/log.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/log.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/malloc_io.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/malloc_io.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/malloc_io.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/malloc_io.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/mutex.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/mutex.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/mutex.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/mutex.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/mutex_pool.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/mutex_pool.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/mutex_pool.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/mutex_pool.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/nstime.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/nstime.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/nstime.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/nstime.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/pages.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/pages.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/pages.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/pages.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/prng.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/prng.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/prng.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/prng.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/prof.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/prof.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/prof.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/prof.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/rtree.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/rtree.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/rtree.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/rtree.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/stats.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/stats.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/stats.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/stats.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/sz.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/sz.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/sz.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/sz.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/tcache.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/tcache.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/tcache.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/tcache.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/ticker.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/ticker.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/ticker.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/ticker.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/tsd.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/tsd.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/tsd.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/tsd.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/witness.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/witness.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/witness.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/witness.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/zone.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/zone.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/src/zone.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/src/zone.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/SFMT-alti.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/SFMT-alti.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/SFMT-alti.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/SFMT-alti.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/SFMT-params.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/SFMT-params.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/SFMT-params.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/SFMT-params.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/SFMT-params11213.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/SFMT-params11213.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/SFMT-params11213.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/SFMT-params11213.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/SFMT-params1279.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/SFMT-params1279.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/SFMT-params1279.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/SFMT-params1279.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/SFMT-params132049.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/SFMT-params132049.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/SFMT-params132049.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/SFMT-params132049.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/SFMT-params19937.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/SFMT-params19937.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/SFMT-params19937.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/SFMT-params19937.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/SFMT-params216091.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/SFMT-params216091.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/SFMT-params216091.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/SFMT-params216091.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/SFMT-params2281.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/SFMT-params2281.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/SFMT-params2281.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/SFMT-params2281.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/SFMT-params4253.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/SFMT-params4253.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/SFMT-params4253.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/SFMT-params4253.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/SFMT-params44497.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/SFMT-params44497.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/SFMT-params44497.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/SFMT-params44497.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/SFMT-params607.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/SFMT-params607.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/SFMT-params607.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/SFMT-params607.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/SFMT-params86243.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/SFMT-params86243.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/SFMT-params86243.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/SFMT-params86243.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/SFMT-sse2.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/SFMT-sse2.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/SFMT-sse2.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/SFMT-sse2.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/SFMT.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/SFMT.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/SFMT.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/SFMT.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/btalloc.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/btalloc.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/btalloc.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/btalloc.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/extent_hooks.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/extent_hooks.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/extent_hooks.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/extent_hooks.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/jemalloc_test.h.in b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/jemalloc_test.h.in similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/jemalloc_test.h.in rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/jemalloc_test.h.in diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/jemalloc_test_defs.h.in b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/jemalloc_test_defs.h.in similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/jemalloc_test_defs.h.in rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/jemalloc_test_defs.h.in diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/math.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/math.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/math.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/math.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/mq.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/mq.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/mq.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/mq.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/mtx.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/mtx.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/mtx.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/mtx.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/test.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/test.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/test.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/test.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/thd.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/thd.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/thd.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/thd.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/timer.h b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/timer.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/include/test/timer.h rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/include/test/timer.h diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/MALLOCX_ARENA.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/integration/MALLOCX_ARENA.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/MALLOCX_ARENA.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/integration/MALLOCX_ARENA.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/aligned_alloc.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/integration/aligned_alloc.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/aligned_alloc.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/integration/aligned_alloc.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/allocated.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/integration/allocated.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/allocated.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/integration/allocated.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/extent.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/integration/extent.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/extent.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/integration/extent.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/extent.sh b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/integration/extent.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/extent.sh rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/integration/extent.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/mallocx.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/integration/mallocx.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/mallocx.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/integration/mallocx.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/mallocx.sh b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/integration/mallocx.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/mallocx.sh rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/integration/mallocx.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/overflow.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/integration/overflow.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/overflow.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/integration/overflow.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/posix_memalign.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/integration/posix_memalign.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/posix_memalign.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/integration/posix_memalign.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/rallocx.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/integration/rallocx.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/rallocx.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/integration/rallocx.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/sdallocx.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/integration/sdallocx.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/sdallocx.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/integration/sdallocx.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/thread_arena.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/integration/thread_arena.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/thread_arena.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/integration/thread_arena.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/thread_tcache_enabled.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/integration/thread_tcache_enabled.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/thread_tcache_enabled.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/integration/thread_tcache_enabled.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/xallocx.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/integration/xallocx.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/xallocx.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/integration/xallocx.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/xallocx.sh b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/integration/xallocx.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/integration/xallocx.sh rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/integration/xallocx.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/src/SFMT.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/src/SFMT.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/src/SFMT.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/src/SFMT.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/src/btalloc.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/src/btalloc.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/src/btalloc.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/src/btalloc.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/src/btalloc_0.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/src/btalloc_0.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/src/btalloc_0.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/src/btalloc_0.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/src/btalloc_1.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/src/btalloc_1.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/src/btalloc_1.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/src/btalloc_1.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/src/math.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/src/math.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/src/math.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/src/math.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/src/mq.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/src/mq.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/src/mq.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/src/mq.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/src/mtx.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/src/mtx.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/src/mtx.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/src/mtx.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/src/test.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/src/test.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/src/test.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/src/test.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/src/thd.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/src/thd.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/src/thd.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/src/thd.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/src/timer.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/src/timer.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/src/timer.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/src/timer.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/stress/microbench.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/stress/microbench.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/stress/microbench.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/stress/microbench.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/test.sh.in b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/test.sh.in similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/test.sh.in rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/test.sh.in diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/SFMT.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/SFMT.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/SFMT.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/SFMT.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/a0.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/a0.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/a0.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/a0.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/arena_reset.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/arena_reset.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/arena_reset.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/arena_reset.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/arena_reset_prof.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/arena_reset_prof.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/arena_reset_prof.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/arena_reset_prof.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/arena_reset_prof.sh b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/arena_reset_prof.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/arena_reset_prof.sh rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/arena_reset_prof.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/atomic.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/atomic.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/atomic.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/atomic.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/background_thread.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/background_thread.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/background_thread.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/background_thread.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/background_thread_enable.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/background_thread_enable.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/background_thread_enable.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/background_thread_enable.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/base.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/base.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/base.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/base.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/bit_util.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/bit_util.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/bit_util.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/bit_util.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/bitmap.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/bitmap.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/bitmap.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/bitmap.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/ckh.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/ckh.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/ckh.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/ckh.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/decay.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/decay.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/decay.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/decay.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/decay.sh b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/decay.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/decay.sh rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/decay.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/div.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/div.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/div.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/div.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/emitter.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/emitter.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/emitter.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/emitter.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/extent_quantize.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/extent_quantize.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/extent_quantize.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/extent_quantize.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/fork.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/fork.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/fork.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/fork.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/hash.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/hash.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/hash.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/hash.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/hooks.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/hooks.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/hooks.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/hooks.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/junk.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/junk.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/junk.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/junk.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/junk.sh b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/junk.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/junk.sh rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/junk.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/junk_alloc.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/junk_alloc.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/junk_alloc.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/junk_alloc.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/junk_alloc.sh b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/junk_alloc.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/junk_alloc.sh rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/junk_alloc.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/junk_free.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/junk_free.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/junk_free.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/junk_free.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/junk_free.sh b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/junk_free.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/junk_free.sh rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/junk_free.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/log.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/log.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/log.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/log.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/mallctl.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/mallctl.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/mallctl.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/mallctl.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/malloc_io.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/malloc_io.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/malloc_io.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/malloc_io.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/math.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/math.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/math.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/math.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/mq.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/mq.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/mq.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/mq.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/mtx.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/mtx.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/mtx.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/mtx.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/nstime.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/nstime.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/nstime.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/nstime.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/pack.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/pack.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/pack.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/pack.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/pack.sh b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/pack.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/pack.sh rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/pack.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/pages.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/pages.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/pages.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/pages.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/ph.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/ph.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/ph.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/ph.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/prng.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/prng.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/prng.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/prng.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/prof_accum.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/prof_accum.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/prof_accum.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/prof_accum.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/prof_accum.sh b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/prof_accum.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/prof_accum.sh rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/prof_accum.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/prof_active.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/prof_active.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/prof_active.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/prof_active.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/prof_active.sh b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/prof_active.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/prof_active.sh rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/prof_active.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/prof_gdump.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/prof_gdump.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/prof_gdump.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/prof_gdump.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/prof_gdump.sh b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/prof_gdump.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/prof_gdump.sh rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/prof_gdump.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/prof_idump.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/prof_idump.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/prof_idump.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/prof_idump.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/prof_idump.sh b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/prof_idump.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/prof_idump.sh rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/prof_idump.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/prof_reset.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/prof_reset.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/prof_reset.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/prof_reset.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/prof_reset.sh b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/prof_reset.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/prof_reset.sh rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/prof_reset.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/prof_tctx.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/prof_tctx.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/prof_tctx.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/prof_tctx.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/prof_tctx.sh b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/prof_tctx.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/prof_tctx.sh rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/prof_tctx.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/prof_thread_name.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/prof_thread_name.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/prof_thread_name.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/prof_thread_name.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/prof_thread_name.sh b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/prof_thread_name.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/prof_thread_name.sh rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/prof_thread_name.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/ql.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/ql.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/ql.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/ql.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/qr.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/qr.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/qr.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/qr.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/rb.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/rb.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/rb.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/rb.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/retained.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/retained.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/retained.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/retained.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/rtree.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/rtree.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/rtree.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/rtree.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/size_classes.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/size_classes.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/size_classes.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/size_classes.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/slab.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/slab.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/slab.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/slab.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/smoothstep.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/smoothstep.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/smoothstep.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/smoothstep.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/spin.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/spin.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/spin.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/spin.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/stats.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/stats.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/stats.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/stats.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/stats_print.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/stats_print.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/stats_print.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/stats_print.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/ticker.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/ticker.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/ticker.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/ticker.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/tsd.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/tsd.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/tsd.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/tsd.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/witness.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/witness.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/witness.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/witness.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/zero.c b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/zero.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/zero.c rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/zero.c diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/zero.sh b/redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/zero.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/jemalloc/test/unit/zero.sh rename to redis-android/src/main/jni/redis-5.0.3/deps/jemalloc/test/unit/zero.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/deps/update-jemalloc.sh b/redis-android/src/main/jni/redis-5.0.3/deps/update-jemalloc.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/deps/update-jemalloc.sh rename to redis-android/src/main/jni/redis-5.0.3/deps/update-jemalloc.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/redis.conf b/redis-android/src/main/jni/redis-5.0.3/redis.conf similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/redis.conf rename to redis-android/src/main/jni/redis-5.0.3/redis.conf diff --git a/redis-android/src/main/jni/redis-5.0.2/runtest b/redis-android/src/main/jni/redis-5.0.3/runtest similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/runtest rename to redis-android/src/main/jni/redis-5.0.3/runtest diff --git a/redis-android/src/main/jni/redis-5.0.2/runtest-cluster b/redis-android/src/main/jni/redis-5.0.3/runtest-cluster similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/runtest-cluster rename to redis-android/src/main/jni/redis-5.0.3/runtest-cluster diff --git a/redis-android/src/main/jni/redis-5.0.2/runtest-sentinel b/redis-android/src/main/jni/redis-5.0.3/runtest-sentinel similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/runtest-sentinel rename to redis-android/src/main/jni/redis-5.0.3/runtest-sentinel diff --git a/redis-android/src/main/jni/redis-5.0.2/sentinel.conf b/redis-android/src/main/jni/redis-5.0.3/sentinel.conf similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/sentinel.conf rename to redis-android/src/main/jni/redis-5.0.3/sentinel.conf diff --git a/redis-android/src/main/jni/redis-5.0.2/src/.gitignore b/redis-android/src/main/jni/redis-5.0.3/src/.gitignore similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/.gitignore rename to redis-android/src/main/jni/redis-5.0.3/src/.gitignore diff --git a/redis-android/src/main/jni/redis-5.0.2/src/Makefile b/redis-android/src/main/jni/redis-5.0.3/src/Makefile similarity index 97% rename from redis-android/src/main/jni/redis-5.0.2/src/Makefile rename to redis-android/src/main/jni/redis-5.0.3/src/Makefile index 0de0a1c..9edbb45 100644 --- a/redis-android/src/main/jni/redis-5.0.2/src/Makefile +++ b/redis-android/src/main/jni/redis-5.0.3/src/Makefile @@ -102,14 +102,20 @@ else ifeq ($(uname_S),OpenBSD) # OpenBSD FINAL_LIBS+= -lpthread + ifeq ($(USE_BACKTRACE),yes) + FINAL_CFLAGS+= -DUSE_BACKTRACE -I/usr/local/include + FINAL_LDFLAGS+= -L/usr/local/lib + FINAL_LIBS+= -lexecinfo + endif + else ifeq ($(uname_S),FreeBSD) # FreeBSD - FINAL_LIBS+= -lpthread + FINAL_LIBS+= -lpthread -lexecinfo else ifeq ($(uname_S),DragonFly) # FreeBSD - FINAL_LIBS+= -lpthread + FINAL_LIBS+= -lpthread -lexecinfo else # All the other OSes (notably Linux) FINAL_LDFLAGS+= -rdynamic diff --git a/redis-android/src/main/jni/redis-5.0.2/src/adlist.c b/redis-android/src/main/jni/redis-5.0.3/src/adlist.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/adlist.c rename to redis-android/src/main/jni/redis-5.0.3/src/adlist.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/adlist.h b/redis-android/src/main/jni/redis-5.0.3/src/adlist.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/adlist.h rename to redis-android/src/main/jni/redis-5.0.3/src/adlist.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/ae.c b/redis-android/src/main/jni/redis-5.0.3/src/ae.c similarity index 99% rename from redis-android/src/main/jni/redis-5.0.2/src/ae.c rename to redis-android/src/main/jni/redis-5.0.3/src/ae.c index 8e246bb..1ea6715 100644 --- a/redis-android/src/main/jni/redis-5.0.2/src/ae.c +++ b/redis-android/src/main/jni/redis-5.0.3/src/ae.c @@ -44,7 +44,6 @@ #include "zmalloc.h" #include "config.h" - /* Include the best multiplexing layer supported by this system. * The following should be ordered by performances, descending. */ #ifdef HAVE_EVPORT diff --git a/redis-android/src/main/jni/redis-5.0.2/src/ae.h b/redis-android/src/main/jni/redis-5.0.3/src/ae.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/ae.h rename to redis-android/src/main/jni/redis-5.0.3/src/ae.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/ae_epoll.c b/redis-android/src/main/jni/redis-5.0.3/src/ae_epoll.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/ae_epoll.c rename to redis-android/src/main/jni/redis-5.0.3/src/ae_epoll.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/ae_evport.c b/redis-android/src/main/jni/redis-5.0.3/src/ae_evport.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/ae_evport.c rename to redis-android/src/main/jni/redis-5.0.3/src/ae_evport.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/ae_kqueue.c b/redis-android/src/main/jni/redis-5.0.3/src/ae_kqueue.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/ae_kqueue.c rename to redis-android/src/main/jni/redis-5.0.3/src/ae_kqueue.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/ae_select.c b/redis-android/src/main/jni/redis-5.0.3/src/ae_select.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/ae_select.c rename to redis-android/src/main/jni/redis-5.0.3/src/ae_select.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/anet.c b/redis-android/src/main/jni/redis-5.0.3/src/anet.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/anet.c rename to redis-android/src/main/jni/redis-5.0.3/src/anet.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/anet.h b/redis-android/src/main/jni/redis-5.0.3/src/anet.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/anet.h rename to redis-android/src/main/jni/redis-5.0.3/src/anet.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/aof.c b/redis-android/src/main/jni/redis-5.0.3/src/aof.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/aof.c rename to redis-android/src/main/jni/redis-5.0.3/src/aof.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/asciilogo.h b/redis-android/src/main/jni/redis-5.0.3/src/asciilogo.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/asciilogo.h rename to redis-android/src/main/jni/redis-5.0.3/src/asciilogo.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/atomicvar.h b/redis-android/src/main/jni/redis-5.0.3/src/atomicvar.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/atomicvar.h rename to redis-android/src/main/jni/redis-5.0.3/src/atomicvar.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/bio.c b/redis-android/src/main/jni/redis-5.0.3/src/bio.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/bio.c rename to redis-android/src/main/jni/redis-5.0.3/src/bio.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/bio.h b/redis-android/src/main/jni/redis-5.0.3/src/bio.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/bio.h rename to redis-android/src/main/jni/redis-5.0.3/src/bio.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/bitops.c b/redis-android/src/main/jni/redis-5.0.3/src/bitops.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/bitops.c rename to redis-android/src/main/jni/redis-5.0.3/src/bitops.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/blocked.c b/redis-android/src/main/jni/redis-5.0.3/src/blocked.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/blocked.c rename to redis-android/src/main/jni/redis-5.0.3/src/blocked.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/childinfo.c b/redis-android/src/main/jni/redis-5.0.3/src/childinfo.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/childinfo.c rename to redis-android/src/main/jni/redis-5.0.3/src/childinfo.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/cluster.c b/redis-android/src/main/jni/redis-5.0.3/src/cluster.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/cluster.c rename to redis-android/src/main/jni/redis-5.0.3/src/cluster.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/cluster.h b/redis-android/src/main/jni/redis-5.0.3/src/cluster.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/cluster.h rename to redis-android/src/main/jni/redis-5.0.3/src/cluster.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/config.c b/redis-android/src/main/jni/redis-5.0.3/src/config.c similarity index 99% rename from redis-android/src/main/jni/redis-5.0.2/src/config.c rename to redis-android/src/main/jni/redis-5.0.3/src/config.c index 8a2690a..9f51bba 100644 --- a/redis-android/src/main/jni/redis-5.0.2/src/config.c +++ b/redis-android/src/main/jni/redis-5.0.3/src/config.c @@ -1248,7 +1248,7 @@ void configSetCommand(client *c) { if (server.maxmemory < zmalloc_used_memory()) { serverLog(LL_WARNING,"WARNING: the new maxmemory value set via CONFIG SET is smaller than the current memory usage. This will result in key eviction and/or the inability to accept new write commands depending on the maxmemory-policy."); } - freeMemoryIfNeeded(); + freeMemoryIfNeededAndSafe(); } } config_set_memory_field( "proto-max-bulk-len",server.proto_max_bulk_len) { diff --git a/redis-android/src/main/jni/redis-5.0.2/src/config.h b/redis-android/src/main/jni/redis-5.0.3/src/config.h similarity index 98% rename from redis-android/src/main/jni/redis-5.0.2/src/config.h rename to redis-android/src/main/jni/redis-5.0.3/src/config.h index ca6de43..d6ee8ad 100644 --- a/redis-android/src/main/jni/redis-5.0.2/src/config.h +++ b/redis-android/src/main/jni/redis-5.0.3/src/config.h @@ -62,7 +62,9 @@ #endif /* Test for backtrace() */ -#if defined(__APPLE__) || (defined(__linux__) && defined(__GLIBC__)) +#if defined(__APPLE__) || (defined(__linux__) && defined(__GLIBC__)) || \ + defined(__FreeBSD__) || (defined(__OpenBSD__) && defined(USE_BACKTRACE))\ + || defined(__DragonFly__) #define HAVE_BACKTRACE 1 #endif diff --git a/redis-android/src/main/jni/redis-5.0.2/src/crc16.c b/redis-android/src/main/jni/redis-5.0.3/src/crc16.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/crc16.c rename to redis-android/src/main/jni/redis-5.0.3/src/crc16.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/crc64.c b/redis-android/src/main/jni/redis-5.0.3/src/crc64.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/crc64.c rename to redis-android/src/main/jni/redis-5.0.3/src/crc64.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/crc64.h b/redis-android/src/main/jni/redis-5.0.3/src/crc64.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/crc64.h rename to redis-android/src/main/jni/redis-5.0.3/src/crc64.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/db.c b/redis-android/src/main/jni/redis-5.0.3/src/db.c similarity index 99% rename from redis-android/src/main/jni/redis-5.0.2/src/db.c rename to redis-android/src/main/jni/redis-5.0.3/src/db.c index 62db2ac..09486dd 100644 --- a/redis-android/src/main/jni/redis-5.0.2/src/db.c +++ b/redis-android/src/main/jni/redis-5.0.3/src/db.c @@ -213,7 +213,7 @@ void dbOverwrite(redisDb *db, robj *key, robj *val) { * 2) clients WATCHing for the destination key notified. * 3) The expire time of the key is reset (the key is made persistent). * - * All the new keys in the database should be craeted via this interface. */ + * All the new keys in the database should be created via this interface. */ void setKey(redisDb *db, robj *key, robj *val) { if (lookupKeyWrite(db,key) == NULL) { dbAdd(db,key,val); @@ -839,6 +839,7 @@ void typeCommand(client *c) { addReplyStatus(c,type); } + #ifdef __ANDROID__ void *androidShutdownWorker(void *p) { server.el->stop = 1; diff --git a/redis-android/src/main/jni/redis-5.0.2/src/debug.c b/redis-android/src/main/jni/redis-5.0.3/src/debug.c similarity index 77% rename from redis-android/src/main/jni/redis-5.0.2/src/debug.c rename to redis-android/src/main/jni/redis-5.0.3/src/debug.c index 70def3b..1ec7c49 100644 --- a/redis-android/src/main/jni/redis-5.0.2/src/debug.c +++ b/redis-android/src/main/jni/redis-5.0.3/src/debug.c @@ -37,7 +37,11 @@ #ifdef HAVE_BACKTRACE #include +#ifndef __OpenBSD__ #include +#else +typedef ucontext_t sigcontext_t; +#endif #include #include "bio.h" #include @@ -70,7 +74,7 @@ void xorDigest(unsigned char *digest, void *ptr, size_t len) { digest[j] ^= hash[j]; } -void xorObjectDigest(unsigned char *digest, robj *o) { +void xorStringObjectDigest(unsigned char *digest, robj *o) { o = getDecodedObject(o); xorDigest(digest,o->ptr,sdslen(o->ptr)); decrRefCount(o); @@ -100,12 +104,151 @@ void mixDigest(unsigned char *digest, void *ptr, size_t len) { SHA1Final(digest,&ctx); } -void mixObjectDigest(unsigned char *digest, robj *o) { +void mixStringObjectDigest(unsigned char *digest, robj *o) { o = getDecodedObject(o); mixDigest(digest,o->ptr,sdslen(o->ptr)); decrRefCount(o); } +/* This function computes the digest of a data structure stored in the + * object 'o'. It is the core of the DEBUG DIGEST command: when taking the + * digest of a whole dataset, we take the digest of the key and the value + * pair, and xor all those together. + * + * Note that this function does not reset the initial 'digest' passed, it + * will continue mixing this object digest to anything that was already + * present. */ +void xorObjectDigest(redisDb *db, robj *keyobj, unsigned char *digest, robj *o) { + uint32_t aux = htonl(o->type); + mixDigest(digest,&aux,sizeof(aux)); + long long expiretime = getExpire(db,keyobj); + char buf[128]; + + /* Save the key and associated value */ + if (o->type == OBJ_STRING) { + mixStringObjectDigest(digest,o); + } else if (o->type == OBJ_LIST) { + listTypeIterator *li = listTypeInitIterator(o,0,LIST_TAIL); + listTypeEntry entry; + while(listTypeNext(li,&entry)) { + robj *eleobj = listTypeGet(&entry); + mixStringObjectDigest(digest,eleobj); + decrRefCount(eleobj); + } + listTypeReleaseIterator(li); + } else if (o->type == OBJ_SET) { + setTypeIterator *si = setTypeInitIterator(o); + sds sdsele; + while((sdsele = setTypeNextObject(si)) != NULL) { + xorDigest(digest,sdsele,sdslen(sdsele)); + sdsfree(sdsele); + } + setTypeReleaseIterator(si); + } else if (o->type == OBJ_ZSET) { + unsigned char eledigest[20]; + + if (o->encoding == OBJ_ENCODING_ZIPLIST) { + unsigned char *zl = o->ptr; + unsigned char *eptr, *sptr; + unsigned char *vstr; + unsigned int vlen; + long long vll; + double score; + + eptr = ziplistIndex(zl,0); + serverAssert(eptr != NULL); + sptr = ziplistNext(zl,eptr); + serverAssert(sptr != NULL); + + while (eptr != NULL) { + serverAssert(ziplistGet(eptr,&vstr,&vlen,&vll)); + score = zzlGetScore(sptr); + + memset(eledigest,0,20); + if (vstr != NULL) { + mixDigest(eledigest,vstr,vlen); + } else { + ll2string(buf,sizeof(buf),vll); + mixDigest(eledigest,buf,strlen(buf)); + } + + snprintf(buf,sizeof(buf),"%.17g",score); + mixDigest(eledigest,buf,strlen(buf)); + xorDigest(digest,eledigest,20); + zzlNext(zl,&eptr,&sptr); + } + } else if (o->encoding == OBJ_ENCODING_SKIPLIST) { + zset *zs = o->ptr; + dictIterator *di = dictGetIterator(zs->dict); + dictEntry *de; + + while((de = dictNext(di)) != NULL) { + sds sdsele = dictGetKey(de); + double *score = dictGetVal(de); + + snprintf(buf,sizeof(buf),"%.17g",*score); + memset(eledigest,0,20); + mixDigest(eledigest,sdsele,sdslen(sdsele)); + mixDigest(eledigest,buf,strlen(buf)); + xorDigest(digest,eledigest,20); + } + dictReleaseIterator(di); + } else { + serverPanic("Unknown sorted set encoding"); + } + } else if (o->type == OBJ_HASH) { + hashTypeIterator *hi = hashTypeInitIterator(o); + while (hashTypeNext(hi) != C_ERR) { + unsigned char eledigest[20]; + sds sdsele; + + memset(eledigest,0,20); + sdsele = hashTypeCurrentObjectNewSds(hi,OBJ_HASH_KEY); + mixDigest(eledigest,sdsele,sdslen(sdsele)); + sdsfree(sdsele); + sdsele = hashTypeCurrentObjectNewSds(hi,OBJ_HASH_VALUE); + mixDigest(eledigest,sdsele,sdslen(sdsele)); + sdsfree(sdsele); + xorDigest(digest,eledigest,20); + } + hashTypeReleaseIterator(hi); + } else if (o->type == OBJ_STREAM) { + streamIterator si; + streamIteratorStart(&si,o->ptr,NULL,NULL,0); + streamID id; + int64_t numfields; + + while(streamIteratorGetID(&si,&id,&numfields)) { + sds itemid = sdscatfmt(sdsempty(),"%U.%U",id.ms,id.seq); + mixDigest(digest,itemid,sdslen(itemid)); + sdsfree(itemid); + + while(numfields--) { + unsigned char *field, *value; + int64_t field_len, value_len; + streamIteratorGetField(&si,&field,&value, + &field_len,&value_len); + mixDigest(digest,field,field_len); + mixDigest(digest,value,value_len); + } + } + streamIteratorStop(&si); + } else if (o->type == OBJ_MODULE) { + RedisModuleDigest md; + moduleValue *mv = o->ptr; + moduleType *mt = mv->type; + moduleInitDigestContext(md); + if (mt->digest) { + mt->digest(&md,mv->value); + xorDigest(digest,md.x,sizeof(md.x)); + } + } else { + serverPanic("Unknown object type"); + } + /* If the key has an expire, add it to the mix */ + if (expiretime != -1) xorDigest(digest,"!!expire!!",10); +} + /* Compute the dataset digest. Since keys, sets elements, hashes elements * are not ordered, we use a trick: every aggregate digest is the xor * of the digests of their elements. This way the order will not change @@ -114,7 +257,6 @@ void mixObjectDigest(unsigned char *digest, robj *o) { * a different digest. */ void computeDatasetDigest(unsigned char *final) { unsigned char digest[20]; - char buf[128]; dictIterator *di = NULL; dictEntry *de; int j; @@ -137,7 +279,6 @@ void computeDatasetDigest(unsigned char *final) { while((de = dictNext(di)) != NULL) { sds key; robj *keyobj, *o; - long long expiretime; memset(digest,0,20); /* This key-val digest */ key = dictGetKey(de); @@ -146,134 +287,8 @@ void computeDatasetDigest(unsigned char *final) { mixDigest(digest,key,sdslen(key)); o = dictGetVal(de); + xorObjectDigest(db,keyobj,digest,o); - aux = htonl(o->type); - mixDigest(digest,&aux,sizeof(aux)); - expiretime = getExpire(db,keyobj); - - /* Save the key and associated value */ - if (o->type == OBJ_STRING) { - mixObjectDigest(digest,o); - } else if (o->type == OBJ_LIST) { - listTypeIterator *li = listTypeInitIterator(o,0,LIST_TAIL); - listTypeEntry entry; - while(listTypeNext(li,&entry)) { - robj *eleobj = listTypeGet(&entry); - mixObjectDigest(digest,eleobj); - decrRefCount(eleobj); - } - listTypeReleaseIterator(li); - } else if (o->type == OBJ_SET) { - setTypeIterator *si = setTypeInitIterator(o); - sds sdsele; - while((sdsele = setTypeNextObject(si)) != NULL) { - xorDigest(digest,sdsele,sdslen(sdsele)); - sdsfree(sdsele); - } - setTypeReleaseIterator(si); - } else if (o->type == OBJ_ZSET) { - unsigned char eledigest[20]; - - if (o->encoding == OBJ_ENCODING_ZIPLIST) { - unsigned char *zl = o->ptr; - unsigned char *eptr, *sptr; - unsigned char *vstr; - unsigned int vlen; - long long vll; - double score; - - eptr = ziplistIndex(zl,0); - serverAssert(eptr != NULL); - sptr = ziplistNext(zl,eptr); - serverAssert(sptr != NULL); - - while (eptr != NULL) { - serverAssert(ziplistGet(eptr,&vstr,&vlen,&vll)); - score = zzlGetScore(sptr); - - memset(eledigest,0,20); - if (vstr != NULL) { - mixDigest(eledigest,vstr,vlen); - } else { - ll2string(buf,sizeof(buf),vll); - mixDigest(eledigest,buf,strlen(buf)); - } - - snprintf(buf,sizeof(buf),"%.17g",score); - mixDigest(eledigest,buf,strlen(buf)); - xorDigest(digest,eledigest,20); - zzlNext(zl,&eptr,&sptr); - } - } else if (o->encoding == OBJ_ENCODING_SKIPLIST) { - zset *zs = o->ptr; - dictIterator *di = dictGetIterator(zs->dict); - dictEntry *de; - - while((de = dictNext(di)) != NULL) { - sds sdsele = dictGetKey(de); - double *score = dictGetVal(de); - - snprintf(buf,sizeof(buf),"%.17g",*score); - memset(eledigest,0,20); - mixDigest(eledigest,sdsele,sdslen(sdsele)); - mixDigest(eledigest,buf,strlen(buf)); - xorDigest(digest,eledigest,20); - } - dictReleaseIterator(di); - } else { - serverPanic("Unknown sorted set encoding"); - } - } else if (o->type == OBJ_HASH) { - hashTypeIterator *hi = hashTypeInitIterator(o); - while (hashTypeNext(hi) != C_ERR) { - unsigned char eledigest[20]; - sds sdsele; - - memset(eledigest,0,20); - sdsele = hashTypeCurrentObjectNewSds(hi,OBJ_HASH_KEY); - mixDigest(eledigest,sdsele,sdslen(sdsele)); - sdsfree(sdsele); - sdsele = hashTypeCurrentObjectNewSds(hi,OBJ_HASH_VALUE); - mixDigest(eledigest,sdsele,sdslen(sdsele)); - sdsfree(sdsele); - xorDigest(digest,eledigest,20); - } - hashTypeReleaseIterator(hi); - } else if (o->type == OBJ_STREAM) { - streamIterator si; - streamIteratorStart(&si,o->ptr,NULL,NULL,0); - streamID id; - int64_t numfields; - - while(streamIteratorGetID(&si,&id,&numfields)) { - sds itemid = sdscatfmt(sdsempty(),"%U.%U",id.ms,id.seq); - mixDigest(digest,itemid,sdslen(itemid)); - sdsfree(itemid); - - while(numfields--) { - unsigned char *field, *value; - int64_t field_len, value_len; - streamIteratorGetField(&si,&field,&value, - &field_len,&value_len); - mixDigest(digest,field,field_len); - mixDigest(digest,value,value_len); - } - } - streamIteratorStop(&si); - } else if (o->type == OBJ_MODULE) { - RedisModuleDigest md; - moduleValue *mv = o->ptr; - moduleType *mt = mv->type; - moduleInitDigestContext(md); - if (mt->digest) { - mt->digest(&md,mv->value); - xorDigest(digest,md.x,sizeof(md.x)); - } - } else { - serverPanic("Unknown object type"); - } - /* If the key has an expire, add it to the mix */ - if (expiretime != -1) xorDigest(digest,"!!expire!!",10); /* We can finally xor the key-val digest to the final digest */ xorDigest(final,digest,20); decrRefCount(keyobj); @@ -289,6 +304,7 @@ void debugCommand(client *c) { "CHANGE-REPL-ID -- Change the replication IDs of the instance. Dangerous, should be used only for testing the replication subsystem.", "CRASH-AND-RECOVER -- Hard crash and restart after delay.", "DIGEST -- Output a hex signature representing the current DB content.", +"DIGEST-VALUE ... -- Output a hex signature of the values of all the specified keys.", "ERROR -- Return a Redis protocol error with as message. Useful for clients unit tests to simulate Redis errors.", "LOG -- write message to the server log.", "HTSTATS -- Return hash table statistics of the specified Redis database.", @@ -306,6 +322,7 @@ void debugCommand(client *c) { "SLEEP -- Stop the server for . Decimals allowed.", "STRUCTSIZE -- Return the size of different Redis core C structures.", "ZIPLIST -- Show low level info about the ziplist encoding.", +"STRINGMATCH-TEST -- Run a fuzz tester against the stringmatchlen() function.", NULL }; addReplyHelp(c, help); @@ -332,7 +349,6 @@ NULL zfree(ptr); addReply(c,shared.ok); } else if (!strcasecmp(c->argv[1]->ptr,"assert")) { - if (c->argc >= 3) c->argv[2] = tryObjectEncoding(c->argv[2]); serverAssertWithInfo(c,c->argv[0],1 == 2); } else if (!strcasecmp(c->argv[1]->ptr,"log") && c->argc == 3) { serverLog(LL_WARNING, "DEBUG LOG: %s", (char*)c->argv[2]->ptr); @@ -491,15 +507,28 @@ NULL } addReply(c,shared.ok); } else if (!strcasecmp(c->argv[1]->ptr,"digest") && c->argc == 2) { + /* DEBUG DIGEST (form without keys specified) */ unsigned char digest[20]; sds d = sdsempty(); - int j; computeDatasetDigest(digest); - for (j = 0; j < 20; j++) - d = sdscatprintf(d, "%02x",digest[j]); + for (int i = 0; i < 20; i++) d = sdscatprintf(d, "%02x",digest[i]); addReplyStatus(c,d); sdsfree(d); + } else if (!strcasecmp(c->argv[1]->ptr,"digest-value") && c->argc >= 2) { + /* DEBUG DIGEST-VALUE key key key ... key. */ + addReplyMultiBulkLen(c,c->argc-2); + for (int j = 2; j < c->argc; j++) { + unsigned char digest[20]; + memset(digest,0,20); /* Start with a clean result */ + robj *o = lookupKeyReadWithFlags(c->db,c->argv[j],LOOKUP_NOTOUCH); + if (o) xorObjectDigest(c->db,c->argv[j],digest,o); + + sds d = sdsempty(); + for (int i = 0; i < 20; i++) d = sdscatprintf(d, "%02x",digest[i]); + addReplyStatus(c,d); + sdsfree(d); + } } else if (!strcasecmp(c->argv[1]->ptr,"sleep") && c->argc == 3) { double dtime = strtod(c->argv[2]->ptr,NULL); long long utime = dtime*1000000; @@ -591,6 +620,10 @@ NULL changeReplicationId(); clearReplicationId2(); addReply(c,shared.ok); + } else if (!strcasecmp(c->argv[1]->ptr,"stringmatch-test") && c->argc == 2) + { + stringmatchlen_fuzz_test(); + addReplyStatus(c,"Apparently Redis did not crash: test passed"); } else { addReplySubcommandSyntaxError(c); return; @@ -729,6 +762,22 @@ static void *getMcontextEip(ucontext_t *uc) { #elif defined(__aarch64__) /* Linux AArch64 */ return (void*) uc->uc_mcontext.pc; #endif +#elif defined(__FreeBSD__) + /* FreeBSD */ + #if defined(__i386__) + return (void*) uc->uc_mcontext.mc_eip; + #elif defined(__x86_64__) + return (void*) uc->uc_mcontext.mc_rip; + #endif +#elif defined(__OpenBSD__) + /* OpenBSD */ + #if defined(__i386__) + return (void*) uc->sc_eip; + #elif defined(__x86_64__) + return (void*) uc->sc_rip; + #endif +#elif defined(__DragonFly__) + return (void*) uc->uc_mcontext.mc_rip; #else return NULL; #endif @@ -870,6 +919,145 @@ void logRegisters(ucontext_t *uc) { ); logStackContent((void**)uc->uc_mcontext.gregs[15]); #endif +#elif defined(__FreeBSD__) + #if defined(__x86_64__) + serverLog(LL_WARNING, + "\n" + "RAX:%016lx RBX:%016lx\nRCX:%016lx RDX:%016lx\n" + "RDI:%016lx RSI:%016lx\nRBP:%016lx RSP:%016lx\n" + "R8 :%016lx R9 :%016lx\nR10:%016lx R11:%016lx\n" + "R12:%016lx R13:%016lx\nR14:%016lx R15:%016lx\n" + "RIP:%016lx EFL:%016lx\nCSGSFS:%016lx", + (unsigned long) uc->uc_mcontext.mc_rax, + (unsigned long) uc->uc_mcontext.mc_rbx, + (unsigned long) uc->uc_mcontext.mc_rcx, + (unsigned long) uc->uc_mcontext.mc_rdx, + (unsigned long) uc->uc_mcontext.mc_rdi, + (unsigned long) uc->uc_mcontext.mc_rsi, + (unsigned long) uc->uc_mcontext.mc_rbp, + (unsigned long) uc->uc_mcontext.mc_rsp, + (unsigned long) uc->uc_mcontext.mc_r8, + (unsigned long) uc->uc_mcontext.mc_r9, + (unsigned long) uc->uc_mcontext.mc_r10, + (unsigned long) uc->uc_mcontext.mc_r11, + (unsigned long) uc->uc_mcontext.mc_r12, + (unsigned long) uc->uc_mcontext.mc_r13, + (unsigned long) uc->uc_mcontext.mc_r14, + (unsigned long) uc->uc_mcontext.mc_r15, + (unsigned long) uc->uc_mcontext.mc_rip, + (unsigned long) uc->uc_mcontext.mc_rflags, + (unsigned long) uc->uc_mcontext.mc_cs + ); + logStackContent((void**)uc->uc_mcontext.mc_rsp); + #elif defined(__i386__) + serverLog(LL_WARNING, + "\n" + "EAX:%08lx EBX:%08lx ECX:%08lx EDX:%08lx\n" + "EDI:%08lx ESI:%08lx EBP:%08lx ESP:%08lx\n" + "SS :%08lx EFL:%08lx EIP:%08lx CS:%08lx\n" + "DS :%08lx ES :%08lx FS :%08lx GS:%08lx", + (unsigned long) uc->uc_mcontext.mc_eax, + (unsigned long) uc->uc_mcontext.mc_ebx, + (unsigned long) uc->uc_mcontext.mc_ebx, + (unsigned long) uc->uc_mcontext.mc_edx, + (unsigned long) uc->uc_mcontext.mc_edi, + (unsigned long) uc->uc_mcontext.mc_esi, + (unsigned long) uc->uc_mcontext.mc_ebp, + (unsigned long) uc->uc_mcontext.mc_esp, + (unsigned long) uc->uc_mcontext.mc_ss, + (unsigned long) uc->uc_mcontext.mc_eflags, + (unsigned long) uc->uc_mcontext.mc_eip, + (unsigned long) uc->uc_mcontext.mc_cs, + (unsigned long) uc->uc_mcontext.mc_es, + (unsigned long) uc->uc_mcontext.mc_fs, + (unsigned long) uc->uc_mcontext.mc_gs + ); + logStackContent((void**)uc->uc_mcontext.mc_esp); + #endif +#elif defined(__OpenBSD__) + #if defined(__x86_64__) + serverLog(LL_WARNING, + "\n" + "RAX:%016lx RBX:%016lx\nRCX:%016lx RDX:%016lx\n" + "RDI:%016lx RSI:%016lx\nRBP:%016lx RSP:%016lx\n" + "R8 :%016lx R9 :%016lx\nR10:%016lx R11:%016lx\n" + "R12:%016lx R13:%016lx\nR14:%016lx R15:%016lx\n" + "RIP:%016lx EFL:%016lx\nCSGSFS:%016lx", + (unsigned long) uc->sc_rax, + (unsigned long) uc->sc_rbx, + (unsigned long) uc->sc_rcx, + (unsigned long) uc->sc_rdx, + (unsigned long) uc->sc_rdi, + (unsigned long) uc->sc_rsi, + (unsigned long) uc->sc_rbp, + (unsigned long) uc->sc_rsp, + (unsigned long) uc->sc_r8, + (unsigned long) uc->sc_r9, + (unsigned long) uc->sc_r10, + (unsigned long) uc->sc_r11, + (unsigned long) uc->sc_r12, + (unsigned long) uc->sc_r13, + (unsigned long) uc->sc_r14, + (unsigned long) uc->sc_r15, + (unsigned long) uc->sc_rip, + (unsigned long) uc->sc_rflags, + (unsigned long) uc->sc_cs + ); + logStackContent((void**)uc->sc_rsp); + #elif defined(__i386__) + serverLog(LL_WARNING, + "\n" + "EAX:%08lx EBX:%08lx ECX:%08lx EDX:%08lx\n" + "EDI:%08lx ESI:%08lx EBP:%08lx ESP:%08lx\n" + "SS :%08lx EFL:%08lx EIP:%08lx CS:%08lx\n" + "DS :%08lx ES :%08lx FS :%08lx GS:%08lx", + (unsigned long) uc->sc_eax, + (unsigned long) uc->sc_ebx, + (unsigned long) uc->sc_ebx, + (unsigned long) uc->sc_edx, + (unsigned long) uc->sc_edi, + (unsigned long) uc->sc_esi, + (unsigned long) uc->sc_ebp, + (unsigned long) uc->sc_esp, + (unsigned long) uc->sc_ss, + (unsigned long) uc->sc_eflags, + (unsigned long) uc->sc_eip, + (unsigned long) uc->sc_cs, + (unsigned long) uc->sc_es, + (unsigned long) uc->sc_fs, + (unsigned long) uc->sc_gs + ); + logStackContent((void**)uc->sc_esp); + #endif +#elif defined(__DragonFly__) + serverLog(LL_WARNING, + "\n" + "RAX:%016lx RBX:%016lx\nRCX:%016lx RDX:%016lx\n" + "RDI:%016lx RSI:%016lx\nRBP:%016lx RSP:%016lx\n" + "R8 :%016lx R9 :%016lx\nR10:%016lx R11:%016lx\n" + "R12:%016lx R13:%016lx\nR14:%016lx R15:%016lx\n" + "RIP:%016lx EFL:%016lx\nCSGSFS:%016lx", + (unsigned long) uc->uc_mcontext.mc_rax, + (unsigned long) uc->uc_mcontext.mc_rbx, + (unsigned long) uc->uc_mcontext.mc_rcx, + (unsigned long) uc->uc_mcontext.mc_rdx, + (unsigned long) uc->uc_mcontext.mc_rdi, + (unsigned long) uc->uc_mcontext.mc_rsi, + (unsigned long) uc->uc_mcontext.mc_rbp, + (unsigned long) uc->uc_mcontext.mc_rsp, + (unsigned long) uc->uc_mcontext.mc_r8, + (unsigned long) uc->uc_mcontext.mc_r9, + (unsigned long) uc->uc_mcontext.mc_r10, + (unsigned long) uc->uc_mcontext.mc_r11, + (unsigned long) uc->uc_mcontext.mc_r12, + (unsigned long) uc->uc_mcontext.mc_r13, + (unsigned long) uc->uc_mcontext.mc_r14, + (unsigned long) uc->uc_mcontext.mc_r15, + (unsigned long) uc->uc_mcontext.mc_rip, + (unsigned long) uc->uc_mcontext.mc_rflags, + (unsigned long) uc->uc_mcontext.mc_cs + ); + logStackContent((void**)uc->uc_mcontext.mc_rsp); #else serverLog(LL_WARNING, " Dumping of registers not supported for this OS/arch"); diff --git a/redis-android/src/main/jni/redis-5.0.2/src/debugmacro.h b/redis-android/src/main/jni/redis-5.0.3/src/debugmacro.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/debugmacro.h rename to redis-android/src/main/jni/redis-5.0.3/src/debugmacro.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/defrag.c b/redis-android/src/main/jni/redis-5.0.3/src/defrag.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/defrag.c rename to redis-android/src/main/jni/redis-5.0.3/src/defrag.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/dict.c b/redis-android/src/main/jni/redis-5.0.3/src/dict.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/dict.c rename to redis-android/src/main/jni/redis-5.0.3/src/dict.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/dict.h b/redis-android/src/main/jni/redis-5.0.3/src/dict.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/dict.h rename to redis-android/src/main/jni/redis-5.0.3/src/dict.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/endianconv.c b/redis-android/src/main/jni/redis-5.0.3/src/endianconv.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/endianconv.c rename to redis-android/src/main/jni/redis-5.0.3/src/endianconv.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/endianconv.h b/redis-android/src/main/jni/redis-5.0.3/src/endianconv.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/endianconv.h rename to redis-android/src/main/jni/redis-5.0.3/src/endianconv.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/evict.c b/redis-android/src/main/jni/redis-5.0.3/src/evict.c similarity index 98% rename from redis-android/src/main/jni/redis-5.0.2/src/evict.c rename to redis-android/src/main/jni/redis-5.0.3/src/evict.c index 39deb65..773916c 100644 --- a/redis-android/src/main/jni/redis-5.0.2/src/evict.c +++ b/redis-android/src/main/jni/redis-5.0.3/src/evict.c @@ -444,8 +444,8 @@ int getMaxmemoryState(size_t *total, size_t *logical, size_t *tofree, float *lev * Otehrwise if we are over the memory limit, but not enough memory * was freed to return back under the limit, the function returns C_ERR. */ int freeMemoryIfNeeded(void) { - /* By default slaves should ignore maxmemory and just be masters excat - * copies. */ + /* By default replicas should ignore maxmemory + * and just be masters exact copies. */ if (server.masterhost && server.repl_slave_ignore_maxmemory) return C_OK; size_t mem_reported, mem_tofree, mem_freed; @@ -622,3 +622,14 @@ int freeMemoryIfNeeded(void) { return C_ERR; } +/* This is a wrapper for freeMemoryIfNeeded() that only really calls the + * function if right now there are the conditions to do so safely: + * + * - There must be no script in timeout condition. + * - Nor we are loading data right now. + * + */ +int freeMemoryIfNeededAndSafe(void) { + if (server.lua_timedout || server.loading) return C_OK; + return freeMemoryIfNeeded(); +} diff --git a/redis-android/src/main/jni/redis-5.0.2/src/expire.c b/redis-android/src/main/jni/redis-5.0.3/src/expire.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/expire.c rename to redis-android/src/main/jni/redis-5.0.3/src/expire.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/fmacros.h b/redis-android/src/main/jni/redis-5.0.3/src/fmacros.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/fmacros.h rename to redis-android/src/main/jni/redis-5.0.3/src/fmacros.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/geo.c b/redis-android/src/main/jni/redis-5.0.3/src/geo.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/geo.c rename to redis-android/src/main/jni/redis-5.0.3/src/geo.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/geo.h b/redis-android/src/main/jni/redis-5.0.3/src/geo.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/geo.h rename to redis-android/src/main/jni/redis-5.0.3/src/geo.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/geohash.c b/redis-android/src/main/jni/redis-5.0.3/src/geohash.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/geohash.c rename to redis-android/src/main/jni/redis-5.0.3/src/geohash.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/geohash.h b/redis-android/src/main/jni/redis-5.0.3/src/geohash.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/geohash.h rename to redis-android/src/main/jni/redis-5.0.3/src/geohash.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/geohash_helper.c b/redis-android/src/main/jni/redis-5.0.3/src/geohash_helper.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/geohash_helper.c rename to redis-android/src/main/jni/redis-5.0.3/src/geohash_helper.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/geohash_helper.h b/redis-android/src/main/jni/redis-5.0.3/src/geohash_helper.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/geohash_helper.h rename to redis-android/src/main/jni/redis-5.0.3/src/geohash_helper.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/help.h b/redis-android/src/main/jni/redis-5.0.3/src/help.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/help.h rename to redis-android/src/main/jni/redis-5.0.3/src/help.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/hyperloglog.c b/redis-android/src/main/jni/redis-5.0.3/src/hyperloglog.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/hyperloglog.c rename to redis-android/src/main/jni/redis-5.0.3/src/hyperloglog.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/intset.c b/redis-android/src/main/jni/redis-5.0.3/src/intset.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/intset.c rename to redis-android/src/main/jni/redis-5.0.3/src/intset.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/intset.h b/redis-android/src/main/jni/redis-5.0.3/src/intset.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/intset.h rename to redis-android/src/main/jni/redis-5.0.3/src/intset.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/latency.c b/redis-android/src/main/jni/redis-5.0.3/src/latency.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/latency.c rename to redis-android/src/main/jni/redis-5.0.3/src/latency.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/latency.h b/redis-android/src/main/jni/redis-5.0.3/src/latency.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/latency.h rename to redis-android/src/main/jni/redis-5.0.3/src/latency.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/lazyfree.c b/redis-android/src/main/jni/redis-5.0.3/src/lazyfree.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/lazyfree.c rename to redis-android/src/main/jni/redis-5.0.3/src/lazyfree.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/listpack.c b/redis-android/src/main/jni/redis-5.0.3/src/listpack.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/listpack.c rename to redis-android/src/main/jni/redis-5.0.3/src/listpack.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/listpack.h b/redis-android/src/main/jni/redis-5.0.3/src/listpack.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/listpack.h rename to redis-android/src/main/jni/redis-5.0.3/src/listpack.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/listpack_malloc.h b/redis-android/src/main/jni/redis-5.0.3/src/listpack_malloc.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/listpack_malloc.h rename to redis-android/src/main/jni/redis-5.0.3/src/listpack_malloc.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/localtime.c b/redis-android/src/main/jni/redis-5.0.3/src/localtime.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/localtime.c rename to redis-android/src/main/jni/redis-5.0.3/src/localtime.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/lolwut.c b/redis-android/src/main/jni/redis-5.0.3/src/lolwut.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/lolwut.c rename to redis-android/src/main/jni/redis-5.0.3/src/lolwut.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/lolwut5.c b/redis-android/src/main/jni/redis-5.0.3/src/lolwut5.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/lolwut5.c rename to redis-android/src/main/jni/redis-5.0.3/src/lolwut5.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/lzf.h b/redis-android/src/main/jni/redis-5.0.3/src/lzf.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/lzf.h rename to redis-android/src/main/jni/redis-5.0.3/src/lzf.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/lzfP.h b/redis-android/src/main/jni/redis-5.0.3/src/lzfP.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/lzfP.h rename to redis-android/src/main/jni/redis-5.0.3/src/lzfP.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/lzf_c.c b/redis-android/src/main/jni/redis-5.0.3/src/lzf_c.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/lzf_c.c rename to redis-android/src/main/jni/redis-5.0.3/src/lzf_c.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/lzf_d.c b/redis-android/src/main/jni/redis-5.0.3/src/lzf_d.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/lzf_d.c rename to redis-android/src/main/jni/redis-5.0.3/src/lzf_d.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/memtest.c b/redis-android/src/main/jni/redis-5.0.3/src/memtest.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/memtest.c rename to redis-android/src/main/jni/redis-5.0.3/src/memtest.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/mkreleasehdr.sh b/redis-android/src/main/jni/redis-5.0.3/src/mkreleasehdr.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/mkreleasehdr.sh rename to redis-android/src/main/jni/redis-5.0.3/src/mkreleasehdr.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/src/module.c b/redis-android/src/main/jni/redis-5.0.3/src/module.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/module.c rename to redis-android/src/main/jni/redis-5.0.3/src/module.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/modules/.gitignore b/redis-android/src/main/jni/redis-5.0.3/src/modules/.gitignore similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/modules/.gitignore rename to redis-android/src/main/jni/redis-5.0.3/src/modules/.gitignore diff --git a/redis-android/src/main/jni/redis-5.0.2/src/modules/Makefile b/redis-android/src/main/jni/redis-5.0.3/src/modules/Makefile similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/modules/Makefile rename to redis-android/src/main/jni/redis-5.0.3/src/modules/Makefile diff --git a/redis-android/src/main/jni/redis-5.0.2/src/modules/gendoc.rb b/redis-android/src/main/jni/redis-5.0.3/src/modules/gendoc.rb similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/modules/gendoc.rb rename to redis-android/src/main/jni/redis-5.0.3/src/modules/gendoc.rb diff --git a/redis-android/src/main/jni/redis-5.0.2/src/modules/helloblock.c b/redis-android/src/main/jni/redis-5.0.3/src/modules/helloblock.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/modules/helloblock.c rename to redis-android/src/main/jni/redis-5.0.3/src/modules/helloblock.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/modules/hellocluster.c b/redis-android/src/main/jni/redis-5.0.3/src/modules/hellocluster.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/modules/hellocluster.c rename to redis-android/src/main/jni/redis-5.0.3/src/modules/hellocluster.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/modules/hellodict.c b/redis-android/src/main/jni/redis-5.0.3/src/modules/hellodict.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/modules/hellodict.c rename to redis-android/src/main/jni/redis-5.0.3/src/modules/hellodict.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/modules/hellotimer.c b/redis-android/src/main/jni/redis-5.0.3/src/modules/hellotimer.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/modules/hellotimer.c rename to redis-android/src/main/jni/redis-5.0.3/src/modules/hellotimer.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/modules/hellotype.c b/redis-android/src/main/jni/redis-5.0.3/src/modules/hellotype.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/modules/hellotype.c rename to redis-android/src/main/jni/redis-5.0.3/src/modules/hellotype.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/modules/helloworld.c b/redis-android/src/main/jni/redis-5.0.3/src/modules/helloworld.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/modules/helloworld.c rename to redis-android/src/main/jni/redis-5.0.3/src/modules/helloworld.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/modules/testmodule.c b/redis-android/src/main/jni/redis-5.0.3/src/modules/testmodule.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/modules/testmodule.c rename to redis-android/src/main/jni/redis-5.0.3/src/modules/testmodule.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/multi.c b/redis-android/src/main/jni/redis-5.0.3/src/multi.c similarity index 93% rename from redis-android/src/main/jni/redis-5.0.2/src/multi.c rename to redis-android/src/main/jni/redis-5.0.3/src/multi.c index 8159adc..5971f46 100644 --- a/redis-android/src/main/jni/redis-5.0.2/src/multi.c +++ b/redis-android/src/main/jni/redis-5.0.3/src/multi.c @@ -35,6 +35,7 @@ void initClientMultiState(client *c) { c->mstate.commands = NULL; c->mstate.count = 0; + c->mstate.cmd_flags = 0; } /* Release all the resources associated with MULTI/EXEC state */ @@ -67,6 +68,7 @@ void queueMultiCommand(client *c) { for (j = 0; j < c->argc; j++) incrRefCount(mc->argv[j]); c->mstate.count++; + c->mstate.cmd_flags |= c->cmd->flags; } void discardTransaction(client *c) { @@ -137,6 +139,21 @@ void execCommand(client *c) { goto handle_monitor; } + /* If there are write commands inside the transaction, and this is a read + * only slave, we want to send an error. This happens when the transaction + * was initiated when the instance was a master or a writable replica and + * then the configuration changed (for example instance was turned into + * a replica). */ + if (!server.loading && server.masterhost && server.repl_slave_ro && + !(c->flags & CLIENT_MASTER) && c->mstate.cmd_flags & CMD_WRITE) + { + addReplyError(c, + "Transaction contains write commands but instance " + "is now a read-only slave. EXEC aborted."); + discardTransaction(c); + goto handle_monitor; + } + /* Exec all the queued commands */ unwatchAllKeys(c); /* Unwatch ASAP otherwise we'll waste CPU cycles */ orig_argv = c->argv; diff --git a/redis-android/src/main/jni/redis-5.0.2/src/networking.c b/redis-android/src/main/jni/redis-5.0.3/src/networking.c similarity index 99% rename from redis-android/src/main/jni/redis-5.0.2/src/networking.c rename to redis-android/src/main/jni/redis-5.0.3/src/networking.c index 7d387da..74b857e 100644 --- a/redis-android/src/main/jni/redis-5.0.2/src/networking.c +++ b/redis-android/src/main/jni/redis-5.0.3/src/networking.c @@ -365,19 +365,13 @@ void addReplyErrorLength(client *c, const char *s, size_t len) { * Where the master must propagate the first change even if the second * will produce an error. However it is useful to log such events since * they are rare and may hint at errors in a script or a bug in Redis. */ - if (c->flags & (CLIENT_MASTER|CLIENT_SLAVE)) { + if (c->flags & (CLIENT_MASTER|CLIENT_SLAVE) && !(c->flags & CLIENT_MONITOR)) { char* to = c->flags & CLIENT_MASTER? "master": "replica"; char* from = c->flags & CLIENT_MASTER? "replica": "master"; char *cmdname = c->lastcmd ? c->lastcmd->name : ""; serverLog(LL_WARNING,"== CRITICAL == This %s is sending an error " "to its %s: '%s' after processing the command " "'%s'", from, to, s, cmdname); - /* Here we want to panic because when a master is sending an - * error to some slave in the context of replication, this can - * only create some kind of offset or data desynchronization. Better - * to catch it ASAP and crash instead of continuing. */ - if (c->flags & CLIENT_SLAVE) - serverPanic("Continuing is unsafe: replication protocol violation."); } } @@ -1470,7 +1464,7 @@ void processInputBuffer(client *c) { } /* Trim to pos */ - if (c->qb_pos) { + if (server.current_client != NULL && c->qb_pos) { sdsrange(c->querybuf,c->qb_pos,-1); c->qb_pos = 0; } diff --git a/redis-android/src/main/jni/redis-5.0.2/src/notify.c b/redis-android/src/main/jni/redis-5.0.3/src/notify.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/notify.c rename to redis-android/src/main/jni/redis-5.0.3/src/notify.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/object.c b/redis-android/src/main/jni/redis-5.0.3/src/object.c similarity index 99% rename from redis-android/src/main/jni/redis-5.0.2/src/object.c rename to redis-android/src/main/jni/redis-5.0.3/src/object.c index 87b32f4..48ffa42 100644 --- a/redis-android/src/main/jni/redis-5.0.2/src/object.c +++ b/redis-android/src/main/jni/redis-5.0.3/src/object.c @@ -1285,8 +1285,6 @@ NULL * * Usage: MEMORY usage */ void memoryCommand(client *c) { - robj *o; - if (!strcasecmp(c->argv[1]->ptr,"help") && c->argc == 2) { const char *help[] = { "DOCTOR - Return memory problems reports.", @@ -1298,6 +1296,7 @@ NULL }; addReplyHelp(c, help); } else if (!strcasecmp(c->argv[1]->ptr,"usage") && c->argc >= 3) { + dictEntry *de; long long samples = OBJ_COMPUTE_SIZE_DEF_SAMPLES; for (int j = 3; j < c->argc; j++) { if (!strcasecmp(c->argv[j]->ptr,"samples") && @@ -1316,10 +1315,12 @@ NULL return; } } - if ((o = objectCommandLookupOrReply(c,c->argv[2],shared.nullbulk)) - == NULL) return; - size_t usage = objectComputeSize(o,samples); - usage += sdsAllocSize(c->argv[2]->ptr); + if ((de = dictFind(c->db->dict,c->argv[2]->ptr)) == NULL) { + addReply(c, shared.nullbulk); + return; + } + size_t usage = objectComputeSize(dictGetVal(de),samples); + usage += sdsAllocSize(dictGetKey(de)); usage += sizeof(dictEntry); addReplyLongLong(c,usage); } else if (!strcasecmp(c->argv[1]->ptr,"stats") && c->argc == 2) { diff --git a/redis-android/src/main/jni/redis-5.0.2/src/pqsort.c b/redis-android/src/main/jni/redis-5.0.3/src/pqsort.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/pqsort.c rename to redis-android/src/main/jni/redis-5.0.3/src/pqsort.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/pqsort.h b/redis-android/src/main/jni/redis-5.0.3/src/pqsort.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/pqsort.h rename to redis-android/src/main/jni/redis-5.0.3/src/pqsort.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/pubsub.c b/redis-android/src/main/jni/redis-5.0.3/src/pubsub.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/pubsub.c rename to redis-android/src/main/jni/redis-5.0.3/src/pubsub.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/quicklist.c b/redis-android/src/main/jni/redis-5.0.3/src/quicklist.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/quicklist.c rename to redis-android/src/main/jni/redis-5.0.3/src/quicklist.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/quicklist.h b/redis-android/src/main/jni/redis-5.0.3/src/quicklist.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/quicklist.h rename to redis-android/src/main/jni/redis-5.0.3/src/quicklist.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/rand.c b/redis-android/src/main/jni/redis-5.0.3/src/rand.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/rand.c rename to redis-android/src/main/jni/redis-5.0.3/src/rand.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/rand.h b/redis-android/src/main/jni/redis-5.0.3/src/rand.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/rand.h rename to redis-android/src/main/jni/redis-5.0.3/src/rand.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/rax.c b/redis-android/src/main/jni/redis-5.0.3/src/rax.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/rax.c rename to redis-android/src/main/jni/redis-5.0.3/src/rax.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/rax.h b/redis-android/src/main/jni/redis-5.0.3/src/rax.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/rax.h rename to redis-android/src/main/jni/redis-5.0.3/src/rax.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/rax_malloc.h b/redis-android/src/main/jni/redis-5.0.3/src/rax_malloc.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/rax_malloc.h rename to redis-android/src/main/jni/redis-5.0.3/src/rax_malloc.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/rdb.c b/redis-android/src/main/jni/redis-5.0.3/src/rdb.c similarity index 99% rename from redis-android/src/main/jni/redis-5.0.2/src/rdb.c rename to redis-android/src/main/jni/redis-5.0.3/src/rdb.c index 3e43cb4..4755510 100644 --- a/redis-android/src/main/jni/redis-5.0.2/src/rdb.c +++ b/redis-android/src/main/jni/redis-5.0.3/src/rdb.c @@ -1645,6 +1645,9 @@ robj *rdbLoadObject(int rdbtype, rio *rdb) { * node: the entries inside the listpack itself are delta-encoded * relatively to this ID. */ sds nodekey = rdbGenericLoadStringObject(rdb,RDB_LOAD_SDS,NULL); + if (nodekey == NULL) { + rdbExitReportCorruptRDB("Stream master ID loading failed: invalid encoding or I/O error."); + } if (sdslen(nodekey) != sizeof(streamID)) { rdbExitReportCorruptRDB("Stream node key entry is not the " "size of a stream ID"); diff --git a/redis-android/src/main/jni/redis-5.0.2/src/rdb.h b/redis-android/src/main/jni/redis-5.0.3/src/rdb.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/rdb.h rename to redis-android/src/main/jni/redis-5.0.3/src/rdb.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/redis-benchmark.c b/redis-android/src/main/jni/redis-5.0.3/src/redis-benchmark.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/redis-benchmark.c rename to redis-android/src/main/jni/redis-5.0.3/src/redis-benchmark.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/redis-check-aof.c b/redis-android/src/main/jni/redis-5.0.3/src/redis-check-aof.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/redis-check-aof.c rename to redis-android/src/main/jni/redis-5.0.3/src/redis-check-aof.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/redis-check-rdb.c b/redis-android/src/main/jni/redis-5.0.3/src/redis-check-rdb.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/redis-check-rdb.c rename to redis-android/src/main/jni/redis-5.0.3/src/redis-check-rdb.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/redis-cli.c b/redis-android/src/main/jni/redis-5.0.3/src/redis-cli.c similarity index 94% rename from redis-android/src/main/jni/redis-5.0.2/src/redis-cli.c rename to redis-android/src/main/jni/redis-5.0.3/src/redis-cli.c index 28c842f..dabe433 100644 --- a/redis-android/src/main/jni/redis-5.0.2/src/redis-cli.c +++ b/redis-android/src/main/jni/redis-5.0.3/src/redis-cli.c @@ -67,6 +67,7 @@ #define REDIS_CLI_HISTFILE_DEFAULT ".rediscli_history" #define REDIS_CLI_RCFILE_ENV "REDISCLI_RCFILE" #define REDIS_CLI_RCFILE_DEFAULT ".redisclirc" +#define REDIS_CLI_AUTH_ENV "REDISCLI_AUTH" #define CLUSTER_MANAGER_SLOTS 16384 #define CLUSTER_MANAGER_MIGRATE_TIMEOUT 60000 @@ -116,6 +117,7 @@ #define CLUSTER_MANAGER_CMD_FLAG_REPLACE 1 << 6 #define CLUSTER_MANAGER_CMD_FLAG_COPY 1 << 7 #define CLUSTER_MANAGER_CMD_FLAG_COLOR 1 << 8 +#define CLUSTER_MANAGER_CMD_FLAG_CHECK_OWNERS 1 << 9 #define CLUSTER_MANAGER_OPT_GETFRIENDS 1 << 0 #define CLUSTER_MANAGER_OPT_COLD 1 << 1 @@ -1377,6 +1379,9 @@ static int parseOptions(int argc, char **argv) { } else if (!strcmp(argv[i],"--cluster-use-empty-masters")) { config.cluster_manager_command.flags |= CLUSTER_MANAGER_CMD_FLAG_EMPTYMASTER; + } else if (!strcmp(argv[i],"--cluster-search-multiple-owners")) { + config.cluster_manager_command.flags |= + CLUSTER_MANAGER_CMD_FLAG_CHECK_OWNERS; } else if (!strcmp(argv[i],"-v") || !strcmp(argv[i], "--version")) { sds version = cliVersion(); printf("redis-cli %s\n", version); @@ -1419,6 +1424,14 @@ static int parseOptions(int argc, char **argv) { return i; } +static void parseEnv() { + /* Set auth from env, but do not overwrite CLI arguments if passed */ + char *auth = getenv(REDIS_CLI_AUTH_ENV); + if (auth != NULL && config.auth == NULL) { + config.auth = auth; + } +} + static sds readArgFromStdin(void) { char buf[1024]; sds arg = sdsempty(); @@ -1446,6 +1459,9 @@ static void usage(void) { " -p Server port (default: 6379).\n" " -s Server socket (overrides hostname and port).\n" " -a Password to use when connecting to the server.\n" +" You can also use the " REDIS_CLI_AUTH_ENV " environment\n" +" variable to pass this password more safely\n" +" (if both are used, this argument takes predecence).\n" " -u Server URI.\n" " -r Execute specified command N times.\n" " -i When -r is used, waits seconds per command.\n" @@ -1834,7 +1850,7 @@ static int evalMode(int argc, char **argv) { if (eval_ldb) { if (!config.eval_ldb) { /* If the debugging session ended immediately, there was an - * error compiling the script. Show it and don't enter + * error compiling the script. Show it and they don't enter * the REPL at all. */ printf("Eval debugging session can't start:\n"); cliReadReply(0); @@ -1917,6 +1933,7 @@ static dictType clusterManagerDictType = { }; typedef int clusterManagerCommandProc(int argc, char **argv); +typedef int (*clusterManagerOnReplyError)(redisReply *reply, int bulk_idx); /* Cluster Manager helper functions */ @@ -1978,14 +1995,17 @@ typedef struct clusterManagerCommandDef { clusterManagerCommandDef clusterManagerCommands[] = { {"create", clusterManagerCommandCreate, -2, "host1:port1 ... hostN:portN", "replicas "}, - {"check", clusterManagerCommandCheck, -1, "host:port", NULL}, + {"check", clusterManagerCommandCheck, -1, "host:port", + "search-multiple-owners"}, {"info", clusterManagerCommandInfo, -1, "host:port", NULL}, - {"fix", clusterManagerCommandFix, -1, "host:port", NULL}, + {"fix", clusterManagerCommandFix, -1, "host:port", + "search-multiple-owners"}, {"reshard", clusterManagerCommandReshard, -1, "host:port", - "from ,to ,slots ,yes,timeout ,pipeline "}, + "from ,to ,slots ,yes,timeout ,pipeline ," + "replace"}, {"rebalance", clusterManagerCommandRebalance, -1, "host:port", "weight ,use-empty-masters," - "timeout ,simulate,pipeline ,threshold "}, + "timeout ,simulate,pipeline ,threshold ,replace"}, {"add-node", clusterManagerCommandAddNode, 2, "new_host:new_port existing_host:existing_port", "slave,master-id "}, {"del-node", clusterManagerCommandDeleteNode, 2, "host:port node_id",NULL}, @@ -2176,6 +2196,44 @@ static int clusterManagerCheckRedisReply(clusterManagerNode *n, return 1; } +/* Execute MULTI command on a cluster node. */ +static int clusterManagerStartTransaction(clusterManagerNode *node) { + redisReply *reply = CLUSTER_MANAGER_COMMAND(node, "MULTI"); + int success = clusterManagerCheckRedisReply(node, reply, NULL); + if (reply) freeReplyObject(reply); + return success; +} + +/* Execute EXEC command on a cluster node. */ +static int clusterManagerExecTransaction(clusterManagerNode *node, + clusterManagerOnReplyError onerror) +{ + redisReply *reply = CLUSTER_MANAGER_COMMAND(node, "EXEC"); + int success = clusterManagerCheckRedisReply(node, reply, NULL); + if (success) { + if (reply->type != REDIS_REPLY_ARRAY) { + success = 0; + goto cleanup; + } + size_t i; + for (i = 0; i < reply->elements; i++) { + redisReply *r = reply->element[i]; + char *err = NULL; + success = clusterManagerCheckRedisReply(node, r, &err); + if (!success && onerror) success = onerror(r, i); + if (err) { + if (!success) + CLUSTER_MANAGER_PRINT_REPLY_ERROR(node, err); + zfree(err); + } + if (!success) break; + } + } +cleanup: + if (reply) freeReplyObject(reply); + return success; +} + static int clusterManagerNodeConnect(clusterManagerNode *node) { if (node->context) redisFree(node->context); node->context = redisConnect(node->ip, node->port); @@ -2734,6 +2792,84 @@ static int clusterManagerSetSlot(clusterManagerNode *node1, return success; } +static int clusterManagerClearSlotStatus(clusterManagerNode *node, int slot) { + redisReply *reply = CLUSTER_MANAGER_COMMAND(node, + "CLUSTER SETSLOT %d %s", slot, "STABLE"); + int success = clusterManagerCheckRedisReply(node, reply, NULL); + if (reply) freeReplyObject(reply); + return success; +} + +static int clusterManagerDelSlot(clusterManagerNode *node, int slot, + int ignore_unassigned_err) +{ + redisReply *reply = CLUSTER_MANAGER_COMMAND(node, + "CLUSTER DELSLOTS %d", slot); + char *err = NULL; + int success = clusterManagerCheckRedisReply(node, reply, &err); + if (!success && reply && reply->type == REDIS_REPLY_ERROR && + ignore_unassigned_err && + strstr(reply->str, "already unassigned") != NULL) success = 1; + if (!success && err != NULL) { + CLUSTER_MANAGER_PRINT_REPLY_ERROR(node, err); + zfree(err); + } + if (reply) freeReplyObject(reply); + return success; +} + +static int clusterManagerAddSlot(clusterManagerNode *node, int slot) { + redisReply *reply = CLUSTER_MANAGER_COMMAND(node, + "CLUSTER ADDSLOTS %d", slot); + int success = clusterManagerCheckRedisReply(node, reply, NULL); + if (reply) freeReplyObject(reply); + return success; +} + +static signed int clusterManagerCountKeysInSlot(clusterManagerNode *node, + int slot) +{ + redisReply *reply = CLUSTER_MANAGER_COMMAND(node, + "CLUSTER COUNTKEYSINSLOT %d", slot); + int count = -1; + int success = clusterManagerCheckRedisReply(node, reply, NULL); + if (success && reply->type == REDIS_REPLY_INTEGER) count = reply->integer; + if (reply) freeReplyObject(reply); + return count; +} + +static int clusterManagerBumpEpoch(clusterManagerNode *node) { + redisReply *reply = CLUSTER_MANAGER_COMMAND(node, "CLUSTER BUMPEPOCH"); + int success = clusterManagerCheckRedisReply(node, reply, NULL); + if (reply) freeReplyObject(reply); + return success; +} + +static int clusterManagerIgnoreUnassignedErr(redisReply *reply, int bulk_idx) { + if (bulk_idx == 0 && reply) { + if (reply->type == REDIS_REPLY_ERROR) + return strstr(reply->str, "already unassigned") != NULL; + } + return 0; +} + +static int clusterManagerSetSlotOwner(clusterManagerNode *owner, + int slot, + int do_clear) +{ + int success = clusterManagerStartTransaction(owner); + if (!success) return 0; + /* Ensure the slot is not already assigned. */ + clusterManagerDelSlot(owner, slot, 1); + /* Add the slot and bump epoch. */ + clusterManagerAddSlot(owner, slot); + if (do_clear) clusterManagerClearSlotStatus(owner, slot); + clusterManagerBumpEpoch(owner); + success = clusterManagerExecTransaction(owner, + clusterManagerIgnoreUnassignedErr); + return success; +} + /* Migrate keys taken from reply->elements. It returns the reply from the * MIGRATE command, or NULL if something goes wrong. If the argument 'dots' * is not NULL, a dot will be printed for every migrated key. */ @@ -2814,8 +2950,8 @@ static int clusterManagerMigrateKeysInSlot(clusterManagerNode *source, char **err) { int success = 1; - int do_fix = (config.cluster_manager_command.flags & - CLUSTER_MANAGER_CMD_FLAG_FIX); + int replace_existing_keys = (config.cluster_manager_command.flags & + (CLUSTER_MANAGER_CMD_FLAG_FIX | CLUSTER_MANAGER_CMD_FLAG_REPLACE)); while (1) { char *dots = NULL; redisReply *reply = NULL, *migrate_reply = NULL; @@ -2846,13 +2982,14 @@ static int clusterManagerMigrateKeysInSlot(clusterManagerNode *source, dots); if (migrate_reply == NULL) goto next; if (migrate_reply->type == REDIS_REPLY_ERROR) { - if (do_fix && strstr(migrate_reply->str, "BUSYKEY")) { + int is_busy = strstr(migrate_reply->str, "BUSYKEY") != NULL; + int not_served = strstr(migrate_reply->str, "slot not served") != NULL; + if (replace_existing_keys && (is_busy || not_served)) { /* If the key already exists, try to migrate keys * adding REPLACE option. * If the key's slot is not served, try to assign slot * to the target node. */ - int is_busy = (strstr(migrate_reply->str, "BUSYKEY") != NULL); - if (strstr(migrate_reply->str, "slot not served") != NULL) + if (not_served) clusterManagerSetSlot(source, target, slot, "node", NULL); clusterManagerLogWarn("*** Target key exists. " "Replacing it for FIX.\n"); @@ -3505,6 +3642,34 @@ static clusterManagerNode *clusterManagerNodeWithLeastReplicas() { return node; } +/* This fucntion returns a random master node, return NULL if none */ + +static clusterManagerNode *clusterManagerNodeMasterRandom() { + int master_count = 0; + int idx; + listIter li; + listNode *ln; + listRewind(cluster_manager.nodes, &li); + while ((ln = listNext(&li)) != NULL) { + clusterManagerNode *n = ln->value; + if (n->flags & CLUSTER_MANAGER_FLAG_SLAVE) continue; + master_count++; + } + + srand(time(NULL)); + idx = rand() % master_count; + listRewind(cluster_manager.nodes, &li); + while ((ln = listNext(&li)) != NULL) { + clusterManagerNode *n = ln->value; + if (n->flags & CLUSTER_MANAGER_FLAG_SLAVE) continue; + if (!idx--) { + return n; + } + } + /* Can not be reached */ + return NULL; +} + static int clusterManagerFixSlotsCoverage(char *all_slots) { int i, fixed = 0; list *none = NULL, *single = NULL, *multi = NULL; @@ -3577,33 +3742,22 @@ static int clusterManagerFixSlotsCoverage(char *all_slots) { "across the cluster:\n"); clusterManagerPrintSlotsList(none); if (confirmWithYes("Fix these slots by covering with a random node?")){ - srand(time(NULL)); listIter li; listNode *ln; listRewind(none, &li); while ((ln = listNext(&li)) != NULL) { sds slot = ln->value; - long idx = (long) (rand() % listLength(cluster_manager.nodes)); - listNode *node_n = listIndex(cluster_manager.nodes, idx); - assert(node_n != NULL); - clusterManagerNode *n = node_n->value; + int s = atoi(slot); + clusterManagerNode *n = clusterManagerNodeMasterRandom(); clusterManagerLogInfo(">>> Covering slot %s with %s:%d\n", slot, n->ip, n->port); - /* Ensure the slot is not already assigned. */ - redisReply *r = CLUSTER_MANAGER_COMMAND(n, - "CLUSTER DELSLOTS %s", slot); - if (r) freeReplyObject(r); - r = CLUSTER_MANAGER_COMMAND(n, - "CLUSTER ADDSLOTS %s", slot); - if (!clusterManagerCheckRedisReply(n, r, NULL)) fixed = -1; - if (r) freeReplyObject(r); - r = CLUSTER_MANAGER_COMMAND(n, "CLUSTER BUMPEPOCH"); - if (!clusterManagerCheckRedisReply(n, r, NULL)) fixed = -1; - if (r) freeReplyObject(r); - if (fixed < 0) goto cleanup; + if (!clusterManagerSetSlotOwner(n, s, 0)) { + fixed = -1; + goto cleanup; + } /* Since CLUSTER ADDSLOTS succeeded, we also update the slot * info into the node struct, in order to keep it synced */ - n->slots[atoi(slot)] = 1; + n->slots[s] = 1; fixed++; } } @@ -3611,7 +3765,7 @@ static int clusterManagerFixSlotsCoverage(char *all_slots) { /* Handle case "2": keys only in one node. */ if (listLength(single) > 0) { - printf("The following uncovered slots have keys in just one node:\n"); + printf("The following uncovered slots have keys in just one node:\n"); clusterManagerPrintSlotsList(single); if (confirmWithYes("Fix these slots by covering with those nodes?")){ listIter li; @@ -3619,6 +3773,7 @@ static int clusterManagerFixSlotsCoverage(char *all_slots) { listRewind(single, &li); while ((ln = listNext(&li)) != NULL) { sds slot = ln->value; + int s = atoi(slot); dictEntry *entry = dictFind(clusterManagerUncoveredSlots, slot); assert(entry != NULL); list *nodes = (list *) dictGetVal(entry); @@ -3627,18 +3782,10 @@ static int clusterManagerFixSlotsCoverage(char *all_slots) { clusterManagerNode *n = fn->value; clusterManagerLogInfo(">>> Covering slot %s with %s:%d\n", slot, n->ip, n->port); - /* Ensure the slot is not already assigned. */ - redisReply *r = CLUSTER_MANAGER_COMMAND(n, - "CLUSTER DELSLOTS %s", slot); - if (r) freeReplyObject(r); - r = CLUSTER_MANAGER_COMMAND(n, - "CLUSTER ADDSLOTS %s", slot); - if (!clusterManagerCheckRedisReply(n, r, NULL)) fixed = -1; - if (r) freeReplyObject(r); - r = CLUSTER_MANAGER_COMMAND(n, "CLUSTER BUMPEPOCH"); - if (!clusterManagerCheckRedisReply(n, r, NULL)) fixed = -1; - if (r) freeReplyObject(r); - if (fixed < 0) goto cleanup; + if (!clusterManagerSetSlotOwner(n, s, 0)) { + fixed = -1; + goto cleanup; + } /* Since CLUSTER ADDSLOTS succeeded, we also update the slot * info into the node struct, in order to keep it synced */ n->slots[atoi(slot)] = 1; @@ -3671,23 +3818,10 @@ static int clusterManagerFixSlotsCoverage(char *all_slots) { clusterManagerLogInfo(">>> Covering slot %s moving keys " "to %s:%d\n", slot, target->ip, target->port); - /* Ensure the slot is not already assigned. */ - redisReply *r = CLUSTER_MANAGER_COMMAND(target, - "CLUSTER DELSLOTS %s", slot); - if (r) freeReplyObject(r); - r = CLUSTER_MANAGER_COMMAND(target, - "CLUSTER ADDSLOTS %s", slot); - if (!clusterManagerCheckRedisReply(target, r, NULL)) fixed = -1; - if (r) freeReplyObject(r); - if (fixed < 0) goto cleanup; - r = CLUSTER_MANAGER_COMMAND(target, - "CLUSTER SETSLOT %s %s", slot, "STABLE"); - if (!clusterManagerCheckRedisReply(target, r, NULL)) fixed = -1; - if (r) freeReplyObject(r); - r = CLUSTER_MANAGER_COMMAND(target, "CLUSTER BUMPEPOCH"); - if (!clusterManagerCheckRedisReply(target, r, NULL)) fixed = -1; - if (r) freeReplyObject(r); - if (fixed < 0) goto cleanup; + if (!clusterManagerSetSlotOwner(target, s, 1)) { + fixed = -1; + goto cleanup; + } /* Since CLUSTER ADDSLOTS succeeded, we also update the slot * info into the node struct, in order to keep it synced */ target->slots[atoi(slot)] = 1; @@ -3698,23 +3832,15 @@ static int clusterManagerFixSlotsCoverage(char *all_slots) { clusterManagerNode *src = nln->value; if (src == target) continue; /* Assign the slot to target node in the source node. */ - redisReply *r = CLUSTER_MANAGER_COMMAND(src, - "CLUSTER SETSLOT %s %s %s", slot, - "NODE", target->name); - if (!clusterManagerCheckRedisReply(src, r, NULL)) + if (!clusterManagerSetSlot(src, target, s, "NODE", NULL)) fixed = -1; - if (r) freeReplyObject(r); if (fixed < 0) goto cleanup; /* Set the source node in 'importing' state * (even if we will actually migrate keys away) * in order to avoid receiving redirections * for MIGRATE. */ - r = CLUSTER_MANAGER_COMMAND(src, - "CLUSTER SETSLOT %s %s %s", slot, - "IMPORTING", target->name); - if (!clusterManagerCheckRedisReply(src, r, NULL)) - fixed = -1; - if (r) freeReplyObject(r); + if (!clusterManagerSetSlot(src, target, s, + "IMPORTING", NULL)) fixed = -1; if (fixed < 0) goto cleanup; int opts = CLUSTER_MANAGER_OPT_VERBOSE | CLUSTER_MANAGER_OPT_COLD; @@ -3722,12 +3848,8 @@ static int clusterManagerFixSlotsCoverage(char *all_slots) { fixed = -1; goto cleanup; } - r = CLUSTER_MANAGER_COMMAND(src, - "CLUSTER SETSLOT %s %s", slot, - "STABLE"); - if (!clusterManagerCheckRedisReply(src, r, NULL)) + if (!clusterManagerClearSlotStatus(src, s)) fixed = -1; - if (r) freeReplyObject(r); if (fixed < 0) goto cleanup; } fixed++; @@ -3851,24 +3973,9 @@ static int clusterManagerFixOpenSlot(int slot) { // Use ADDSLOTS to assign the slot. clusterManagerLogWarn("*** Configuring %s:%d as the slot owner\n", owner->ip, owner->port); - redisReply *reply = CLUSTER_MANAGER_COMMAND(owner, "CLUSTER " - "SETSLOT %d %s", - slot, "STABLE"); - success = clusterManagerCheckRedisReply(owner, reply, NULL); - if (reply) freeReplyObject(reply); - if (!success) goto cleanup; - /* Ensure that the slot is unassigned before assigning it to the - * owner. */ - reply = CLUSTER_MANAGER_COMMAND(owner, "CLUSTER DELSLOTS %d", slot); - success = clusterManagerCheckRedisReply(owner, reply, NULL); - /* Ignore "already unassigned" error. */ - if (!success && reply && reply->type == REDIS_REPLY_ERROR && - strstr(reply->str, "already unassigned") != NULL) success = 1; - if (reply) freeReplyObject(reply); + success = clusterManagerClearSlotStatus(owner, slot); if (!success) goto cleanup; - reply = CLUSTER_MANAGER_COMMAND(owner, "CLUSTER ADDSLOTS %d", slot); - success = clusterManagerCheckRedisReply(owner, reply, NULL); - if (reply) freeReplyObject(reply); + success = clusterManagerSetSlotOwner(owner, slot, 0); if (!success) goto cleanup; /* Since CLUSTER ADDSLOTS succeeded, we also update the slot * info into the node struct, in order to keep it synced */ @@ -3876,9 +3983,7 @@ static int clusterManagerFixOpenSlot(int slot) { /* Make sure this information will propagate. Not strictly needed * since there is no past owner, so all the other nodes will accept * whatever epoch this node will claim the slot with. */ - reply = CLUSTER_MANAGER_COMMAND(owner, "CLUSTER BUMPEPOCH"); - success = clusterManagerCheckRedisReply(owner, reply, NULL); - if (reply) freeReplyObject(reply); + success = clusterManagerBumpEpoch(owner); if (!success) goto cleanup; /* Remove the owner from the list of migrating/importing * nodes. */ @@ -3898,16 +4003,10 @@ static int clusterManagerFixOpenSlot(int slot) { * the owner has been set in the previous condition (owner == NULL). */ assert(owner != NULL); listRewind(owners, &li); - redisReply *reply = NULL; while ((ln = listNext(&li)) != NULL) { clusterManagerNode *n = ln->value; if (n == owner) continue; - reply = CLUSTER_MANAGER_COMMAND(n, "CLUSTER DELSLOTS %d", slot); - success = clusterManagerCheckRedisReply(n, reply, NULL); - /* Ignore "already unassigned" error. */ - if (!success && reply && reply->type == REDIS_REPLY_ERROR && - strstr(reply->str, "already unassigned") != NULL) success = 1; - if (reply) freeReplyObject(reply); + success = clusterManagerDelSlot(n, slot, 1); if (!success) goto cleanup; n->slots[slot] = 0; /* Assign the slot to the owner in the node 'n' configuration.' */ @@ -3931,6 +4030,7 @@ static int clusterManagerFixOpenSlot(int slot) { clusterManagerLogInfo(">>> Case 1: Moving slot %d from " "%s:%d to %s:%d\n", slot, src->ip, src->port, dst->ip, dst->port); + move_opts |= CLUSTER_MANAGER_OPT_UPDATE; success = clusterManagerMoveSlot(src, dst, slot, move_opts, NULL); } /* Case 2: There are multiple nodes that claim the slot as importing, @@ -3949,11 +4049,7 @@ static int clusterManagerFixOpenSlot(int slot) { if (!success) goto cleanup; clusterManagerLogInfo(">>> Setting %d as STABLE in " "%s:%d\n", slot, n->ip, n->port); - - redisReply *r = CLUSTER_MANAGER_COMMAND(n, "CLUSTER SETSLOT %d %s", - slot, "STABLE"); - success = clusterManagerCheckRedisReply(n, r, NULL); - if (r) freeReplyObject(r); + success = clusterManagerClearSlotStatus(n, slot); if (!success) goto cleanup; } /* Since the slot has been moved in "cold" mode, ensure that all the @@ -3963,12 +4059,76 @@ static int clusterManagerFixOpenSlot(int slot) { clusterManagerNode *n = ln->value; if (n == owner) continue; if (n->flags & CLUSTER_MANAGER_FLAG_SLAVE) continue; - redisReply *r = CLUSTER_MANAGER_COMMAND(n, - "CLUSTER SETSLOT %d %s %s", slot, "NODE", owner->name); - success = clusterManagerCheckRedisReply(n, r, NULL); - if (r) freeReplyObject(r); + success = clusterManagerSetSlot(n, owner, slot, "NODE", NULL); if (!success) goto cleanup; } + } + /* Case 3: The slot is in migrating state in one node but multiple + * other nodes claim to be in importing state and don't have any key in + * the slot. We search for the importing node having the same ID as + * the destination node of the migrating node. + * In that case we move the slot from the migrating node to this node and + * we close the importing states on all the other importing nodes. + * If no importing node has the same ID as the destination node of the + * migrating node, the slot's state is closed on both the migrating node + * and the importing nodes. */ + else if (listLength(migrating) == 1 && listLength(importing) > 1) { + int try_to_fix = 1; + clusterManagerNode *src = listFirst(migrating)->value; + clusterManagerNode *dst = NULL; + sds target_id = NULL; + for (int i = 0; i < src->migrating_count; i += 2) { + sds migrating_slot = src->migrating[i]; + if (atoi(migrating_slot) == slot) { + target_id = src->migrating[i + 1]; + break; + } + } + assert(target_id != NULL); + listIter li; + listNode *ln; + listRewind(importing, &li); + while ((ln = listNext(&li)) != NULL) { + clusterManagerNode *n = ln->value; + int count = clusterManagerCountKeysInSlot(n, slot); + if (count > 0) { + try_to_fix = 0; + break; + } + if (strcmp(n->name, target_id) == 0) dst = n; + } + if (!try_to_fix) goto unhandled_case; + if (dst != NULL) { + clusterManagerLogInfo(">>> Case 3: Moving slot %d from %s:%d to " + "%s:%d and closing it on all the other " + "importing nodes.\n", + slot, src->ip, src->port, + dst->ip, dst->port); + /* Move the slot to the destination node. */ + success = clusterManagerMoveSlot(src, dst, slot, move_opts, NULL); + if (!success) goto cleanup; + /* Close slot on all the other importing nodes. */ + listRewind(importing, &li); + while ((ln = listNext(&li)) != NULL) { + clusterManagerNode *n = ln->value; + if (dst == n) continue; + success = clusterManagerClearSlotStatus(n, slot); + if (!success) goto cleanup; + } + } else { + clusterManagerLogInfo(">>> Case 3: Closing slot %d on both " + "migrating and importing nodes.\n", slot); + /* Close the slot on both the migrating node and the importing + * nodes. */ + success = clusterManagerClearSlotStatus(src, slot); + if (!success) goto cleanup; + listRewind(importing, &li); + while ((ln = listNext(&li)) != NULL) { + clusterManagerNode *n = ln->value; + success = clusterManagerClearSlotStatus(n, slot); + if (!success) goto cleanup; + } + } } else { int try_to_close_slot = (listLength(importing) == 0 && listLength(migrating) == 1); @@ -3985,13 +4145,13 @@ static int clusterManagerFixOpenSlot(int slot) { if (!success) goto cleanup; } } - /* Case 3: There are no slots claiming to be in importing state, but - * there is a migrating node that actually don't have any key or is the - * slot owner. We can just close the slot, probably a reshard interrupted - * in the middle. */ + /* Case 4: There are no slots claiming to be in importing state, but + * there is a migrating node that actually don't have any key or is the + * slot owner. We can just close the slot, probably a reshard + * interrupted in the middle. */ if (try_to_close_slot) { clusterManagerNode *n = listFirst(migrating)->value; - clusterManagerLogInfo(">>> Case 3: Closing slot %d on %s:%d\n", + clusterManagerLogInfo(">>> Case 4: Closing slot %d on %s:%d\n", slot, n->ip, n->port); redisReply *r = CLUSTER_MANAGER_COMMAND(n, "CLUSTER SETSLOT %d %s", slot, "STABLE"); @@ -3999,6 +4159,7 @@ static int clusterManagerFixOpenSlot(int slot) { if (r) freeReplyObject(r); if (!success) goto cleanup; } else { +unhandled_case: success = 0; clusterManagerLogErr("[ERR] Sorry, redis-cli can't fix this slot " "yet (work in progress). Slot is set as " @@ -4016,17 +4177,55 @@ static int clusterManagerFixOpenSlot(int slot) { return success; } +static int clusterManagerFixMultipleSlotOwners(int slot, list *owners) { + clusterManagerLogInfo(">>> Fixing multiple owners for slot %d...\n", slot); + int success = 0; + assert(listLength(owners) > 1); + clusterManagerNode *owner = clusterManagerGetNodeWithMostKeysInSlot(owners, + slot, + NULL); + if (!owner) owner = listFirst(owners)->value; + clusterManagerLogInfo(">>> Setting slot %d owner: %s:%d\n", + slot, owner->ip, owner->port); + /* Set the slot owner. */ + if (!clusterManagerSetSlotOwner(owner, slot, 0)) return 0; + listIter li; + listNode *ln; + listRewind(cluster_manager.nodes, &li); + /* Update configuration in all the other master nodes by assigning the slot + * itself to the new owner, and by eventually migrating keys if the node + * has keys for the slot. */ + while ((ln = listNext(&li)) != NULL) { + clusterManagerNode *n = ln->value; + if (n == owner) continue; + if (n->flags & CLUSTER_MANAGER_FLAG_SLAVE) continue; + int count = clusterManagerCountKeysInSlot(n, slot); + success = (count >= 0); + if (!success) break; + clusterManagerDelSlot(n, slot, 1); + if (!clusterManagerSetSlot(n, owner, slot, "node", NULL)) return 0; + if (count > 0) { + int opts = CLUSTER_MANAGER_OPT_VERBOSE | + CLUSTER_MANAGER_OPT_COLD; + success = clusterManagerMoveSlot(n, owner, slot, opts, NULL); + if (!success) break; + } + } + return success; +} + static int clusterManagerCheckCluster(int quiet) { listNode *ln = listFirst(cluster_manager.nodes); if (!ln) return 0; - int result = 1; - int do_fix = config.cluster_manager_command.flags & - CLUSTER_MANAGER_CMD_FLAG_FIX; clusterManagerNode *node = ln->value; clusterManagerLogInfo(">>> Performing Cluster Check (using node %s:%d)\n", node->ip, node->port); + int result = 1, consistent = 0; + int do_fix = config.cluster_manager_command.flags & + CLUSTER_MANAGER_CMD_FLAG_FIX; if (!quiet) clusterManagerShowNodes(); - if (!clusterManagerIsConfigConsistent()) { + consistent = clusterManagerIsConfigConsistent(); + if (!consistent) { sds err = sdsnew("[ERR] Nodes don't agree about configuration!"); clusterManagerOnError(err); result = 0; @@ -4034,7 +4233,7 @@ static int clusterManagerCheckCluster(int quiet) { clusterManagerLogOk("[OK] All nodes agree about slots " "configuration.\n"); } - // Check open slots + /* Check open slots */ clusterManagerLogInfo(">>> Check for open slots...\n"); listIter li; listRewind(cluster_manager.nodes, &li); @@ -4093,7 +4292,7 @@ static int clusterManagerCheckCluster(int quiet) { clusterManagerLogErr("%s.\n", (char *) errstr); sdsfree(errstr); if (do_fix) { - // Fix open slots. + /* Fix open slots. */ dictReleaseIterator(iter); iter = dictGetIterator(open_slots); while ((entry = dictNext(iter)) != NULL) { @@ -4128,6 +4327,51 @@ static int clusterManagerCheckCluster(int quiet) { if (fixed > 0) result = 1; } } + int search_multiple_owners = config.cluster_manager_command.flags & + CLUSTER_MANAGER_CMD_FLAG_CHECK_OWNERS; + if (search_multiple_owners) { + /* Check whether there are multiple owners, even when slots are + * fully covered and there are no open slots. */ + clusterManagerLogInfo(">>> Check for multiple slot owners...\n"); + int slot = 0; + for (; slot < CLUSTER_MANAGER_SLOTS; slot++) { + listIter li; + listNode *ln; + listRewind(cluster_manager.nodes, &li); + list *owners = listCreate(); + while ((ln = listNext(&li)) != NULL) { + clusterManagerNode *n = ln->value; + if (n->flags & CLUSTER_MANAGER_FLAG_SLAVE) continue; + if (n->slots[slot]) listAddNodeTail(owners, n); + else { + /* Nodes having keys for the slot will be considered + * owners too. */ + int count = clusterManagerCountKeysInSlot(n, slot); + if (count > 0) listAddNodeTail(owners, n); + } + } + if (listLength(owners) > 1) { + result = 0; + clusterManagerLogErr("[WARNING] Slot %d has %d owners:\n", + slot, listLength(owners)); + listRewind(owners, &li); + while ((ln = listNext(&li)) != NULL) { + clusterManagerNode *n = ln->value; + clusterManagerLogErr(" %s:%d\n", n->ip, n->port); + } + if (do_fix) { + result = clusterManagerFixMultipleSlotOwners(slot, owners); + if (!result) { + clusterManagerLogErr("Failed to fix multiple owners " + "for slot %d\n", slot); + listRelease(owners); + break; + } + } + } + listRelease(owners); + } + } return result; } @@ -5380,7 +5624,7 @@ static int clusterManagerCommandCall(int argc, char **argv) { if (status != REDIS_OK || reply == NULL ) printf("%s:%d: Failed!\n", n->ip, n->port); else { - sds formatted_reply = cliFormatReplyTTY(reply, ""); + sds formatted_reply = cliFormatReplyRaw(reply); printf("%s:%d: %s\n", n->ip, n->port, (char *) formatted_reply); sdsfree(formatted_reply); } @@ -6757,6 +7001,8 @@ int main(int argc, char **argv) { argc -= firstarg; argv += firstarg; + parseEnv(); + /* Cluster Manager mode */ if (CLUSTER_MANAGER_MODE()) { clusterManagerCommandProc *proc = validateClusterManagerCommand(); diff --git a/redis-android/src/main/jni/redis-5.0.2/src/redis-trib.rb b/redis-android/src/main/jni/redis-5.0.3/src/redis-trib.rb similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/redis-trib.rb rename to redis-android/src/main/jni/redis-5.0.3/src/redis-trib.rb diff --git a/redis-android/src/main/jni/redis-5.0.2/src/redisassert.h b/redis-android/src/main/jni/redis-5.0.3/src/redisassert.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/redisassert.h rename to redis-android/src/main/jni/redis-5.0.3/src/redisassert.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/redismodule.h b/redis-android/src/main/jni/redis-5.0.3/src/redismodule.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/redismodule.h rename to redis-android/src/main/jni/redis-5.0.3/src/redismodule.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/release.c b/redis-android/src/main/jni/redis-5.0.3/src/release.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/release.c rename to redis-android/src/main/jni/redis-5.0.3/src/release.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/replication.c b/redis-android/src/main/jni/redis-5.0.3/src/replication.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/replication.c rename to redis-android/src/main/jni/redis-5.0.3/src/replication.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/rio.c b/redis-android/src/main/jni/redis-5.0.3/src/rio.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/rio.c rename to redis-android/src/main/jni/redis-5.0.3/src/rio.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/rio.h b/redis-android/src/main/jni/redis-5.0.3/src/rio.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/rio.h rename to redis-android/src/main/jni/redis-5.0.3/src/rio.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/scripting.c b/redis-android/src/main/jni/redis-5.0.3/src/scripting.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/scripting.c rename to redis-android/src/main/jni/redis-5.0.3/src/scripting.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/sds.c b/redis-android/src/main/jni/redis-5.0.3/src/sds.c similarity index 99% rename from redis-android/src/main/jni/redis-5.0.2/src/sds.c rename to redis-android/src/main/jni/redis-5.0.3/src/sds.c index 39ad595..330c955 100644 --- a/redis-android/src/main/jni/redis-5.0.2/src/sds.c +++ b/redis-android/src/main/jni/redis-5.0.3/src/sds.c @@ -695,7 +695,7 @@ sds sdscatfmt(sds s, char const *fmt, ...) { * s = sdstrim(s,"Aa. :"); * printf("%s\n", s); * - * Output will be just "Hello World". + * Output will be just "HelloWorld". */ sds sdstrim(sds s, const char *cset) { char *start, *end, *sp, *ep; diff --git a/redis-android/src/main/jni/redis-5.0.2/src/sds.h b/redis-android/src/main/jni/redis-5.0.3/src/sds.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/sds.h rename to redis-android/src/main/jni/redis-5.0.3/src/sds.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/sdsalloc.h b/redis-android/src/main/jni/redis-5.0.3/src/sdsalloc.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/sdsalloc.h rename to redis-android/src/main/jni/redis-5.0.3/src/sdsalloc.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/sentinel.c b/redis-android/src/main/jni/redis-5.0.3/src/sentinel.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/sentinel.c rename to redis-android/src/main/jni/redis-5.0.3/src/sentinel.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/server.c b/redis-android/src/main/jni/redis-5.0.3/src/server.c similarity index 99% rename from redis-android/src/main/jni/redis-5.0.2/src/server.c rename to redis-android/src/main/jni/redis-5.0.3/src/server.c index b77d3d2..260b873 100644 --- a/redis-android/src/main/jni/redis-5.0.2/src/server.c +++ b/redis-android/src/main/jni/redis-5.0.3/src/server.c @@ -1969,9 +1969,13 @@ int listenToPort(int port, int *fds, int *count) { } if (fds[*count] == ANET_ERR) { serverLog(LL_WARNING, - "Creating Server TCP listening socket %s:%d: %s", + "Could not create server TCP listening socket %s:%d: %s", server.bindaddr[j] ? server.bindaddr[j] : "*", port, server.neterr); + if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT || + errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT || + errno == EAFNOSUPPORT || errno == EADDRNOTAVAIL) + continue; return C_ERR; } anetNonBlock(NULL,fds[*count]); @@ -2614,17 +2618,13 @@ int processCommand(client *c) { } /* Handle the maxmemory directive. - * - * First we try to free some memory if possible (if there are volatile - * keys in the dataset). If there are not the only thing we can do - * is returning an error. * * Note that we do not want to reclaim memory if we are here re-entering * the event loop since there is a busy Lua script running in timeout - * condition, to avoid mixing the propagation of scripts with the propagation - * of DELs due to eviction. */ + * condition, to avoid mixing the propagation of scripts with the + * propagation of DELs due to eviction. */ if (server.maxmemory && !server.lua_timedout) { - int out_of_memory = freeMemoryIfNeeded() == C_ERR; + int out_of_memory = freeMemoryIfNeededAndSafe() == C_ERR; /* freeMemoryIfNeeded may flush slave output buffers. This may result * into a slave, that may be the active client, to be freed. */ if (server.current_client == NULL) return C_ERR; @@ -3254,11 +3254,11 @@ sds genRedisInfoString(char *section) { "allocator_frag_ratio:%.2f\r\n" "allocator_frag_bytes:%zu\r\n" "allocator_rss_ratio:%.2f\r\n" - "allocator_rss_bytes:%zu\r\n" + "allocator_rss_bytes:%zd\r\n" "rss_overhead_ratio:%.2f\r\n" - "rss_overhead_bytes:%zu\r\n" + "rss_overhead_bytes:%zd\r\n" "mem_fragmentation_ratio:%.2f\r\n" - "mem_fragmentation_bytes:%zu\r\n" + "mem_fragmentation_bytes:%zd\r\n" "mem_not_counted_for_evict:%zu\r\n" "mem_replication_backlog:%zu\r\n" "mem_clients_slaves:%zu\r\n" diff --git a/redis-android/src/main/jni/redis-5.0.2/src/server.h b/redis-android/src/main/jni/redis-5.0.3/src/server.h similarity index 99% rename from redis-android/src/main/jni/redis-5.0.2/src/server.h rename to redis-android/src/main/jni/redis-5.0.3/src/server.h index 86d6e2e..da4c6d4 100644 --- a/redis-android/src/main/jni/redis-5.0.2/src/server.h +++ b/redis-android/src/main/jni/redis-5.0.3/src/server.h @@ -654,6 +654,9 @@ typedef struct multiCmd { typedef struct multiState { multiCmd *commands; /* Array of MULTI commands */ int count; /* Total number of MULTI commands */ + int cmd_flags; /* The accumulated command flags OR-ed together. + So if at least a command has a given flag, it + will be set in this field. */ int minreplicas; /* MINREPLICAS for synchronous replication */ time_t minreplicas_timeout; /* MINREPLICAS timeout as unixtime. */ } multiState; @@ -864,11 +867,11 @@ struct redisMemOverhead { float dataset_perc; float peak_perc; float total_frag; - size_t total_frag_bytes; + ssize_t total_frag_bytes; float allocator_frag; - size_t allocator_frag_bytes; + ssize_t allocator_frag_bytes; float allocator_rss; - size_t allocator_rss_bytes; + ssize_t allocator_rss_bytes; float rss_extra; size_t rss_extra_bytes; size_t num_dbs; @@ -1699,6 +1702,7 @@ int zslLexValueLteMax(sds value, zlexrangespec *spec); int getMaxmemoryState(size_t *total, size_t *logical, size_t *tofree, float *level); size_t freeMemoryGetNotCountedMemory(); int freeMemoryIfNeeded(void); +int freeMemoryIfNeededAndSafe(void); int processCommand(client *c); void setupSignalHandlers(void); struct redisCommand *lookupCommand(sds name); diff --git a/redis-android/src/main/jni/redis-5.0.2/src/setproctitle.c b/redis-android/src/main/jni/redis-5.0.3/src/setproctitle.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/setproctitle.c rename to redis-android/src/main/jni/redis-5.0.3/src/setproctitle.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/sha1.c b/redis-android/src/main/jni/redis-5.0.3/src/sha1.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/sha1.c rename to redis-android/src/main/jni/redis-5.0.3/src/sha1.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/sha1.h b/redis-android/src/main/jni/redis-5.0.3/src/sha1.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/sha1.h rename to redis-android/src/main/jni/redis-5.0.3/src/sha1.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/siphash.c b/redis-android/src/main/jni/redis-5.0.3/src/siphash.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/siphash.c rename to redis-android/src/main/jni/redis-5.0.3/src/siphash.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/slowlog.c b/redis-android/src/main/jni/redis-5.0.3/src/slowlog.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/slowlog.c rename to redis-android/src/main/jni/redis-5.0.3/src/slowlog.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/slowlog.h b/redis-android/src/main/jni/redis-5.0.3/src/slowlog.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/slowlog.h rename to redis-android/src/main/jni/redis-5.0.3/src/slowlog.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/solarisfixes.h b/redis-android/src/main/jni/redis-5.0.3/src/solarisfixes.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/solarisfixes.h rename to redis-android/src/main/jni/redis-5.0.3/src/solarisfixes.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/sort.c b/redis-android/src/main/jni/redis-5.0.3/src/sort.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/sort.c rename to redis-android/src/main/jni/redis-5.0.3/src/sort.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/sparkline.c b/redis-android/src/main/jni/redis-5.0.3/src/sparkline.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/sparkline.c rename to redis-android/src/main/jni/redis-5.0.3/src/sparkline.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/sparkline.h b/redis-android/src/main/jni/redis-5.0.3/src/sparkline.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/sparkline.h rename to redis-android/src/main/jni/redis-5.0.3/src/sparkline.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/stream.h b/redis-android/src/main/jni/redis-5.0.3/src/stream.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/stream.h rename to redis-android/src/main/jni/redis-5.0.3/src/stream.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/sync_file_range_flags.h b/redis-android/src/main/jni/redis-5.0.3/src/sync_file_range_flags.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/sync_file_range_flags.h rename to redis-android/src/main/jni/redis-5.0.3/src/sync_file_range_flags.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/syncio.c b/redis-android/src/main/jni/redis-5.0.3/src/syncio.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/syncio.c rename to redis-android/src/main/jni/redis-5.0.3/src/syncio.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/t_hash.c b/redis-android/src/main/jni/redis-5.0.3/src/t_hash.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/t_hash.c rename to redis-android/src/main/jni/redis-5.0.3/src/t_hash.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/t_list.c b/redis-android/src/main/jni/redis-5.0.3/src/t_list.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/t_list.c rename to redis-android/src/main/jni/redis-5.0.3/src/t_list.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/t_set.c b/redis-android/src/main/jni/redis-5.0.3/src/t_set.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/t_set.c rename to redis-android/src/main/jni/redis-5.0.3/src/t_set.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/t_stream.c b/redis-android/src/main/jni/redis-5.0.3/src/t_stream.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/t_stream.c rename to redis-android/src/main/jni/redis-5.0.3/src/t_stream.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/t_string.c b/redis-android/src/main/jni/redis-5.0.3/src/t_string.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/t_string.c rename to redis-android/src/main/jni/redis-5.0.3/src/t_string.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/t_zset.c b/redis-android/src/main/jni/redis-5.0.3/src/t_zset.c similarity index 99% rename from redis-android/src/main/jni/redis-5.0.2/src/t_zset.c rename to redis-android/src/main/jni/redis-5.0.3/src/t_zset.c index db381b5..84a61ca 100644 --- a/redis-android/src/main/jni/redis-5.0.2/src/t_zset.c +++ b/redis-android/src/main/jni/redis-5.0.3/src/t_zset.c @@ -574,12 +574,12 @@ int zslParseLexRangeItem(robj *item, sds *dest, int *ex) { switch(c[0]) { case '+': if (c[1] != '\0') return C_ERR; - *ex = 0; + *ex = 1; *dest = shared.maxstring; return C_OK; case '-': if (c[1] != '\0') return C_ERR; - *ex = 0; + *ex = 1; *dest = shared.minstring; return C_OK; case '(': @@ -652,9 +652,8 @@ int zslIsInLexRange(zskiplist *zsl, zlexrangespec *range) { zskiplistNode *x; /* Test for ranges that will always be empty. */ - if (sdscmplex(range->min,range->max) > 1 || - (sdscmp(range->min,range->max) == 0 && - (range->minex || range->maxex))) + int cmp = sdscmplex(range->min,range->max); + if (cmp > 0 || (cmp == 0 && (range->minex || range->maxex))) return 0; x = zsl->tail; if (x == NULL || !zslLexValueGteMin(x->ele,range)) @@ -927,9 +926,8 @@ int zzlIsInLexRange(unsigned char *zl, zlexrangespec *range) { unsigned char *p; /* Test for ranges that will always be empty. */ - if (sdscmplex(range->min,range->max) > 1 || - (sdscmp(range->min,range->max) == 0 && - (range->minex || range->maxex))) + int cmp = sdscmplex(range->min,range->max); + if (cmp > 0 || (cmp == 0 && (range->minex || range->maxex))) return 0; p = ziplistIndex(zl,-2); /* Last element. */ diff --git a/redis-android/src/main/jni/redis-5.0.2/src/testhelp.h b/redis-android/src/main/jni/redis-5.0.3/src/testhelp.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/testhelp.h rename to redis-android/src/main/jni/redis-5.0.3/src/testhelp.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/util.c b/redis-android/src/main/jni/redis-5.0.3/src/util.c similarity index 97% rename from redis-android/src/main/jni/redis-5.0.2/src/util.c rename to redis-android/src/main/jni/redis-5.0.3/src/util.c index 80b460b..66d5991 100644 --- a/redis-android/src/main/jni/redis-5.0.2/src/util.c +++ b/redis-android/src/main/jni/redis-5.0.3/src/util.c @@ -48,7 +48,7 @@ int stringmatchlen(const char *pattern, int patternLen, const char *string, int stringLen, int nocase) { - while(patternLen) { + while(patternLen && stringLen) { switch(pattern[0]) { case '*': while (pattern[1] == '*') { @@ -171,6 +171,22 @@ int stringmatch(const char *pattern, const char *string, int nocase) { return stringmatchlen(pattern,strlen(pattern),string,strlen(string),nocase); } +/* Fuzz stringmatchlen() trying to crash it with bad input. */ +int stringmatchlen_fuzz_test(void) { + char str[32]; + char pat[32]; + int cycles = 10000000; + int total_matches = 0; + while(cycles--) { + int strlen = rand() % sizeof(str); + int patlen = rand() % sizeof(pat); + for (int j = 0; j < strlen; j++) str[j] = rand() % 128; + for (int j = 0; j < patlen; j++) pat[j] = rand() % 128; + total_matches += stringmatchlen(pat, patlen, str, strlen, 0); + } + return total_matches; +} + /* Convert a string representing an amount of memory into the number of * bytes, so for instance memtoll("1Gb") will return 1073741824 that is * (1024*1024*1024). @@ -606,7 +622,7 @@ void getRandomHexChars(char *p, size_t len) { * already, this will be detected and handled correctly. * * The function does not try to normalize everything, but only the obvious - * case of one or more "../" appearning at the start of "filename" + * case of one or more "../" appearing at the start of "filename" * relative path. */ sds getAbsolutePath(char *filename) { char cwd[1024]; diff --git a/redis-android/src/main/jni/redis-5.0.2/src/util.h b/redis-android/src/main/jni/redis-5.0.3/src/util.h similarity index 98% rename from redis-android/src/main/jni/redis-5.0.2/src/util.h rename to redis-android/src/main/jni/redis-5.0.3/src/util.h index cc154d9..b6c01aa 100644 --- a/redis-android/src/main/jni/redis-5.0.2/src/util.h +++ b/redis-android/src/main/jni/redis-5.0.3/src/util.h @@ -40,6 +40,7 @@ int stringmatchlen(const char *p, int plen, const char *s, int slen, int nocase); int stringmatch(const char *p, const char *s, int nocase); +int stringmatchlen_fuzz_test(void); long long memtoll(const char *p, int *err); uint32_t digits10(uint64_t v); uint32_t sdigits10(int64_t v); diff --git a/redis-android/src/main/jni/redis-5.0.2/src/valgrind.sup b/redis-android/src/main/jni/redis-5.0.3/src/valgrind.sup similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/valgrind.sup rename to redis-android/src/main/jni/redis-5.0.3/src/valgrind.sup diff --git a/redis-android/src/main/jni/redis-5.0.3/src/version.h b/redis-android/src/main/jni/redis-5.0.3/src/version.h new file mode 100644 index 0000000..74345ec --- /dev/null +++ b/redis-android/src/main/jni/redis-5.0.3/src/version.h @@ -0,0 +1 @@ +#define REDIS_VERSION "5.0.3" diff --git a/redis-android/src/main/jni/redis-5.0.2/src/wait3.c b/redis-android/src/main/jni/redis-5.0.3/src/wait3.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/wait3.c rename to redis-android/src/main/jni/redis-5.0.3/src/wait3.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/wait3.h b/redis-android/src/main/jni/redis-5.0.3/src/wait3.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/wait3.h rename to redis-android/src/main/jni/redis-5.0.3/src/wait3.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/ziplist.c b/redis-android/src/main/jni/redis-5.0.3/src/ziplist.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/ziplist.c rename to redis-android/src/main/jni/redis-5.0.3/src/ziplist.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/ziplist.h b/redis-android/src/main/jni/redis-5.0.3/src/ziplist.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/ziplist.h rename to redis-android/src/main/jni/redis-5.0.3/src/ziplist.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/zipmap.c b/redis-android/src/main/jni/redis-5.0.3/src/zipmap.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/zipmap.c rename to redis-android/src/main/jni/redis-5.0.3/src/zipmap.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/zipmap.h b/redis-android/src/main/jni/redis-5.0.3/src/zipmap.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/zipmap.h rename to redis-android/src/main/jni/redis-5.0.3/src/zipmap.h diff --git a/redis-android/src/main/jni/redis-5.0.2/src/zmalloc.c b/redis-android/src/main/jni/redis-5.0.3/src/zmalloc.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/zmalloc.c rename to redis-android/src/main/jni/redis-5.0.3/src/zmalloc.c diff --git a/redis-android/src/main/jni/redis-5.0.2/src/zmalloc.h b/redis-android/src/main/jni/redis-5.0.3/src/zmalloc.h similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/src/zmalloc.h rename to redis-android/src/main/jni/redis-5.0.3/src/zmalloc.h diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/assets/default.conf b/redis-android/src/main/jni/redis-5.0.3/tests/assets/default.conf similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/assets/default.conf rename to redis-android/src/main/jni/redis-5.0.3/tests/assets/default.conf diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/assets/encodings.rdb b/redis-android/src/main/jni/redis-5.0.3/tests/assets/encodings.rdb similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/assets/encodings.rdb rename to redis-android/src/main/jni/redis-5.0.3/tests/assets/encodings.rdb diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/assets/hash-zipmap.rdb b/redis-android/src/main/jni/redis-5.0.3/tests/assets/hash-zipmap.rdb similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/assets/hash-zipmap.rdb rename to redis-android/src/main/jni/redis-5.0.3/tests/assets/hash-zipmap.rdb diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/cluster/cluster.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/cluster/cluster.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/cluster/cluster.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/cluster/cluster.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/cluster/run.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/cluster/run.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/cluster/run.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/cluster/run.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/00-base.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/00-base.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/00-base.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/00-base.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/01-faildet.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/01-faildet.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/01-faildet.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/01-faildet.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/02-failover.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/02-failover.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/02-failover.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/02-failover.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/03-failover-loop.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/03-failover-loop.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/03-failover-loop.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/03-failover-loop.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/04-resharding.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/04-resharding.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/04-resharding.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/04-resharding.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/05-slave-selection.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/05-slave-selection.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/05-slave-selection.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/05-slave-selection.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/06-slave-stop-cond.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/06-slave-stop-cond.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/06-slave-stop-cond.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/06-slave-stop-cond.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/07-replica-migration.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/07-replica-migration.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/07-replica-migration.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/07-replica-migration.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/08-update-msg.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/08-update-msg.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/08-update-msg.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/08-update-msg.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/09-pubsub.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/09-pubsub.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/09-pubsub.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/09-pubsub.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/10-manual-failover.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/10-manual-failover.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/10-manual-failover.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/10-manual-failover.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/11-manual-takeover.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/11-manual-takeover.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/11-manual-takeover.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/11-manual-takeover.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/12-replica-migration-2.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/12-replica-migration-2.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/12-replica-migration-2.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/12-replica-migration-2.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/13-no-failover-option.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/13-no-failover-option.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/13-no-failover-option.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/13-no-failover-option.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/helpers/onlydots.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/helpers/onlydots.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/helpers/onlydots.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/helpers/onlydots.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/includes/init-tests.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/includes/init-tests.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/cluster/tests/includes/init-tests.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/cluster/tests/includes/init-tests.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/cluster/tmp/.gitignore b/redis-android/src/main/jni/redis-5.0.3/tests/cluster/tmp/.gitignore similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/cluster/tmp/.gitignore rename to redis-android/src/main/jni/redis-5.0.3/tests/cluster/tmp/.gitignore diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/helpers/bg_block_op.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/helpers/bg_block_op.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/helpers/bg_block_op.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/helpers/bg_block_op.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/helpers/bg_complex_data.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/helpers/bg_complex_data.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/helpers/bg_complex_data.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/helpers/bg_complex_data.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/helpers/gen_write_load.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/helpers/gen_write_load.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/helpers/gen_write_load.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/helpers/gen_write_load.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/instances.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/instances.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/instances.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/instances.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/integration/aof-race.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/integration/aof-race.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/integration/aof-race.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/integration/aof-race.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/integration/aof.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/integration/aof.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/integration/aof.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/integration/aof.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/integration/block-repl.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/integration/block-repl.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/integration/block-repl.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/integration/block-repl.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/integration/convert-zipmap-hash-on-load.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/integration/convert-zipmap-hash-on-load.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/integration/convert-zipmap-hash-on-load.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/integration/convert-zipmap-hash-on-load.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/integration/logging.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/integration/logging.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/integration/logging.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/integration/logging.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/integration/psync2-reg.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/integration/psync2-reg.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/integration/psync2-reg.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/integration/psync2-reg.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/integration/psync2.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/integration/psync2.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/integration/psync2.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/integration/psync2.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/integration/rdb.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/integration/rdb.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/integration/rdb.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/integration/rdb.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/integration/redis-cli.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/integration/redis-cli.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/integration/redis-cli.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/integration/redis-cli.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/integration/replication-2.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/integration/replication-2.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/integration/replication-2.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/integration/replication-2.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/integration/replication-3.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/integration/replication-3.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/integration/replication-3.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/integration/replication-3.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/integration/replication-4.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/integration/replication-4.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/integration/replication-4.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/integration/replication-4.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/integration/replication-psync.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/integration/replication-psync.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/integration/replication-psync.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/integration/replication-psync.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/integration/replication.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/integration/replication.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/integration/replication.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/integration/replication.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/sentinel/run.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/sentinel/run.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/sentinel/run.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/sentinel/run.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/sentinel/tests/00-base.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/sentinel/tests/00-base.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/sentinel/tests/00-base.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/sentinel/tests/00-base.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/sentinel/tests/01-conf-update.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/sentinel/tests/01-conf-update.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/sentinel/tests/01-conf-update.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/sentinel/tests/01-conf-update.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/sentinel/tests/02-slaves-reconf.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/sentinel/tests/02-slaves-reconf.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/sentinel/tests/02-slaves-reconf.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/sentinel/tests/02-slaves-reconf.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/sentinel/tests/03-runtime-reconf.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/sentinel/tests/03-runtime-reconf.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/sentinel/tests/03-runtime-reconf.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/sentinel/tests/03-runtime-reconf.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/sentinel/tests/04-slave-selection.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/sentinel/tests/04-slave-selection.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/sentinel/tests/04-slave-selection.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/sentinel/tests/04-slave-selection.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/sentinel/tests/05-manual.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/sentinel/tests/05-manual.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/sentinel/tests/05-manual.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/sentinel/tests/05-manual.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/sentinel/tests/06-ckquorum.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/sentinel/tests/06-ckquorum.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/sentinel/tests/06-ckquorum.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/sentinel/tests/06-ckquorum.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/sentinel/tests/07-down-conditions.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/sentinel/tests/07-down-conditions.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/sentinel/tests/07-down-conditions.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/sentinel/tests/07-down-conditions.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/sentinel/tests/includes/init-tests.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/sentinel/tests/includes/init-tests.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/sentinel/tests/includes/init-tests.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/sentinel/tests/includes/init-tests.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/sentinel/tmp/.gitignore b/redis-android/src/main/jni/redis-5.0.3/tests/sentinel/tmp/.gitignore similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/sentinel/tmp/.gitignore rename to redis-android/src/main/jni/redis-5.0.3/tests/sentinel/tmp/.gitignore diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/support/cluster.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/support/cluster.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/support/cluster.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/support/cluster.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/support/redis.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/support/redis.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/support/redis.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/support/redis.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/support/server.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/support/server.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/support/server.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/support/server.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/support/test.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/support/test.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/support/test.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/support/test.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/support/tmpfile.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/support/tmpfile.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/support/tmpfile.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/support/tmpfile.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/support/util.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/support/util.tcl similarity index 98% rename from redis-android/src/main/jni/redis-5.0.2/tests/support/util.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/support/util.tcl index 181c865..74f491e 100644 --- a/redis-android/src/main/jni/redis-5.0.2/tests/support/util.tcl +++ b/redis-android/src/main/jni/redis-5.0.3/tests/support/util.tcl @@ -91,6 +91,14 @@ proc wait_for_sync r { } } +proc wait_for_ofs_sync {r1 r2} { + wait_for_condition 50 100 { + [status $r1 master_repl_offset] eq [status $r2 master_repl_offset] + } else { + fail "replica didn't sync in time" + } +} + # Random integer between 0 and max (excluded). proc randomInt {max} { expr {int(rand()*$max)} diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/test_helper.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/test_helper.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/test_helper.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/test_helper.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/aofrw.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/aofrw.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/aofrw.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/aofrw.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/auth.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/auth.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/auth.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/auth.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/bitfield.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/bitfield.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/bitfield.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/bitfield.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/bitops.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/bitops.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/bitops.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/bitops.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/dump.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/dump.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/dump.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/dump.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/expire.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/expire.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/expire.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/expire.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/geo.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/geo.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/geo.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/geo.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/hyperloglog.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/hyperloglog.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/hyperloglog.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/hyperloglog.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/introspection-2.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/introspection-2.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/introspection-2.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/introspection-2.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/introspection.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/introspection.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/introspection.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/introspection.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/keyspace.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/keyspace.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/keyspace.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/keyspace.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/latency-monitor.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/latency-monitor.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/latency-monitor.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/latency-monitor.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/lazyfree.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/lazyfree.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/lazyfree.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/lazyfree.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/limits.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/limits.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/limits.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/limits.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/maxmemory.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/maxmemory.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/maxmemory.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/maxmemory.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/memefficiency.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/memefficiency.tcl similarity index 98% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/memefficiency.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/memefficiency.tcl index 8972d57..d152e21 100644 --- a/redis-android/src/main/jni/redis-5.0.2/tests/unit/memefficiency.tcl +++ b/redis-android/src/main/jni/redis-5.0.3/tests/unit/memefficiency.tcl @@ -90,6 +90,7 @@ start_server {tags {"defrag"}} { test "Active defrag big keys" { r flushdb r config resetstat + r config set save "" ;# prevent bgsave from interfereing with save below r config set activedefrag no r config set active-defrag-max-scan-fields 1000 r config set active-defrag-threshold-lower 5 diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/multi.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/multi.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/multi.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/multi.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/obuf-limits.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/obuf-limits.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/obuf-limits.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/obuf-limits.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/other.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/other.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/other.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/other.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/pendingquerybuf.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/pendingquerybuf.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/pendingquerybuf.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/pendingquerybuf.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/printver.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/printver.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/printver.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/printver.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/protocol.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/protocol.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/protocol.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/protocol.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/pubsub.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/pubsub.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/pubsub.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/pubsub.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/quit.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/quit.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/quit.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/quit.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/scan.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/scan.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/scan.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/scan.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/scripting.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/scripting.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/scripting.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/scripting.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/slowlog.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/slowlog.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/slowlog.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/slowlog.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/sort.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/sort.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/sort.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/sort.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/type/hash.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/type/hash.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/type/hash.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/type/hash.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/type/incr.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/type/incr.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/type/incr.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/type/incr.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/type/list-2.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/type/list-2.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/type/list-2.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/type/list-2.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/type/list-3.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/type/list-3.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/type/list-3.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/type/list-3.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/type/list-common.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/type/list-common.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/type/list-common.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/type/list-common.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/type/list.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/type/list.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/type/list.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/type/list.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/type/set.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/type/set.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/type/set.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/type/set.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/type/stream-cgroups.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/type/stream-cgroups.tcl similarity index 79% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/type/stream-cgroups.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/type/stream-cgroups.tcl index 4bb8f7c..13981cc 100644 --- a/redis-android/src/main/jni/redis-5.0.2/tests/unit/type/stream-cgroups.tcl +++ b/redis-android/src/main/jni/redis-5.0.3/tests/unit/type/stream-cgroups.tcl @@ -147,6 +147,54 @@ start_server { assert {[lindex $res 0 1 1] == {2-0 {field1 B}}} } + test {XCLAIM can claim PEL items from another consumer} { + # Add 3 items into the stream, and create a consumer group + r del mystream + set id1 [r XADD mystream * a 1] + set id2 [r XADD mystream * b 2] + set id3 [r XADD mystream * c 3] + r XGROUP CREATE mystream mygroup 0 + + # Client 1 reads item 1 from the stream without acknowledgements. + # Client 2 then claims pending item 1 from the PEL of client 1 + set reply [ + r XREADGROUP GROUP mygroup client1 count 1 STREAMS mystream > + ] + assert {[llength [lindex $reply 0 1 0 1]] == 2} + assert {[lindex $reply 0 1 0 1] eq {a 1}} + r debug sleep 0.2 + set reply [ + r XCLAIM mystream mygroup client2 10 $id1 + ] + assert {[llength [lindex $reply 0 1]] == 2} + assert {[lindex $reply 0 1] eq {a 1}} + + # Client 1 reads another 2 items from stream + r XREADGROUP GROUP mygroup client1 count 2 STREAMS mystream > + r debug sleep 0.2 + + # Delete item 2 from the stream. Now client 1 has PEL that contains + # only item 3. Try to use client 2 to claim the deleted item 2 + # from the PEL of client 1, this should return nil + r XDEL mystream $id2 + set reply [ + r XCLAIM mystream mygroup client2 10 $id2 + ] + assert {[llength $reply] == 1} + assert_equal "" [lindex $reply 0] + + # Delete item 3 from the stream. Now client 1 has PEL that is empty. + # Try to use client 2 to claim the deleted item 3 from the PEL + # of client 1, this should return nil + r debug sleep 0.2 + r XDEL mystream $id3 + set reply [ + r XCLAIM mystream mygroup client2 10 $id3 + ] + assert {[llength $reply] == 1} + assert_equal "" [lindex $reply 0] + } + start_server {} { set master [srv -1 client] set master_host [srv -1 host] @@ -183,6 +231,8 @@ start_server { } } + wait_for_ofs_sync $master $slave + # Turn slave into master $slave slaveof no one diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/type/stream.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/type/stream.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/type/stream.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/type/stream.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/type/string.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/type/string.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/type/string.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/type/string.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/type/zset.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/type/zset.tcl similarity index 98% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/type/zset.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/type/zset.tcl index cf54ae8..a8c817f 100644 --- a/redis-android/src/main/jni/redis-5.0.2/tests/unit/type/zset.tcl +++ b/redis-android/src/main/jni/redis-5.0.3/tests/unit/type/zset.tcl @@ -388,7 +388,7 @@ start_server {tags {"zset"}} { 0 omega} } - test "ZRANGEBYLEX/ZREVRANGEBYLEX/ZCOUNT basics" { + test "ZRANGEBYLEX/ZREVRANGEBYLEX/ZLEXCOUNT basics" { create_default_lex_zset # inclusive range @@ -416,6 +416,22 @@ start_server {tags {"zset"}} { assert_equal {} [r zrevrangebylex zset \[elez \[elex] assert_equal {} [r zrevrangebylex zset (hill (omega] } + + test "ZLEXCOUNT advanced" { + create_default_lex_zset + + assert_equal 9 [r zlexcount zset - +] + assert_equal 0 [r zlexcount zset + -] + assert_equal 0 [r zlexcount zset + \[c] + assert_equal 0 [r zlexcount zset \[c -] + assert_equal 8 [r zlexcount zset \[bar +] + assert_equal 5 [r zlexcount zset \[bar \[foo] + assert_equal 4 [r zlexcount zset \[bar (foo] + assert_equal 4 [r zlexcount zset (bar \[foo] + assert_equal 3 [r zlexcount zset (bar (foo] + assert_equal 5 [r zlexcount zset - (foo] + assert_equal 1 [r zlexcount zset (maxstring +] + } test "ZRANGEBYSLEX with LIMIT" { create_default_lex_zset diff --git a/redis-android/src/main/jni/redis-5.0.2/tests/unit/wait.tcl b/redis-android/src/main/jni/redis-5.0.3/tests/unit/wait.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/tests/unit/wait.tcl rename to redis-android/src/main/jni/redis-5.0.3/tests/unit/wait.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/utils/build-static-symbols.tcl b/redis-android/src/main/jni/redis-5.0.3/utils/build-static-symbols.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/utils/build-static-symbols.tcl rename to redis-android/src/main/jni/redis-5.0.3/utils/build-static-symbols.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/utils/cluster_fail_time.tcl b/redis-android/src/main/jni/redis-5.0.3/utils/cluster_fail_time.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/utils/cluster_fail_time.tcl rename to redis-android/src/main/jni/redis-5.0.3/utils/cluster_fail_time.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/utils/corrupt_rdb.c b/redis-android/src/main/jni/redis-5.0.3/utils/corrupt_rdb.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/utils/corrupt_rdb.c rename to redis-android/src/main/jni/redis-5.0.3/utils/corrupt_rdb.c diff --git a/redis-android/src/main/jni/redis-5.0.2/utils/create-cluster/.gitignore b/redis-android/src/main/jni/redis-5.0.3/utils/create-cluster/.gitignore similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/utils/create-cluster/.gitignore rename to redis-android/src/main/jni/redis-5.0.3/utils/create-cluster/.gitignore diff --git a/redis-android/src/main/jni/redis-5.0.2/utils/create-cluster/README b/redis-android/src/main/jni/redis-5.0.3/utils/create-cluster/README similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/utils/create-cluster/README rename to redis-android/src/main/jni/redis-5.0.3/utils/create-cluster/README diff --git a/redis-android/src/main/jni/redis-5.0.2/utils/create-cluster/create-cluster b/redis-android/src/main/jni/redis-5.0.3/utils/create-cluster/create-cluster similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/utils/create-cluster/create-cluster rename to redis-android/src/main/jni/redis-5.0.3/utils/create-cluster/create-cluster diff --git a/redis-android/src/main/jni/redis-5.0.2/utils/generate-command-help.rb b/redis-android/src/main/jni/redis-5.0.3/utils/generate-command-help.rb similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/utils/generate-command-help.rb rename to redis-android/src/main/jni/redis-5.0.3/utils/generate-command-help.rb diff --git a/redis-android/src/main/jni/redis-5.0.2/utils/graphs/commits-over-time/README.md b/redis-android/src/main/jni/redis-5.0.3/utils/graphs/commits-over-time/README.md similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/utils/graphs/commits-over-time/README.md rename to redis-android/src/main/jni/redis-5.0.3/utils/graphs/commits-over-time/README.md diff --git a/redis-android/src/main/jni/redis-5.0.2/utils/graphs/commits-over-time/genhtml.tcl b/redis-android/src/main/jni/redis-5.0.3/utils/graphs/commits-over-time/genhtml.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/utils/graphs/commits-over-time/genhtml.tcl rename to redis-android/src/main/jni/redis-5.0.3/utils/graphs/commits-over-time/genhtml.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/utils/hashtable/README b/redis-android/src/main/jni/redis-5.0.3/utils/hashtable/README similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/utils/hashtable/README rename to redis-android/src/main/jni/redis-5.0.3/utils/hashtable/README diff --git a/redis-android/src/main/jni/redis-5.0.2/utils/hashtable/rehashing.c b/redis-android/src/main/jni/redis-5.0.3/utils/hashtable/rehashing.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/utils/hashtable/rehashing.c rename to redis-android/src/main/jni/redis-5.0.3/utils/hashtable/rehashing.c diff --git a/redis-android/src/main/jni/redis-5.0.2/utils/hyperloglog/.gitignore b/redis-android/src/main/jni/redis-5.0.3/utils/hyperloglog/.gitignore similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/utils/hyperloglog/.gitignore rename to redis-android/src/main/jni/redis-5.0.3/utils/hyperloglog/.gitignore diff --git a/redis-android/src/main/jni/redis-5.0.2/utils/hyperloglog/hll-err.rb b/redis-android/src/main/jni/redis-5.0.3/utils/hyperloglog/hll-err.rb similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/utils/hyperloglog/hll-err.rb rename to redis-android/src/main/jni/redis-5.0.3/utils/hyperloglog/hll-err.rb diff --git a/redis-android/src/main/jni/redis-5.0.2/utils/hyperloglog/hll-gnuplot-graph.rb b/redis-android/src/main/jni/redis-5.0.3/utils/hyperloglog/hll-gnuplot-graph.rb similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/utils/hyperloglog/hll-gnuplot-graph.rb rename to redis-android/src/main/jni/redis-5.0.3/utils/hyperloglog/hll-gnuplot-graph.rb diff --git a/redis-android/src/main/jni/redis-5.0.2/utils/install_server.sh b/redis-android/src/main/jni/redis-5.0.3/utils/install_server.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/utils/install_server.sh rename to redis-android/src/main/jni/redis-5.0.3/utils/install_server.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/utils/lru/README b/redis-android/src/main/jni/redis-5.0.3/utils/lru/README similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/utils/lru/README rename to redis-android/src/main/jni/redis-5.0.3/utils/lru/README diff --git a/redis-android/src/main/jni/redis-5.0.2/utils/lru/lfu-simulation.c b/redis-android/src/main/jni/redis-5.0.3/utils/lru/lfu-simulation.c similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/utils/lru/lfu-simulation.c rename to redis-android/src/main/jni/redis-5.0.3/utils/lru/lfu-simulation.c diff --git a/redis-android/src/main/jni/redis-5.0.2/utils/lru/test-lru.rb b/redis-android/src/main/jni/redis-5.0.3/utils/lru/test-lru.rb similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/utils/lru/test-lru.rb rename to redis-android/src/main/jni/redis-5.0.3/utils/lru/test-lru.rb diff --git a/redis-android/src/main/jni/redis-5.0.2/utils/redis-copy.rb b/redis-android/src/main/jni/redis-5.0.3/utils/redis-copy.rb similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/utils/redis-copy.rb rename to redis-android/src/main/jni/redis-5.0.3/utils/redis-copy.rb diff --git a/redis-android/src/main/jni/redis-5.0.2/utils/redis-sha1.rb b/redis-android/src/main/jni/redis-5.0.3/utils/redis-sha1.rb similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/utils/redis-sha1.rb rename to redis-android/src/main/jni/redis-5.0.3/utils/redis-sha1.rb diff --git a/redis-android/src/main/jni/redis-5.0.2/utils/redis_init_script b/redis-android/src/main/jni/redis-5.0.3/utils/redis_init_script similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/utils/redis_init_script rename to redis-android/src/main/jni/redis-5.0.3/utils/redis_init_script diff --git a/redis-android/src/main/jni/redis-5.0.2/utils/redis_init_script.tpl b/redis-android/src/main/jni/redis-5.0.3/utils/redis_init_script.tpl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/utils/redis_init_script.tpl rename to redis-android/src/main/jni/redis-5.0.3/utils/redis_init_script.tpl diff --git a/redis-android/src/main/jni/redis-5.0.2/utils/releasetools/01_create_tarball.sh b/redis-android/src/main/jni/redis-5.0.3/utils/releasetools/01_create_tarball.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/utils/releasetools/01_create_tarball.sh rename to redis-android/src/main/jni/redis-5.0.3/utils/releasetools/01_create_tarball.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/utils/releasetools/02_upload_tarball.sh b/redis-android/src/main/jni/redis-5.0.3/utils/releasetools/02_upload_tarball.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/utils/releasetools/02_upload_tarball.sh rename to redis-android/src/main/jni/redis-5.0.3/utils/releasetools/02_upload_tarball.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/utils/releasetools/03_test_release.sh b/redis-android/src/main/jni/redis-5.0.3/utils/releasetools/03_test_release.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/utils/releasetools/03_test_release.sh rename to redis-android/src/main/jni/redis-5.0.3/utils/releasetools/03_test_release.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/utils/releasetools/04_release_hash.sh b/redis-android/src/main/jni/redis-5.0.3/utils/releasetools/04_release_hash.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/utils/releasetools/04_release_hash.sh rename to redis-android/src/main/jni/redis-5.0.3/utils/releasetools/04_release_hash.sh diff --git a/redis-android/src/main/jni/redis-5.0.2/utils/releasetools/changelog.tcl b/redis-android/src/main/jni/redis-5.0.3/utils/releasetools/changelog.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/utils/releasetools/changelog.tcl rename to redis-android/src/main/jni/redis-5.0.3/utils/releasetools/changelog.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/utils/speed-regression.tcl b/redis-android/src/main/jni/redis-5.0.3/utils/speed-regression.tcl similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/utils/speed-regression.tcl rename to redis-android/src/main/jni/redis-5.0.3/utils/speed-regression.tcl diff --git a/redis-android/src/main/jni/redis-5.0.2/utils/whatisdoing.sh b/redis-android/src/main/jni/redis-5.0.3/utils/whatisdoing.sh similarity index 100% rename from redis-android/src/main/jni/redis-5.0.2/utils/whatisdoing.sh rename to redis-android/src/main/jni/redis-5.0.3/utils/whatisdoing.sh diff --git a/redis-android/src/main/jni/release.h b/redis-android/src/main/jni/release.h index 608657a..64a8454 100644 --- a/redis-android/src/main/jni/release.h +++ b/redis-android/src/main/jni/release.h @@ -1,3 +1,3 @@ -#define REDIS_GIT_SHA1 "02d293c5" -#define REDIS_GIT_DIRTY " 406" -#define REDIS_BUILD_ID "masashi-macgms.lan-1543253522" +#define REDIS_GIT_SHA1 "57aa30be" +#define REDIS_GIT_DIRTY " 341" +#define REDIS_BUILD_ID "masashi-macgms.lan-1545174935" diff --git a/redis-android/src/main/libs/arm64-v8a/libredis.so b/redis-android/src/main/libs/arm64-v8a/libredis.so index 55ea808..6467cc9 100755 Binary files a/redis-android/src/main/libs/arm64-v8a/libredis.so and b/redis-android/src/main/libs/arm64-v8a/libredis.so differ diff --git a/redis-android/src/main/libs/arm64-v8a/redis-check-aof b/redis-android/src/main/libs/arm64-v8a/redis-check-aof index bb6646c..5fd2442 100755 Binary files a/redis-android/src/main/libs/arm64-v8a/redis-check-aof and b/redis-android/src/main/libs/arm64-v8a/redis-check-aof differ diff --git a/redis-android/src/main/libs/arm64-v8a/redis-check-rdb b/redis-android/src/main/libs/arm64-v8a/redis-check-rdb index e33ed57..7b0640a 100755 Binary files a/redis-android/src/main/libs/arm64-v8a/redis-check-rdb and b/redis-android/src/main/libs/arm64-v8a/redis-check-rdb differ diff --git a/redis-android/src/main/libs/arm64-v8a/redis-cli b/redis-android/src/main/libs/arm64-v8a/redis-cli index 801ae11..6818023 100755 Binary files a/redis-android/src/main/libs/arm64-v8a/redis-cli and b/redis-android/src/main/libs/arm64-v8a/redis-cli differ diff --git a/redis-android/src/main/libs/armeabi-v7a/libredis.so b/redis-android/src/main/libs/armeabi-v7a/libredis.so index cba0e1c..e41e398 100755 Binary files a/redis-android/src/main/libs/armeabi-v7a/libredis.so and b/redis-android/src/main/libs/armeabi-v7a/libredis.so differ diff --git a/redis-android/src/main/libs/armeabi-v7a/redis-check-aof b/redis-android/src/main/libs/armeabi-v7a/redis-check-aof index f6a17f5..563fa06 100755 Binary files a/redis-android/src/main/libs/armeabi-v7a/redis-check-aof and b/redis-android/src/main/libs/armeabi-v7a/redis-check-aof differ diff --git a/redis-android/src/main/libs/armeabi-v7a/redis-check-rdb b/redis-android/src/main/libs/armeabi-v7a/redis-check-rdb index f6d4889..2b8a568 100755 Binary files a/redis-android/src/main/libs/armeabi-v7a/redis-check-rdb and b/redis-android/src/main/libs/armeabi-v7a/redis-check-rdb differ diff --git a/redis-android/src/main/libs/armeabi-v7a/redis-cli b/redis-android/src/main/libs/armeabi-v7a/redis-cli index 87e7143..9eb4240 100755 Binary files a/redis-android/src/main/libs/armeabi-v7a/redis-cli and b/redis-android/src/main/libs/armeabi-v7a/redis-cli differ diff --git a/redis-android/src/main/libs/x86/libredis.so b/redis-android/src/main/libs/x86/libredis.so index 9093fb3..ec34e23 100755 Binary files a/redis-android/src/main/libs/x86/libredis.so and b/redis-android/src/main/libs/x86/libredis.so differ diff --git a/redis-android/src/main/libs/x86/redis-check-aof b/redis-android/src/main/libs/x86/redis-check-aof index eac2796..fe45d8a 100755 Binary files a/redis-android/src/main/libs/x86/redis-check-aof and b/redis-android/src/main/libs/x86/redis-check-aof differ diff --git a/redis-android/src/main/libs/x86/redis-check-rdb b/redis-android/src/main/libs/x86/redis-check-rdb index a5e16e2..efc2fec 100755 Binary files a/redis-android/src/main/libs/x86/redis-check-rdb and b/redis-android/src/main/libs/x86/redis-check-rdb differ diff --git a/redis-android/src/main/libs/x86/redis-cli b/redis-android/src/main/libs/x86/redis-cli index b01361f..c2399fe 100755 Binary files a/redis-android/src/main/libs/x86/redis-cli and b/redis-android/src/main/libs/x86/redis-cli differ diff --git a/redis-android/src/main/libs/x86_64/libredis.so b/redis-android/src/main/libs/x86_64/libredis.so index a26cc6c..717d438 100755 Binary files a/redis-android/src/main/libs/x86_64/libredis.so and b/redis-android/src/main/libs/x86_64/libredis.so differ diff --git a/redis-android/src/main/libs/x86_64/redis-check-aof b/redis-android/src/main/libs/x86_64/redis-check-aof index 4075f55..dc14df4 100755 Binary files a/redis-android/src/main/libs/x86_64/redis-check-aof and b/redis-android/src/main/libs/x86_64/redis-check-aof differ diff --git a/redis-android/src/main/libs/x86_64/redis-check-rdb b/redis-android/src/main/libs/x86_64/redis-check-rdb index 437b874..77a90ec 100755 Binary files a/redis-android/src/main/libs/x86_64/redis-check-rdb and b/redis-android/src/main/libs/x86_64/redis-check-rdb differ diff --git a/redis-android/src/main/libs/x86_64/redis-cli b/redis-android/src/main/libs/x86_64/redis-cli index b50950a..962ab1e 100755 Binary files a/redis-android/src/main/libs/x86_64/redis-cli and b/redis-android/src/main/libs/x86_64/redis-cli differ diff --git a/repository/io/wf9a5m75/redis-android/1.1.4/redis-android-1.1.4.aar b/repository/io/wf9a5m75/redis-android/1.1.4/redis-android-1.1.4.aar new file mode 100644 index 0000000..02831d4 Binary files /dev/null and b/repository/io/wf9a5m75/redis-android/1.1.4/redis-android-1.1.4.aar differ diff --git a/repository/io/wf9a5m75/redis-android/1.1.4/redis-android-1.1.4.aar.md5 b/repository/io/wf9a5m75/redis-android/1.1.4/redis-android-1.1.4.aar.md5 new file mode 100644 index 0000000..f18cb8e --- /dev/null +++ b/repository/io/wf9a5m75/redis-android/1.1.4/redis-android-1.1.4.aar.md5 @@ -0,0 +1 @@ +5c439975fe0e05d5ce7c84c9ae60ccee \ No newline at end of file diff --git a/repository/io/wf9a5m75/redis-android/1.1.4/redis-android-1.1.4.aar.sha1 b/repository/io/wf9a5m75/redis-android/1.1.4/redis-android-1.1.4.aar.sha1 new file mode 100644 index 0000000..ddec22d --- /dev/null +++ b/repository/io/wf9a5m75/redis-android/1.1.4/redis-android-1.1.4.aar.sha1 @@ -0,0 +1 @@ +2a5c1c33136d11eb3dbec248263cb85d2200d892 \ No newline at end of file diff --git a/repository/io/wf9a5m75/redis-android/1.1.4/redis-android-1.1.4.pom b/repository/io/wf9a5m75/redis-android/1.1.4/redis-android-1.1.4.pom new file mode 100644 index 0000000..4fd0ed9 --- /dev/null +++ b/repository/io/wf9a5m75/redis-android/1.1.4/redis-android-1.1.4.pom @@ -0,0 +1,9 @@ + + + 4.0.0 + io.wf9a5m75 + redis-android + 1.1.4 + aar + diff --git a/repository/io/wf9a5m75/redis-android/1.1.4/redis-android-1.1.4.pom.md5 b/repository/io/wf9a5m75/redis-android/1.1.4/redis-android-1.1.4.pom.md5 new file mode 100644 index 0000000..ff25463 --- /dev/null +++ b/repository/io/wf9a5m75/redis-android/1.1.4/redis-android-1.1.4.pom.md5 @@ -0,0 +1 @@ +f60d11f2ee47c78b8e0ca220115ecb0b \ No newline at end of file diff --git a/repository/io/wf9a5m75/redis-android/1.1.4/redis-android-1.1.4.pom.sha1 b/repository/io/wf9a5m75/redis-android/1.1.4/redis-android-1.1.4.pom.sha1 new file mode 100644 index 0000000..ea37d36 --- /dev/null +++ b/repository/io/wf9a5m75/redis-android/1.1.4/redis-android-1.1.4.pom.sha1 @@ -0,0 +1 @@ +1179bb933dd721189e56326fc42f68561cb29f26 \ No newline at end of file diff --git a/repository/io/wf9a5m75/redis-android/maven-metadata.xml b/repository/io/wf9a5m75/redis-android/maven-metadata.xml index 9572bb4..6bf2c68 100644 --- a/repository/io/wf9a5m75/redis-android/maven-metadata.xml +++ b/repository/io/wf9a5m75/redis-android/maven-metadata.xml @@ -3,7 +3,7 @@ io.wf9a5m75 redis-android - 1.1.3 + 1.1.4 1.0.0 1.0.1 @@ -18,7 +18,8 @@ 1.1.1 1.1.2 1.1.3 + 1.1.4 - 20181126174704 + 20181218234118 diff --git a/repository/io/wf9a5m75/redis-android/maven-metadata.xml.md5 b/repository/io/wf9a5m75/redis-android/maven-metadata.xml.md5 index 8677fa2..b145e3d 100644 --- a/repository/io/wf9a5m75/redis-android/maven-metadata.xml.md5 +++ b/repository/io/wf9a5m75/redis-android/maven-metadata.xml.md5 @@ -1 +1 @@ -a5f1a1f62309b58716bd6de18c343783 \ No newline at end of file +e8e3e9c2582f0cf7d7f2e3d3d430b02a \ No newline at end of file diff --git a/repository/io/wf9a5m75/redis-android/maven-metadata.xml.sha1 b/repository/io/wf9a5m75/redis-android/maven-metadata.xml.sha1 index 31624bb..b1df4fe 100644 --- a/repository/io/wf9a5m75/redis-android/maven-metadata.xml.sha1 +++ b/repository/io/wf9a5m75/redis-android/maven-metadata.xml.sha1 @@ -1 +1 @@ -0e4763d68044292f25d79cb50d07816fe4b6f310 \ No newline at end of file +04f07486e54e21d64802022717392181345f97b9 \ No newline at end of file