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

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

#18183: Strange out of memory issue while allocating many bitmaps
-------------------------+-------------------------
  Reporter:  jackburton  |      Owner:  nobody
      Type:  bug         |     Status:  new
  Priority:  normal      |  Milestone:  Unscheduled
 Component:  System      |    Version:
Resolution:              |   Keywords:
Blocked By:              |   Blocking:
  Platform:  x86         |
-------------------------+-------------------------
Changes (by jackburton):

 * summary:
     Strange out of memory issue while allocating bitmaps and saving to
     disk
     => Strange out of memory issue while allocating many bitmaps


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 "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
}}}

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) and adds them
 to list

 On haiku 32 bit it fails after 100 bitmaps, more or less, with "Out of
 memory".

 but doesn't seem so, looking at ActivityMonitor or ProcessController.
 Works fine with less than 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:4>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts:

  • » [haiku-bugs] Re: [Haiku] #18183: Strange out of memory issue while allocating many bitmaps (was: Strange out of memory issue while allocating bitmaps and saving to disk) - Haiku