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