From Adrien Destugues <pulkomandy@xxxxxxxxx>:
Adrien Destugues has uploaded this change for review. (
Change subject: [RFC] Catch agg allocation errors in app_server
[RFC] Catch agg allocation errors in app_server
I got an app_server crash because agg failed to allocate some memory.
It turns out agg does not use nothrow new and does not make any attempt
at checking null pointers. And the code calling it in most cases do not
expect operations to fail.
Since refactoring all of this seems a bit pointless, I think the best
way to go is to catch the error at the level where we can handle it.
The ServerWindow seems to be appropriate, as we can then propagate the
error to the BApplication (in the cases where the application is
expecting a return message from its commands).
I wonder if we should make app_server better at managing its memory.
Maybe it could check which app is making it use a lot of resources and
somehow ask it to calm down? It is difficult to handle the out of memory
situation here because we are just replying to application requests, and
when an allocation fails, it may not even be the fault of the
application which requested that specific allocation.
1 file changed, 11 insertions(+), 3 deletions(-)
git pull ssh://git.haiku-os.org:22/haiku refs/changes/10/1810/1
To view, visit https://review.haiku-os.org/c/haiku/+/1810
To unsubscribe, or for help writing mail filters, visit
Gerrit-Owner: Adrien Destugues <pulkomandy@xxxxxxxxx>