3 links tagged with all of: data-structures + memory-management
Click any tag below to further narrow down your results
Links
This article discusses two methods for representing hierarchical structures like trees. It contrasts using an array of child pointers with a more memory-efficient approach that employs first-child and next-sibling pointers. Each method has its trade-offs in terms of memory management and access speed.
The article discusses the evolution of programming challenges from the 1980s to today, using the example of developing a spellchecker for a word processor. It highlights the complexity of handling limited memory and storage in the past compared to the simplicity of modern programming languages, which allow for quick and efficient implementations. Ultimately, it emphasizes the significant advancements in programming that have made complex tasks trivial.
The article presents a method for creating type-safe generic data structures in C using unions to associate type information, illustrated through the implementation of a linked list. It discusses various approaches, including macro-based generics and the use of void pointers, highlighting their advantages and disadvantages while proposing solutions to common problems such as memory management and type safety. Additionally, it emphasizes the importance of understanding compiler behavior regarding type definitions and provides practical examples for implementation.