diff options
author | Timotej S <6674623+underhood@users.noreply.github.com> | 2022-07-22 16:55:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-22 16:55:06 +0200 |
commit | 014c9f3259264f54d939958449477504dff6133e (patch) | |
tree | a5c092c4031e3ff48851489a6882c3fb5b03a62c | |
parent | 146c66b3492aaca3af02715886f0ee2f1237f9d0 (diff) |
include Judy into our source tree (#13362)
54 files changed, 26708 insertions, 239 deletions
diff --git a/.gitignore b/.gitignore index 2d7051485e..275b5d0076 100644 --- a/.gitignore +++ b/.gitignore @@ -228,3 +228,7 @@ Session.*.vim # Jupyter notebook checkpoints .ipynb_checkpoints + +# Judy stuff +JudyLTables.c +judyltablesgen diff --git a/.travis.yml b/.travis.yml index 838799f8ff..e729815a58 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ before_install: # Install dependencies for all, once # install: - - sudo apt-get install -y libuv1-dev liblz4-dev libjudy-dev libcap2-bin zlib1g-dev uuid-dev fakeroot libipmimonitoring-dev libmnl-dev libnetfilter-acct-dev gnupg python3-pip + - sudo apt-get install -y libuv1-dev liblz4-dev libcap2-bin zlib1g-dev uuid-dev fakeroot libipmimonitoring-dev libmnl-dev libnetfilter-acct-dev gnupg python3-pip - sudo pip3 install git-semver==0.3.2 # 11/Sep/2019: git-semver tip was broken, so we had to force last good run of it - source tests/installer/slack.sh - export NOTIF_CHANNEL="automation-beta" diff --git a/CMakeLists.txt b/CMakeLists.txt index e23df1981c..3d0d9559b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -102,20 +102,7 @@ set(NETDATA_COMMON_INCLUDE_DIRS ${NETDATA_COMMON_INCLUDE_DIRS} ${LIBLZ4_INCLUDE_ # ----------------------------------------------------------------------------- # Judy General purpose dynamic array -# pkgconfig not working in Ubuntu, why? upstream package broken? -#pkg_check_modules(JUDY REQUIRED Judy) -#set(NETDATA_COMMON_CFLAGS ${NETDATA_COMMON_CFLAGS} ${JUDY_CFLAGS_OTHER}) -#set(NETDATA_COMMON_LIBRARIES ${NETDATA_COMMON_LIBRARIES} ${JUDY_LIBRARIES}) -#set(NETDATA_COMMON_INCLUDE_DIRS ${NETDATA_COMMON_INCLUDE_DIRS} ${JUDY_INCLUDE_DIRS}) -set(NETDATA_COMMON_LIBRARIES ${NETDATA_COMMON_LIBRARIES} "-lJudy") -set(CMAKE_REQUIRED_LIBRARIES "Judy") -include(CheckSymbolExists) -check_symbol_exists("JudyLLast" "Judy.h" HAVE_JUDY) -IF(HAVE_JUDY) - message(STATUS "Judy library found") -ELSE() - message( FATAL_ERROR "libJudy required but not found. Try installing 'libjudy-dev' or 'Judy-devel'." ) -ENDIF() +set(NETDATA_COMMON_LIBRARIES ${NETDATA_COMMON_LIBRARIES} judy) # ----------------------------------------------------------------------------- # OpenSSL Cryptography and SSL/TLS Toolkit @@ -362,6 +349,88 @@ ELSE() set(ENABLE_ML False) ENDIF() +set(LIBJUDY_SOURCES + libnetdata/libjudy/src/Judy.h + libnetdata/libjudy/src/JudyCommon/JudyMalloc.c + libnetdata/libjudy/src/JudyCommon/JudyPrivate.h + libnetdata/libjudy/src/JudyCommon/JudyPrivate1L.h + libnetdata/libjudy/src/JudyCommon/JudyPrivateBranch.h + libnetdata/libjudy/src/JudyL/JudyL.h + libnetdata/libjudy/src/JudyL/JudyLByCount.c + libnetdata/libjudy/src/JudyL/JudyLCascade.c + libnetdata/libjudy/src/JudyL/JudyLCount.c + libnetdata/libjudy/src/JudyL/JudyLCreateBranch.c + libnetdata/libjudy/src/JudyL/JudyLDecascade.c + libnetdata/libjudy/src/JudyL/JudyLDel.c + libnetdata/libjudy/src/JudyL/JudyLFirst.c + libnetdata/libjudy/src/JudyL/JudyLFreeArray.c + libnetdata/libjudy/src/JudyL/j__udyLGet.c + libnetdata/libjudy/src/JudyL/JudyLGet.c + libnetdata/libjudy/src/JudyL/JudyLInsArray.c + libnetdata/libjudy/src/JudyL/JudyLIns.c + libnetdata/libjudy/src/JudyL/JudyLInsertBranch.c + libnetdata/libjudy/src/JudyL/JudyLMallocIF.c + libnetdata/libjudy/src/JudyL/JudyLMemActive.c + libnetdata/libjudy/src/JudyL/JudyLMemUsed.c + libnetdata/libjudy/src/JudyL/JudyLNext.c + libnetdata/libjudy/src/JudyL/JudyLNextEmpty.c + libnetdata/libjudy/src/JudyL/JudyLPrev.c + libnetdata/libjudy/src/JudyL/JudyLPrevEmpty.c + JudyLTables.c + libnetdata/libjudy/src/JudyHS/JudyHS.c) + +ADD_LIBRARY(judy STATIC + ${LIBJUDY_SOURCES}) + +ADD_EXECUTABLE(judyltablesgen + libnetdata/libjudy/src/JudyL/JudyLTablesGen.c) + +target_include_directories(judyltablesgen PUBLIC + libnetdata/libjudy/src + libnetdata/libjudy/src/JudyCommon) + +target_compile_options(judyltablesgen PUBLIC + -Wno-format + -Wno-format-security) + +include_directories(BEFORE ${CMAKE_SOURCE_DIR}/libnetdata/libjudy/src) + +target_compile_definitions(judyltablesgen PUBLIC + JU_64BIT + JUDYL) + +add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/JudyLTables.c + COMMAND judyltablesgen + DEPENDS judyltablesgen + ) + +target_include_directories(judy PUBLIC + libnetdata/libjudy/src + libnetdata/libjudy/src/JudyCommon) + +target_compile_definitions(judy PUBLIC + JU_64BIT + JUDYL) + +target_compile_options(judy PUBLIC + -Wno-sign-compare + -Wno-implicit-fallthrough) + +set(LIBJUDY_PREV_FILES + libnetdata/libjudy/src/JudyL/JudyLPrev.c + libnetdata/libjudy/src/JudyL/JudyLPrevEmpty.c) + +set(LIBJUDY_NEXT_FILES + libnetdata/libjudy/src/JudyL/JudyLNext.c + libnetdata/libjudy/src/JudyL/JudyLNextEmpty.c) + +set_source_files_properties(${LIBJUDY_PREV_FILES} PROPERTIES COMPILE_OPTIONS "-DJUDYPREV") +set_source_files_properties(${LIBJUDY_NEXT_FILES} PROPERTIES COMPILE_OPTIONS "-DJUDYNEXT") +set_source_files_properties(libnetdata/libjudy/src/JudyL/j__udyLGet.c PROPERTIES COMPILE_OPTIONS "-DJUDYGETINLINE") +set_source_files_properties(libnetdata/libjudy/src/JudyL/JudyLByCount.c PROPERTIES COMPILE_OPTIONS "-DNOSMARTJBB -DNOSMARTJBU -DNOSMARTJLB") +set_source_files_properties(JudyLTables.c PROPERTIES COMPILE_OPTIONS "-I${CMAKE_SOURCE_DIR}/libnetdata/libjudy/src/JudyL") + # ----------------------------------------------------------------------------- # netdata files diff --git a/Makefile.am b/Makefile.am index 43a951c2b8..f4ed61eb91 100644 --- a/Makefile.am +++ b/Makefile.am @@ -61,7 +61,6 @@ dist_noinst_DATA = \ netdata.spec \ packaging/bundle-ebpf.sh \ packaging/bundle-ebpf-co-re.sh \ - packaging/bundle-judy.sh \ packaging/bundle-libbpf.sh \ packaging/check-kernel-config.sh \ packaging/ebpf.checksums \ @@ -75,8 +74,6 @@ dist_noinst_DATA = \ packaging/installer/UPDATE.md \ packaging/jsonc.checksums \ packaging/jsonc.version \ - packaging/judy.checksums \ - packaging/judy.version \ packaging/libbpf.checksums \ packaging/libbpf.version \ packaging/protobuf.checksums \ @@ -480,6 +477,64 @@ database/sqlite/sqlite3.$(OBJEXT) : CFLAGS += -Wno-cast-function-type database/KolmogorovSmirnovDist.$(OBJEXT) : CFLAGS += -Wno-maybe-uninitialized if ENABLE_DBENGINE + noinst_LIBRARIES = libjudy.a + + libjudy_a_SOURCES = libnetdata/libjudy/src/Judy.h \ + libnetdata/libjudy/src/JudyCommon/JudyMalloc.c \ + libnetdata/libjudy/src/JudyCommon/JudyPrivate.h \ + libnetdata/libjudy/src/JudyCommon/JudyPrivate1L.h \ + libnetdata/libjudy/src/JudyCommon/JudyPrivateBranch.h \ + libnetdata/libjudy/src/JudyL/JudyL.h \ + libnetdata/libjudy/src/JudyL/JudyLByCount.c \ + libnetdata/libjudy/src/JudyL/JudyLCascade.c \ + libnetdata/libjudy/src/JudyL/JudyLCount.c \ + libnetdata/libjudy/src/JudyL/JudyLCreateBranch.c \ + libnetdata/libjudy/src/JudyL/JudyLDecascade.c \ + libnetdata/libjudy/src/JudyL/JudyLDel.c \ + libnetdata/libjudy/src/JudyL/JudyLFirst.c \ + libnetdata/libjudy/src/JudyL/JudyLFreeArray.c \ + libnetdata/libjudy/src/JudyL/j__udyLGet.c \ + libnetdata/libjudy/src/JudyL/JudyLGet.c \ + libnetdata/libjudy/src/JudyL/JudyLInsArray.c \ + libnetdata/libjudy/src/JudyL/JudyLIns.c \ + libnetdata/libjudy/src/JudyL/JudyLInsertBranch.c \ + libnetdata/libjudy/src/JudyL/JudyLMallocIF.c \ + libnetdata/libjudy/src/JudyL/JudyLMemActive.c \ + libnetdata/libjudy/src/JudyL/JudyLMemUsed.c \ + libnetdata/libjudy/src/JudyL/JudyLNext.c \ + libnetdata/libjudy/src/JudyL/JudyLNextEmpty.c \ + libnetdata/libjudy/src/JudyL/JudyLPrev.c \ + libnetdata/libjudy/src/JudyL/JudyLPrevEmpty.c \ + libnetdata/libjudy/src/JudyHS/JudyHS.c \ + $(NULL) + + nodist_libjudy_a_SOURCES = JudyLTables.c + + BUILT_SOURCES += JudyLTables.c + + CLEANFILES += JudyLTables.c + + libjudy_a_CFLAGS = $(LIBJUDY_CFLAGS) -DJUDYL -I$(abs_top_srcdir)/libnetdata/libjudy/src -I$(abs_top_srcdir)/libnetdata/libjudy/src/JudyCommon -Wno-sign-compare -Wno-implicit-fallthrough + + libnetdata/libjudy/src/JudyL/libjudy_a-JudyLPrev.$(OBJEXT) : CFLAGS += -DJUDYPREV + libnetdata/libjudy/src/JudyL/libjudy_a-JudyLPrevEmpty.$(OBJEXT) : CFLAGS += -DJUDYPREV + libnetdata/libjudy/src/JudyL/libjudy_a-JudyLNext.$(OBJEXT) : CFLAGS += -DJUDYNEXT + libnetdata/libjudy/src/JudyL/libjudy_a-JudyLNextEmpty.$(OBJEXT) : CFLAGS += -DJUDYNEXT + libnetdata/libjudy/src/JudyL/libjudy_a-JudyLByCount.$(OBJEXT) : CFLAGS += -DNOSMARTJBB -DNOSMARTJBU -DNOSMARTJLB + libnetdata/libjudy/src/JudyL/libjudy_a-j__udyLGet.$(OBJEXT) : CFLAGS += -DJUDYGETINLINE + + noinst_PROGRAMS = judyltablesgen + + judyltablesgen_SOURCES = libnetdata/libjudy/src/JudyL/JudyLTablesGen.c + judyltablesgen_CFLAGS = $(LIBJUDY_CFLAGS) -DJUDYL -I$(abs_top_srcdir)/libnetdata/libjudy/src -I$(abs_top_srcdir)/libnetdata/libjudy/src/JudyCommon -Wno-sign-compare -Wno-implicit-fallthrough + + judyltablesgen$(EXEEXT) : CFLAGS += -Wno-format -Wno-format-security + +JudyLTables.c: $(abs_top_srcdir)/libnetdata/libjudy/src/JudyL/JudyLTablesGen.c $(builddir)/judyltablesgen$(EXEEXT) + $(builddir)/judyltablesgen$(EXEEXT) + + libjudy_a-JudyLTables.$(OBJEXT) : CFLAGS += -I$(abs_top_srcdir)/libnetdata/libjudy/src/JudyL + RRD_PLUGIN_FILES += \ database/engine/rrdengine.c \ database/engine/rrdengine.h \ @@ -925,6 +980,11 @@ NETDATA_COMMON_LIBS = \ $(OPTIONAL_ATOMIC_LIBS) \ $(NULL) +if ENABLE_DBENGINE + NETDATA_COMMON_LIBS += libjudy.a \ + $(NULL) +endif + if LINK_STATIC_JSONC NETDATA_COMMON_LIBS += $(abs_top_srcdir)/externaldeps/jsonc/libjson-c.a endif diff --git a/configure.ac b/configure.ac index 906844b56a..377d08d6ab 100644 --- a/configure.ac +++ b/configure.ac @@ -42,6 +42,7 @@ AC_PROG_CXX AC_PROG_INSTALL PKG_PROG_PKG_CONFIG AC_USE_SYSTEM_EXTENSIONS +AC_PROG_RANLIB # ----------------------------------------------------------------------------- # configurable options @@ -468,45 +469,22 @@ OPTIONAL_JSONC_LIBS="${JSONC_LIBS}" test "${enable_dbengine}" = "yes" -a -z "${LZ4_LIBS}" && \ AC_MSG_ERROR([liblz4 required but not found. Try installing 'liblz4-dev' or 'lz4-devel'.]) - -AC_ARG_WITH([bundled-libJudy], - [AS_HELP_STRING([--with-bundled-libJudy],[Use the bundled version of Judy library (default is system-library)])], - [ - AC_MSG_CHECKING(for libJudy in $withval) - if test -f "externaldeps/libJudy/libJudy.a" -a -f "externaldeps/libJudy/Judy.h"; then - LIBS_BACKUP="${LIBS}" - LIBS="externaldeps/libJudy/libJudy.a" - AC_LINK_IFELSE([AC_LANG_SOURCE([[#include "externaldeps/libJudy/Judy.h" - int main (int argc, char **argv) { - Pvoid_t PJLArray = (Pvoid_t) NULL; - Word_t * PValue; - Word_t Index; - JLI(PValue, PJLArray, Index); - }]])], - [HAVE_libJudy_a="yes"], - [HAVE_libJudy_a="no"]) - LIBS="${LIBS_BACKUP}" - JUDY_LIBS="\$(abs_top_srcdir)/externaldeps/libJudy/libJudy.a" - JUDY_CFLAGS="-I \$(abs_top_srcdir)/externaldeps/libJudy" - AC_MSG_RESULT([$HAVE_libJudy_a]) - else - libjudy_dir="" - HAVE_libJudy_a="no" - AC_MSG_RESULT([$HAVE_libJudy_a]) - fi - ], - [HAVE_libJudy_a="no"]) - -if test "${HAVE_libJudy_a}" = "no"; then - AC_CHECK_LIB( - [Judy], - [JudyLIns], - [JUDY_LIBS="-lJudy"] - ) +AC_C_BIGENDIAN([], + [LIBJUDY_CFLAGS="-DJU_LITTLE_ENDIAN"], + [AC_MSG_ERROR([Could not find out system endiannnes])]) + +AC_CHECK_SIZEOF(void *) +if test "$ac_cv_sizeof_void_p" = 8; then + AC_MSG_RESULT(Detected 64-bit Build Environment) + LIBJUDY_CFLAGS="$LIBJUDY_CFLAGS -DJU_64BIT" +else + AC_MSG_RESULT(Detected 32-bit Build Environment) + LIBJUDY_CFLAGS="$LIBJUDY_CFLAGS -UJU_64BIT" fi -test "${enable_dbengine}" = "yes" -a -z "${JUDY_LIBS}" && \ - AC_MSG_ERROR([libJudy required but not found. Try installing 'libjudy-dev' or 'Judy-devel'.]) +AC_SUBST([LIBJUDY_CFLAGS]) + +JUDY_CFLAGS="-I \$(abs_top_srcdir)/libnetdata/libjudy/src" test "${enable_https}" = "yes" -a -z "${SSL_LIBS}" && \ AC_MSG_ERROR([OpenSSL required for HTTPS but not found. Try installing 'libssl-dev' or 'openssl-devel'.]) @@ -515,13 +493,12 @@ test "${enable_dbengine}" = "yes" -a -z "${SSL_LIBS}" && \ AC_MSG_ERROR([OpenSSL required for DBENGINE but not found. Try installing 'libssl-dev' or 'openssl-devel'.]) AC_MSG_CHECKING([if netdata dbengine should be used]) -if test "${enable_dbengine}" != "no" -a "${UV_LIBS}" -a "${LZ4_LIBS}" -a "${JUDY_LIBS}" -a "${SSL_LIBS}"; then +if test "${enable_dbengine}" != "no" -a "${UV_LIBS}" -a "${LZ4_LIBS}" -a "${SSL_LIBS}"; then enable_dbengine="yes" AC_DEFINE([ENABLE_DBENGINE], [1], [netdata dbengine usability]) OPTIONAL_LZ4_CFLAGS="${LZ4_CFLAGS}" OPTIONAL_LZ4_LIBS="${LZ4_LIBS}" OPTIONAL_JUDY_CFLAGS="${JUDY_CFLAGS}" - OPTIONAL_JUDY_LIBS="${JUDY_LIBS}" OPTIONAL_SSL_CFLAGS="${SSL_CFLAGS}" OPTIONAL_SSL_LIBS="${SSL_LIBS}" else @@ -1600,8 +1577,6 @@ AC_SUBST([OPTIONAL_MATH_CFLAGS]) AC_SUBST([OPTIONAL_MATH_LIBS]) AC_SUBST([OPTIONAL_UV_LIBS]) AC_SUBST([OPTIONAL_LZ4_LIBS]) -AC_SUBST([OPTIONAL_JUDY_CFLAGS]) -AC_SUBST([OPTIONAL_JUDY_LIBS]) AC_SUBST([OPTIONAL_SSL_LIBS]) AC_SUBST([OPTIONAL_JSONC_LIBS]) AC_SUBST([OPTIONAL_NFACCT_CFLAGS]) diff --git a/contrib/debian/control b/contrib/debian/control index ed8a6d58db..c5e5791ffa 100644 --- a/contrib/debian/control +++ b/contrib/debian/control @@ -7,7 +7,6 @@ Build-Depends: debhelper (>= 9.20160709), libelf-dev, libuv1-dev, liblz4-dev, - libjudy-dev, libssl-dev, libmnl-dev, libjson-c-dev, diff --git a/contrib/debian/control.xenial b/contrib/debian/control.xenial index 2659c389df..43246d7163 100644 --- a/contrib/debian/control.xenial +++ b/contrib/debian/control.xenial @@ -8,7 +8,6 @@ Build-Depends: debhelper (>= 9), libelf-dev, libuv1-dev, liblz4-dev, - libjudy-dev, libssl-dev, libmnl-dev, libjson-c-dev, diff --git a/libnetdata/libjudy/src/Judy.h b/libnetdata/libjudy/src/Judy.h new file mode 100644 index 0000000000..adfb5b53bb --- /dev/null +++ b/libnetdata/libjudy/src/Judy.h @@ -0,0 +1,622 @@ +#ifndef _JUDY_INCLUDED +#define _JUDY_INCLUDED +// _________________ +// +// Copyright (C) 2000 - 2002 Hewlett-Packard Company +// +// This program is free software; you can redistribute it and/or modify it +// under the term of the GNU Lesser General Public License as published by the +// Free Software Foundation; either version 2 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 Lesser General Public License +// for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// _________________ + +// @(#) $Revision: 4.52 $ $Source: /judy/src/Judy.h $ +// +// HEADER FILE FOR EXPORTED FEATURES IN JUDY LIBRARY, libJudy.* +// +// See the manual entries for details. +// +// Note: This header file uses old-style comments on #-directive lines and +// avoids "()" on macro names in comments for compatibility with older cc -Aa +// and some tools on some platforms. + + +// PLATFORM-SPECIFIC + +#ifdef JU_WIN /* =============================================== */ + +typedef __int8 int8_t; +typedef __int16 int16_t; +typedef __int32 int32_t; +typedef __int64 int64_t; + +typedef unsigned __int8 uint8_t; +typedef unsigned __int16 uint16_t; +typedef unsigned __int32 uint32_t; +typedef unsigned __int64 uint64_t; + +#else /* ================ ! JU_WIN ============================= */ + +// ISO C99: 7.8 Format conversion of integer types <inttypes.h> +#include <inttypes.h> /* if this FAILS, try #include <stdint.h> */ + +// ISO C99: 7.18 Integer types uint*_t +//#include <stdint.h> + +#endif /* ================ ! JU_WIN ============================= */ + +// ISO C99 Standard: 7.20 General utilities +#include <stdlib.h> + +// ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types +#include <limits.h> + +#ifdef __cplusplus /* support use by C++ code */ +extern "C" { +#endif + + +// **************************************************************************** +// DECLARE SOME BASE TYPES IN CASE THEY ARE MISSING: +// +// These base types include "const" where appropriate, but only where of +// interest to the caller. For example, a caller cares that a variable passed +// by reference will not be modified, such as, "const void * Pindex", but not +// that the called function internally does not modify the pointer itself, such +// as, "void * const Pindex". +// +// Note that its OK to pass a Pvoid_t to a Pcvoid_t; the latter is the same, +// only constant. Callers need to do this so they can also pass & Pvoid_t to +// PPvoid_t (non-constant). + +#ifndef _PCVOID_T +#define _PCVOID_T +typedef const void * Pcvoid_t; +#endif + +#ifndef _PVOID_T +#define _PVOID_T +typedef void * Pvoid_t; +typedef void ** PPvoid_t; +#endif + +#ifndef _WORD_T +#define _WORD_T +typedef unsigned long Word_t, * PWord_t; // expect 32-bit or 64-bit words. +#endif + +#ifndef NULL +#define NULL 0 +#endif + + +// **************************************************************************** +// SUPPORT FOR ERROR HANDLING: +// +// Judy error numbers: +// +// Note: These are an enum so theres a related typedef, but the numbers are +// spelled out so you can map a number back to its name. + +typedef enum // uint8_t -- but C does not support this type of enum. +{ + +// Note: JU_ERRNO_NONE and JU_ERRNO_FULL are not real errors. They specify +// conditions which are otherwise impossible return values from 32-bit +// Judy1Count, which has 2^32 + 1 valid returns (0..2^32) plus one error +// return. These pseudo-errors support the return values that cannot otherwise +// be unambiguously represented in a 32-bit word, and will never occur on a +// 64-bit system. + + JU_ERRNO_NONE = 0, + JU_ERRNO_FULL = 1, + JU_ERRNO_NFMAX = JU_ERRNO_FULL, + +// JU_ERRNO_NOMEM comes from malloc(3C) when Judy cannot obtain needed memory. +// The system errno value is also set to ENOMEM. This error can be recoverable +// if the calling application frees other memory. +// +// TBD: Currently there is no guarantee the Judy array has no memory leaks +// upon JU_ERRNO_NOMEM. + + JU_ERRNO_NOMEM = 2, + +// Problems with parameters from the calling program: +// +// JU_ERRNO_NULLPPARRAY means PPArray was null; perhaps PArray was passed where +// &PArray was intended. Similarly, JU_ERRNO_NULLPINDEX means PIndex was null; +// perhaps &Index was intended. Also, JU_ERRNO_NONNULLPARRAY, +// JU_ERRNO_NULLPVALUE, and JU_ERRNO_UNSORTED, all added later (hence with +// higher numbers), mean: A non-null array was passed in where a null pointer +// was required; PValue was null; and unsorted indexes were detected. |