]> sourceware.org Git - newlib-cygwin.git/commit
To reduce the size of an rb_node, drop the color
authordougm <dougm@FreeBSD.org>
Tue, 9 Jun 2020 20:19:11 +0000 (20:19 +0000)
committerSebastian Huber <sebastian.huber@embedded-brains.de>
Mon, 26 Oct 2020 13:18:46 +0000 (14:18 +0100)
commit5b29be92e3267109c3cb48d22fa9e0f09aa9d150
treeb3f936d2ed961d5c9c90ec2ae5a9dc036661cd8b
parent123df813ee5a688545ce38367006241b1de20d7b
To reduce the size of an rb_node, drop the color

field. Set the least significant bit in the pointer to the node from its parent
to indicate that the node is red. Have the tree rotation macros leave the
old-parent/new-child node red and the new-parent/old-child node black.

This change makes RB_LEFT and RB_RIGHT no longer assignable, and
RB_COLOR no longer defined. Any code that modifies the tree or
examines a node color would have to be modified after this change.

Reviewed by: markj
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D25105
newlib/libc/include/sys/tree.h
This page took 0.032278 seconds and 5 git commands to generate.