[haiku-bugs] Re: [Haiku] #16031: MediaPlayer uses too much RAM?

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Mon, 08 Jun 2020 20:31:05 -0000

#16031: MediaPlayer uses too much RAM?
-----------------------------+----------------------------
  Reporter:  miqlas          |      Owner:  nobody
      Type:  bug             |     Status:  new
  Priority:  normal          |  Milestone:  Unscheduled
 Component:  Kits/Media Kit  |    Version:  R1/Development
Resolution:                  |   Keywords:
Blocked By:                  |   Blocking:
  Platform:  All             |
-----------------------------+----------------------------
Comment (by ttcoder):

 Seems there is a (small) leak regression indeed. Here's the result for 50
 runs:

 {{{
 $ uname -a
 Haiku shredder 1 hrev54154+31 May 13 2020 03:10: x86_64 x86_64 Haiku
 $ gcc -g BMediaFile-leak.cpp -lbe -lmedia -lroot_debug
 $ LD_PRELOAD=libroot_debug.so ./a.out > bmedia_result
 $ cat bmedia_result | sort | uniq

 ------done decoding file-------
 total allocations: 393; total bytes: 192199
 total allocations: 5114; total bytes: 774543
 total allocations: 5115; total bytes: 774631
 total allocations: 5116; total bytes: 774719
 total allocations: 5117; total bytes: 774807
 total allocations: 5118; total bytes: 774895
 total allocations: 5119; total bytes: 774983
 total allocations: 5120; total bytes: 775071
 total allocations: 5121; total bytes: 775159
 total allocations: 5122; total bytes: 775247
 total allocations: 5123; total bytes: 775335
 total allocations: 5124; total bytes: 775423
 total allocations: 5125; total bytes: 775511
 total allocations: 5126; total bytes: 775599
 total allocations: 5127; total bytes: 775687
 total allocations: 5128; total bytes: 775775
 total allocations: 5129; total bytes: 775863
 total allocations: 5130; total bytes: 775951
 total allocations: 5131; total bytes: 776039
 total allocations: 5132; total bytes: 776127
 total allocations: 5133; total bytes: 776215
 total allocations: 5134; total bytes: 776303
 total allocations: 5135; total bytes: 776391
 total allocations: 5136; total bytes: 776479
 total allocations: 5137; total bytes: 776567
 total allocations: 5138; total bytes: 776655
 total allocations: 5139; total bytes: 776743
 total allocations: 5140; total bytes: 776831
 total allocations: 5141; total bytes: 776919
 total allocations: 5142; total bytes: 777007
 total allocations: 5143; total bytes: 777095
 total allocations: 5144; total bytes: 777183
 total allocations: 5145; total bytes: 777271
 total allocations: 5146; total bytes: 777359
 total allocations: 5147; total bytes: 777447
 total allocations: 5148; total bytes: 777535
 total allocations: 5149; total bytes: 777623
 total allocations: 5150; total bytes: 777711
 total allocations: 5151; total bytes: 777799
 total allocations: 5152; total bytes: 777887
 total allocations: 5153; total bytes: 777975
 total allocations: 5154; total bytes: 778063
 total allocations: 5155; total bytes: 778151
 total allocations: 5156; total bytes: 778239
 total allocations: 5157; total bytes: 778327
 total allocations: 5158; total bytes: 778415
 total allocations: 5159; total bytes: 778503
 total allocations: 5160; total bytes: 778591
 total allocations: 5161; total bytes: 778679
 total allocations: 5162; total bytes: 778767
 total allocations: 5163; total bytes: 778855
 total allocations: 5363; total bytes: 860087
 total allocations: 5363; total bytes: 862615
 total allocations: 5365; total bytes: 860263
 total allocations: 5365; total bytes: 860279
 total allocations: 5367; total bytes: 860455
 total allocations: 5370; total bytes: 860735
 total allocations: 5371; total bytes: 861447
 total allocations: 5372; total bytes: 860911
 total allocations: 5373; total bytes: 861623
 total allocations: 5374; total bytes: 865967
 total allocations: 5374; total bytes: 867007
 total allocations: 5376; total bytes: 861887
 total allocations: 5376; total bytes: 862495
 total allocations: 5376; total bytes: 867183
 total allocations: 5379; total bytes: 863367
 total allocations: 5380; total bytes: 862239
 total allocations: 5380; total bytes: 862847
 total allocations: 5380; total bytes: 863455
 total allocations: 5383; total bytes: 863719
 total allocations: 5384; total bytes: 863807
 total allocations: 5386; total bytes: 864591
 total allocations: 5388; total bytes: 864767
 total allocations: 5389; total bytes: 864247
 total allocations: 5389; total bytes: 864855
 total allocations: 5393; total bytes: 867639
 total allocations: 5395; total bytes: 862935
 total allocations: 5396; total bytes: 867295
 total allocations: 5398; total bytes: 868079
 total allocations: 5400; total bytes: 865823
 total allocations: 5400; total bytes: 869295
 total allocations: 5401; total bytes: 869383
 total allocations: 5402; total bytes: 869471
 total allocations: 5403; total bytes: 869559
 total allocations: 5404; total bytes: 867999
 total allocations: 5404; total bytes: 869647
 total allocations: 5407; total bytes: 868871
 total allocations: 5408; total bytes: 868959
 total allocations: 5409; total bytes: 868439
 total allocations: 5409; total bytes: 869047
 total allocations: 5410; total bytes: 868527
 total allocations: 5411; total bytes: 868615
 total allocations: 5412; total bytes: 868095
 total allocations: 5413; total bytes: 869399
 total allocations: 5414; total bytes: 867663
 total allocations: 5415; total bytes: 867143
 total allocations: 5415; total bytes: 868967
 total allocations: 5416; total bytes: 870703
 total allocations: 5418; total bytes: 869839
 total allocations: 5421; total bytes: 871143
 total allocations: 5422; total bytes: 871231
 }}}

 The "normal" sustained leak rate is 80 bytes per BMediaFile/Track, so for
 50 runs that should be 80*50=4000 bytes.
 Yet there is 871231 - 774543 or ca. 100'000 bytes leaked per fifty runs.
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/16031#comment:9>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: