diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-07-15 16:39:41 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-07-15 16:39:41 +0000 |
| commit | 31fad5846516ee1e6135bd35f0478b93928a3759 (patch) | |
| tree | dc741b07274da81cea1fd56c67383d35ce29c7c1 /scripts | |
| parent | shm: add shm_get_many() - allows buffers to share a single pool (diff) | |
url-mode: use shm_get_many()
If we have lots of URLs, we use up a *lot* of SHM buffers (and thus
pools). Each and every one is a single mmap(), of at least 4K.
Since all URL labels are created and destroyed at the same time, it
makes sense to use a single pool for all buffers.
To do this, we must now do two passes; first one to generate the
actual string (label content), and to calculate the label sizes.
Then we use this information to allocate all SHM buffers at once, from
the same pool.
Finally, we iterate the URLs again, this time to actually render them.
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
