What I'm asking is if it's possible to limit memory (heap or stack) assigned to a specific process, so that this process can't exceed it. Maybe something like "process_flag(min_heap_size, MinHeapSize)", but for the maximum heap.
相关问题
- Ada beginner Stack program
- Is “new” in Erlang part of the official standard a
- how to create a keep-alive process in Erlang
- delete[] causing heap corruption
- Why does heap space constantly increase when monit
相关文章
- Threading in C# , value types and reference types
- Stack<> implementation in C#
- How do I modify a record in erlang?
- Java, Printing the stack values
- Check active timers in Erlang
- Is Heap considered an Abstract Data Type?
- Is there a stack space for every thread?
- undefined function maps:to_json/1
You could use
spawn_opt
withmax_heap_size
You could put together some kind of process tracking gen_server that periodically checks assigned processes for memory footprint and kills them if it exceeds a certain amount.
Using a combination of
process_info(Pid, memory).
andexit(Pid, Reason)
calls, this should be quite manageable.