Re:Basic Data Structures and Algorithms in the Linux Kernel
by chintanp on Saturday November 23, 2013 @07:07PM
(#6788014)
My favorite algorithm has been the linked list implementation, pretty useful for implementing list on embedded platforms.
[ Parent
| on HN ]
Re:Basic Data Structures and Algorithms in the Linux Kernel
by goostavos on Sunday November 24, 2013 @12:31AM
(#6788831)
I've really got to force myself to learn these data structures. The circular, doubly linked list is one of my favorite structures, I oddly find myself reaching for it all the time. Which is funny, because when I first had to implement it at school, I thought I would never ever have a use for such a thing. But now, years later, I don't know what I'd do without it!
I wonder what I missed out on by glossing over things like red-black trees.
Re:Basic Data Structures and Algorithms in the Linux Kernel
by ExpiredLink on Sunday November 24, 2013 @06:08AM
(#6789322)
> My favorite algorithm has been the linked list implementation, pretty useful for implementing list on embedded platforms.
You can use GPL'd code for your work?
Re:Basic Data Structures and Algorithms in the Linux Kernel
by octo_t on Monday November 25, 2013 @06:55AM
(#6793581)
I'm guessing you mean "can't use GPL'd code" here.
embedded work is different, in that you often embed your container in your data-structure, so you end up with something like:
typedef struct {
int x;
int y;
Point *next;
} Point;
this allows you to save on overhead of extra allocations when creating your list (but does mean you need to create extra functions for Point* find_list(Point* p, int x, int y);
Re:Basic Data Structures and Algorithms in the Linux Kernel
by eps on Monday November 25, 2013 @11:23AM
(#6794972)
That's not what he meant.
He meant that GP is so dumb that he is forced to use Linux .h in his project (along with all arch dependencies) rather than to take 5 minutes and code it from scratch. And that he is ignorant of licensing matters of GPL'd code or, more likely, he just doesn't give a f_ck about them. That'd be the gist of what ExpiredLink meant.
Re:Basic Data Structures and Algorithms in the Linux Kernel
by VLM on Sunday November 24, 2013 @08:25AM
(#6789547)
I'm not making much sense of that comment.
Re:Basic Data Structures and Algorithms in the Linux Kernel
by andreasvc on Sunday November 24, 2013 @10:00AM
(#6789729)
GP is wondering whether the original poster is allowed to use code under the GPL license by his employer. This license requires derived code to be distributed under the same license, which companies may not want to do because trade secrets etc.
Re:Basic Data Structures and Algorithms in the Linux Kernel
by kaoD on Sunday November 24, 2013 @02:02PM
(#6790599)
GP meant to ask: how is that relevant?
Re:Basic Data Structures and Algorithms in the Linux Kernel
by VLM on Monday November 25, 2013 @07:52AM
(#6793754)
Google for "BSD linked list" and get 293000 results. Its an old data structure, much older than the GPL. Also its very popular. Google for "ruby linked list gem" and simply use a debugged library. Or any other language of your choice. Being a very popular data structure there likely exist implementations under most licenses for most languages. So it just struck me as weird that in 2013 someone would cut-n-paste reimplement one found in the kernel other than for obvious academic or educational interest or direct interface with the kernel (device driver author?)