[haiku-bugs] Re: [Haiku] #18183: Strange out of memory issue while allocating bitmaps and saving to disk

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Wed, 28 Dec 2022 09:31:19 -0000

#18183: Strange out of memory issue while allocating bitmaps and saving to disk
-------------------------+-------------------------
  Reporter:  jackburton  |      Owner:  nobody
      Type:  bug         |     Status:  new
  Priority:  normal      |  Milestone:  Unscheduled
 Component:  System      |    Version:
Resolution:              |   Keywords:
Blocked By:              |   Blocking:
  Platform:  x86         |
-------------------------+-------------------------
Description changed by jackburton:

Old description:

While trying to fix a problem in BeScreenCapture I managed to create a
test application which reproduces the problem.
The attached test application allocates many bitmaps (300), adds them to
list, then iterates the list and saves the bitmap to disk using the
translation kit.

On haiku 32 bit it fails with "out of memory", but doesn't seem so,
looking at ActivityMonitor or ProcessController.
Works fine with only 100 bitmaps.

The system I'm testing it on has 4GB ram, and virtual memory is enabled
and set to be managed by system.

Compile with:

{{{
gcc -g -lbe -lroot -ltranslation -lstdc++.r4 -o bitmaptest main.cpp
}}}

New description:

 While trying to fix a problem in BeScreenCapture I managed to create a
 test application which reproduces the problem.
 The attached test application allocates many bitmaps (300), adds them to
 list, then iterates the list and saves the bitmap to disk using the
 translation kit.

 On haiku 32 bit it fails with "no translator found". Syslog shows

 {{{
 KERN: runtime_loader: /boot/system/lib/libIlmImf-2_2.so.23.0.0: Could not
 map image: Out of memory
 }}}

 but doesn't seem so, looking at ActivityMonitor or ProcessController.
 Works fine with only 100 bitmaps.

 The system I'm testing it on has 4GB ram, and virtual memory is enabled
 and set to be managed by system.

 Compile with:

 {{{
 gcc -g -lbe -lroot -ltranslation -lstdc++.r4 -o bitmaptest main.cpp
 }}}

--
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/18183#comment:2>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: