nuttx/include
chenrun1 a1ccf15e39 idr:Tool for associating discrete ids with addresses
This is a tool for associating discrete IDs with addresses.
This tool is implemented through the red-black tree method provided by <sys/tree.h>, and the time complexity when calling, searching, and deleting is optimized to O(logn)
The implementation is the moving node operation of two red-black trees
1. When applying for a node, it will first check whether there is an available node in the "removed" tree. If so, the memory address of the node will be reused and moved to the "alloced" tree.
2. If the "removed" tree is an "empty tree", then the node will be requested from the memory and added to the "alloced" tree
3. Similarly, when removing a node, we set the address pointed to in the node to "NULL" and move it to the "removed" tree. Next time we alloc the node, we can reduce the overhead caused by memory application
For now, we still have something that can be optimized, and that is the memory elimination mechanism of the "removed tree". The current implementation will only release all the content under the "removed" tree when the idtree is destroyed.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-19 11:05:40 -03:00
..
android libc/misc: add fdsan module 2023-05-17 10:24:42 +08:00
arpa
crypto include/crypto/curve25519.h: fix gcc14 error 2024-05-31 18:14:11 -03:00
cxx add rint and expm1 function to cmath from libm 2024-07-12 12:05:54 +08:00
net ioctl: add definitions related to ethtool 2023-11-03 22:37:50 +08:00
netinet netinet/in.h: add macro definitions to resolve compilation errors 2024-08-19 19:49:42 +08:00
netpacket net/netlink: Add RTM preifx notify support 2024-05-14 10:05:37 -03:00
nuttx idr:Tool for associating discrete ids with addresses 2024-08-19 11:05:40 -03:00
ssp
sys v9fs:File system based on 9P2000L. 2024-08-19 11:05:40 -03:00
.gitignore .gitignore: add ignore 2024-03-14 22:47:55 +08:00
aio.h aio: change aio_fildes int type 2023-09-08 00:59:31 +03:00
alloca.h libs/alloca: add alloca implement for MSVC 2023-08-28 11:10:08 -03:00
assert.h include: When defining NDEBUG, assert will implement alignment standards 2024-05-17 10:18:16 -03:00
byteswap.h
ctype.h Add basic support for locales in order to C++ streams to build and work for simple cases (POSIX / C locale). 2024-04-29 17:34:10 +08:00
debug.h rpmsg/debug: add debug configs and macros 2024-02-15 19:53:55 -08:00
dirent.h fs: Undefine CONFIG_FS_LARGEFILE if compiler doesn't support long long 2023-03-02 09:37:58 +01:00
dlfcn.h dlfcn: Add stub for dladdr 2024-07-26 14:39:10 -03:00
dsp.h libdsp: fix gcc14 error and clean up includes 2024-06-02 09:27:36 -03:00
dspb16.h libdsp: fix gcc14 error and clean up includes 2024-06-02 09:27:36 -03:00
elf32.h Fix and improve dynamic loader 2023-07-13 10:11:58 +08:00
elf64.h Fix loading of ET_DYN type of shared objects 2023-09-20 09:35:28 -04:00
elf.h coredump:support coredump aligned access registers 2024-08-12 02:02:25 +08:00
endian.h libc: Add sys/endian.h to improve the compatiblity with bionic libc 2023-01-15 12:26:15 -03:00
err.h include/err: Enforce c linkage for err and warn functions. 2023-05-01 12:48:55 +08:00
errno.h Fix nuttx coding style 2023-07-11 23:32:17 +08:00
execinfo.h libc/execinfo: extract a common backtrace format function 2024-06-29 22:44:39 +08:00
fcntl.h libc/unistd: added an implementation of the lib_flock function 2024-07-14 10:51:41 -03:00
fixedmath.h fixedmath: add abs and sign operations 2023-10-07 21:25:56 +08:00
fnmatch.h
ftw.h fs: Undefine CONFIG_FS_LARGEFILE if compiler doesn't support long long 2023-03-02 09:37:58 +01:00
getopt.h Implement getopt_long() and getopt_long_only() 2021-04-01 23:06:23 -05:00
glob.h
grp.h
hex2bin.h libs/libc/hex2bin: enhance 64-bit compatibility 2023-08-11 19:43:37 +08:00
iconv.h libc/locale: support iconv_open,iconv,iconv_close 2023-04-25 19:12:53 +01:00
ifaddrs.h ifaddrs: add union ifa_ifu include ifu_broadaddr and ifu_dstaddr 2023-07-08 15:42:11 +08:00
inttypes.h libs/libc/inttypes: add support for imaxdiv 2024-04-23 10:26:48 -03:00
iso646.h
langinfo.h The character U+ff0c "," could be confused with the ASCII character U+002c ",", which is more common in source code. 2023-10-03 16:53:12 -04:00
libgen.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
libintl.h compiler.h: Add _ between format|printf|syslog|scanf|strftime and like 2022-12-21 01:05:19 +02:00
limits.h clock: replace all up_perf_xx with perf_xx 2023-10-02 16:11:43 +02:00
locale.h
lzf.h Indent the define statement by two spaces 2023-05-21 09:52:08 -03:00
malloc.h mm: record the maximum system memory usage 2023-11-09 09:08:49 +08:00
mqueue.h fs/mqueue: Fix the wrong field type in mq_attr as the spec and add the logical judgment to deal with the condition when mq_maxmsg or mq_msgsize is less than zero or equal to zero. 2023-08-03 03:10:56 -07:00
netdb.h libc/netdb: add proto.c 2022-12-10 02:36:24 +08:00
nl_types.h
nxflat.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
obstack.h compiler.h: Add _ between format|printf|syslog|scanf|strftime and like 2022-12-21 01:05:19 +02:00
poll.h
pthread.h pthread: add pthread_self/pthread_gettid_np function 2024-06-26 17:40:55 +08:00
pty.h drivers/serial: Always support c_oflag, c_iflag and c_lflag in termios 2023-03-19 14:54:59 -06:00
pwd.h pwd: Add initial implementation of getpwent 2023-07-31 07:50:10 -07:00
regex.h include/regex.h: add missing FAR 2023-05-19 02:40:38 +08:00
resolv.h Add dn resolution function 2022-03-17 09:37:15 +02:00
sched.h sched.h: add SCHED_BATCH and SCHED_IDLE definition 2024-07-14 13:20:53 -03:00
search.h hsearch_r: add DELETE action 2024-02-21 13:29:36 -03:00
semaphore.h semaphore: Optimize priority inheritance with only one holder 2023-06-17 08:26:46 +03:00
signal.h sigaction: Expand si_user for non-kernel signals 2023-11-22 08:00:43 -08:00
spawn.h libs/libc/spawn: Add minimal implementation for posix_spawnattr_destory. 2023-10-31 13:42:00 +08:00
stdbool.h
stddef.h
stdint.h Fix nuttx coding style 2023-07-11 23:32:17 +08:00
stdio.h libc: add support for open_memstream 2023-11-29 02:13:19 -08:00
stdlib.h libc: add support for reallocarray 2024-04-17 11:36:39 -03:00
stdnoreturn.h
string.h Support gcc FORTIFY_SOURCE features for nuttx libc 2023-06-22 20:38:45 +08:00
strings.h libc/lib_bzero:Add bzero prototype. 2024-05-07 14:59:05 +02:00
syscall.h syscall: export UP_WRAPSYM/UP_REALSYM macro 2022-12-30 22:13:34 +08:00
syslog.h syslog: add syslog option definition 2023-05-05 18:36:36 +08:00
termios.h
threads.h Fix typo in mtx_timedlock 2024-02-02 09:03:18 -08:00
time.h include: move clockid_t and time[r]_t define to sys/types.h 2023-08-19 09:08:40 +03:00
unistd.h unistd.h: Adds some posix supported definitions. 2024-06-19 20:47:49 +08:00
utime.h
uuid.h libc: Add uuid implemenation 2020-07-21 21:48:18 -07:00
wchar.h libs/libc/wchar: add ungetwc implementation 2023-12-17 01:39:06 -08:00
wctype.h