libmyrtx
Contents:
Getting Started with libmyrtx
Prerequisites
Building from Source
Using the Build Script
Integration into Your Project
Using CMake
Using as an Installed Library
Manual Integration
Basic Usage Example
Next Steps
User Guides
Arena Allocator Guide
Overview
Why Use an Arena Allocator?
Basic Usage
Initializing an Arena
Allocating Memory from the Arena
Comparison: Arena Allocator vs. malloc/free
Temporary Arenas: When and How to Use
Scratch Arenas: Short-lived, Automatic Memory Management
A More Comprehensive Example: Parser with Arena Allocator
Recommendations for Different Arena Types
Performance Optimization with the Arena Allocator
Conclusion
Context System Guide
Overview
Why Use the Context System?
Basic Usage
Creating and Managing Contexts
Error Handling
State Management
Advanced Features
Context Hierarchy
Ownership Example
Context Extensions
Real-world Example: Web Server Request Handling
Best Practices
Conclusion
String Utility Guide
Overview
Why a Special String Library?
Core Concepts
Dynamic Strings
String Views
Basic Usage
Creating and Freeing Strings
With Arena Allocator
String Operations
Appending Data
String Comparison
String Modification
String Searching
Using String Views
Creating Formatted Strings
Advanced Concepts
Memory Reservation
Memory Optimization
String Extraction
Efficiency and Performance
Best Practices
Migration Example
Error Handling
Conclusion
Hash Table Guide
What is a Hash Table?
When to Use a Hash Table
Basic Usage
Creating a Hash Table
Inserting Elements
Finding Elements
Removing Elements
Getting Hash Table Statistics
Advanced Usage
Custom Hash Functions
Iterating Over a Hash Table
Using with Complex Data Types
Performance Considerations
Common Use Cases
Conclusion
AVL Tree Guide
What is an AVL Tree?
When to Use an AVL Tree
Basic Usage
Creating an AVL Tree
Inserting Elements
Finding Elements
Removing Elements
Traversing the Tree
Finding Min/Max Elements
Advanced Usage
Custom Comparison Functions
Custom Memory Management
Performance Considerations
Common Use Cases
Conclusion
API Reference
Memory API
Arena Allocator
Types
Initialization and Cleanup
Memory Allocation
Temporary Arenas
Scratch Arenas
Helper Functions
Statistics and Information
Collections API
AVL Tree
Types
Creation and Destruction
Insertion and Removal
Lookup Functions
Traversal Functions
Utility Functions
Min/Max Functions
Predefined Comparison Functions
Hash Table
Types
Creation and Destruction
Insertion and Removal
Lookup Functions
Utility Functions
Predefined Hash Functions
Context API
Context Management
Types
Creation and Destruction
Ownership Semantics
Error Handling
Extension Management
State Management
Inheritance and Propagation
String API
Overview
Types
Creation and Destruction
String Operations
Replace
String Views
String Access
String Modification
String Searching
String Comparison
String Modification
String Utility Functions
Examples
Arena Allocator Example
Expected Output
Compilation and Execution
Notes
AVL Tree Example
Complete Example
Expected Output
Key Concepts Demonstrated
Building and Running
Further Exploration
Context System Example
Overview
Example Code
How to Compile and Run
Expected Output
Code Walkthrough
Key Insights
String Manipulation Example
Overview
Example Code
How to Compile and Run
Expected Output
Code Walkthrough
Key Insights
Hash Table Example
Overview
Code Example
Explanation
Compilation
Expected Output
libmyrtx
Index
Index
M
M
myrtx_arena_alloc (C function)
myrtx_arena_alloc_aligned (C function)
myrtx_arena_calloc (C function)
myrtx_arena_free (C function)
myrtx_arena_init (C function)
myrtx_arena_memdup (C function)
myrtx_arena_realloc (C function)
myrtx_arena_reset (C function)
myrtx_arena_strdup (C function)
myrtx_arena_strndup (C function)
myrtx_arena_t (C type)
myrtx_arena_temp_begin (C function)
myrtx_arena_temp_end (C function)
myrtx_arena_total_allocated (C function)
myrtx_avl_compare_function (C type)
myrtx_avl_compare_integers (C function)
myrtx_avl_compare_strings (C function)
myrtx_avl_free_function (C type)
myrtx_avl_node_t (C type)
myrtx_avl_tree_contains (C function)
myrtx_avl_tree_create (C function)
myrtx_avl_tree_find (C function)
myrtx_avl_tree_free (C function)
myrtx_avl_tree_height (C function)
myrtx_avl_tree_insert (C function)
myrtx_avl_tree_is_empty (C function)
myrtx_avl_tree_max (C function)
myrtx_avl_tree_min (C function)
myrtx_avl_tree_remove (C function)
myrtx_avl_tree_size (C function)
myrtx_avl_tree_t (C type)
myrtx_avl_tree_traverse_inorder (C function)
myrtx_avl_tree_traverse_postorder (C function)
myrtx_avl_tree_traverse_preorder (C function)
myrtx_avl_visit_function (C type)
myrtx_context_clear_error (C function)
myrtx_context_create (C function)
myrtx_context_create_child (C function)
myrtx_context_destroy (C function)
myrtx_context_get_error (C function)
myrtx_context_get_extension (C function)
myrtx_context_get_parent (C function)
myrtx_context_get_value (C function)
myrtx_context_has_error (C function)
myrtx_context_propagate_error (C function)
myrtx_context_register_extension (C function)
myrtx_context_remove_value (C function)
myrtx_context_set_error (C function)
myrtx_context_set_value (C function)
myrtx_context_t (C type)
myrtx_extension_info_t (C type)
myrtx_hashtable_capacity (C function)
myrtx_hashtable_compare_function (C type)
myrtx_hashtable_contains (C function)
myrtx_hashtable_create (C function)
myrtx_hashtable_destroy (C function)
myrtx_hashtable_entry_t (C type)
myrtx_hashtable_free_function (C type)
myrtx_hashtable_get (C function)
myrtx_hashtable_hash_function (C type)
myrtx_hashtable_hash_integer (C function)
myrtx_hashtable_hash_string (C function)
myrtx_hashtable_insert (C function)
myrtx_hashtable_is_empty (C function)
myrtx_hashtable_remove (C function)
myrtx_hashtable_size (C function)
myrtx_hashtable_t (C type)
myrtx_scratch_arena_t (C type)
myrtx_scratch_begin (C function)
myrtx_scratch_end (C function)
myrtx_string_append (C function)
myrtx_string_append_char (C function)
myrtx_string_append_cstr (C function)
myrtx_string_append_format (C function)
myrtx_string_append_format_va (C function)
myrtx_string_append_string (C function)
myrtx_string_clear (C function)
myrtx_string_compare (C function)
myrtx_string_compare_cstr (C function)
myrtx_string_create (C function)
myrtx_string_create_from_arena (C function)
myrtx_string_create_from_buffer (C function)
myrtx_string_create_from_cstr (C function)
myrtx_string_create_from_string (C function)
myrtx_string_cstr (C function)
myrtx_string_equals (C function)
myrtx_string_equals_cstr (C function)
myrtx_string_erase (C function)
myrtx_string_find (C function)
myrtx_string_format (C function)
myrtx_string_format_va (C function)
myrtx_string_free (C function)
myrtx_string_insert (C function)
myrtx_string_is_empty (C function)
myrtx_string_length (C function)
myrtx_string_replace (C function)
,
[1]
myrtx_string_reserve (C function)
myrtx_string_resize (C function)
myrtx_string_rfind (C function)
myrtx_string_shrink_to_fit (C function)
myrtx_string_substr (C function)
myrtx_string_t (C type)
myrtx_string_to_lower (C function)
myrtx_string_to_upper (C function)
myrtx_string_trim (C function)
myrtx_string_trim_left (C function)
myrtx_string_trim_right (C function)
myrtx_string_view_from_buffer (C function)
myrtx_string_view_from_cstr (C function)
myrtx_string_view_from_string (C function)
myrtx_string_view_t (C type)