Ticket #653 (new fixme)

Opened 19 months ago

Fix out of memory errors / improve resourcecollector

Reported by: ct Owned by: ct
Priority: normal Milestone: 1alpha
Component: lumieraBack Keywords:
Cc: Blocked By:
Blocking:

Description

Initially I planned that lumiera_malloc never returns an error, it invokes the resource-collector to free some memory and if that is impossible we do an emergency shutdown (registered in the resourcecollector, if nothing is registered there, then the resourcecollecor will abort()).

This plan has some fundamental (but fixable) flaws:

We can't invoke the resource-collection cycles from the calling thread because it might hold an undefined number of locks, thus this thread run the shutdown, it can barely signal the emergency shutdown, which is ok, but then it has to return. This means that functions calling the resource collector are not guaranteed to never return an error but there might be an error passed back.

New plan:

With thinking about profiler and resource buckets the resource-management system should be proactive, either running in the main thread or in its own thread. Details will be worked out. (i write RFC's for that soon). Basically we establish some condition variables which will be used to pass states between resource requesting jobs and the resourcecollector around.

Note: See TracTickets for help on using tickets.