Commit 378cf4b
committed
Add configurable pixmap caching with LRU eviction
This commit implements transparent pixmap caching to improve performance
by reusing frequently allocated pixmaps with identical format and
dimensions.
Cache features:
- Automatic operation in twin_pixmap_create/destroy
- LRU eviction policy respecting reference counts to prevent use-after-free
- Hash-based lookup with collision handling via eviction
Configuration options (added to Features menu):
- CONFIG_PIXMAP_CACHE: Enable/disable caching (default: y)
- CONFIG_PIXMAP_CACHE_SIZE: Entry count 4-32 (default: 8)
- CONFIG_PIXMAP_CACHE_MAX_KB: Memory limit 16-512KB (default: 64KB)1 parent c8834d1 commit 378cf4b
2 files changed
+387
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
80 | 106 | | |
81 | 107 | | |
82 | 108 | | |
| |||
0 commit comments