LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 12-17-2015, 04:45 PM   #1
dlevy022
LQ Newbie
 
Registered: Nov 2015
Posts: 10

Rep: Reputation: Disabled
Why does vm_area_struct have both rb tree node links and linked list links?


I'm looking at http://lxr.free-electrons.com/source...m_types.h#L275 and trying to understand how vm_area_struct works and I'm confused why there are linked list references *vm_next, *vm_prev and red black tree references rb_node vm_rb. Are both sets of references included for convenience/efficiency of searching a vma?
 
Old 12-22-2015, 07:48 PM   #2
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,642
Blog Entries: 4

Rep: Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933
The RB tree pointers are effectively an index.
 
  


Reply

Tags
memory management


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] linked list node parsing atlantis43 Programming 1 12-11-2013 03:27 PM
[SOLVED] Why do symbolic links retain data of deleted files to which they previously linked lityit Linux - General 2 11-05-2011 10:35 PM
web page/links links/links vendtagain Linux - Newbie 2 09-19-2009 08:13 PM
Seg Fault in GCC when deleting Node from Linked List gren838 Programming 2 12-11-2005 04:21 PM
links (hard links and soft links..) sachitha Programming 1 08-10-2005 12:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 09:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration