| Electronics > Projects, Designs, and Technical Stuff |
| Excellent Queue, Circular buffer, FIFO, LIFO,FILO,LILO, stack, etc... C library |
| (1/1) |
| ali_asadzadeh:
We use all kinds of data buffers in our daily life programs , I know it may be sound a dumb question, and I know there are countless implementations out there, But I want to know if you know some better C libraries for these different kinds of buffers, with embedded concerns in mind. :) ;) |
| Nusa:
Exercise for the reader: 1) How many different names for buffer types have you heard of? 2) How many of those are really different names for the same thing? Is there a difference between a queue and FIFO? How about a stack and LIFO? Are LILO and FIFO different? 3) How many unique buffer types can you think of? |
| ali_asadzadeh:
:D Thanks for the info, I know they have different names, but we have at least 3-4 types. so do you recommend any implementation? |
| Nusa:
There are many types of data structures, but for the subset called buffers, you really only have two basic types. FIFO and LIFO. Everything else is implementation details. FIFO = LILO = Queue = some of your etc. Circular buffer is a common way to implement a FIFO. LIFO = FILO = Stack = the rest of your etc. Here's a couple links to read and learn from. Several different implementations are presented, with code. This is simple stuff, so there isn't much code. Turn them into libraries if you want. https://www.geeksforgeeks.org/stack-data-structure/ https://www.geeksforgeeks.org/queue-data-structure/ As for which methods will work well for a particular task, you really need to detail the task first. Pointing you at random libraries isn't going to do you any favors, especially in the embedded world where hardware resources are limited. |
| ali_asadzadeh:
Thanks, I also have founded this geeksforgeeks web site :) ;) it's a great website. |
| Navigation |
| Message Index |