diff options
author | wm4 <wm4@nowhere> | 2019-07-06 23:52:31 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-09-19 20:37:05 +0200 |
commit | 11027e99f246371837f9d866936066282da11b9f (patch) | |
tree | f3ad4512fec7732a6b8f0a2b5a5d44226b66cea3 /video/vdpau_mixer.h | |
parent | 3cea180cc05cbf5f270e171f710f11288a1d2dfe (diff) | |
download | mpv-11027e99f246371837f9d866936066282da11b9f.tar.bz2 mpv-11027e99f246371837f9d866936066282da11b9f.tar.xz |
packet: change memory estimation heuristics
Determining how much memory something uses is very hard, especially in
high level code (yes we call code using malloc high level). There's no
way to get an exact amount, especially since the malloc arena is shared
with the entire process anyway. So the demuxer packet cache tries to get
by with an estimate using a number of rough guesses.
It seems this wasn't quite good. In some ways, it was too optimistic, in
others it seemed to account for too much data. Try to get it closer to
what malloc and ta probably do. In particular, talloc adds some
singificant overhead (using talloc for mass-data was a mistake, and it's
even my fault). The result appears to match better with measured memory
usage. This is still extremely dependent on malloc implementation and so
on.
The effect is that you may need to adjust the demuxer cache limits to
cache as much data as it did before this commit. In any case, seems to
be better for me.
Diffstat (limited to 'video/vdpau_mixer.h')
0 files changed, 0 insertions, 0 deletions