Limiting data and stack size by setrlimit.

This commit is contained in:
Ruben Ayrapetyan
2014-08-14 16:08:06 +04:00
parent 63133c247f
commit 6553daa22b
4 changed files with 47 additions and 1 deletions
+3
View File
@@ -170,6 +170,9 @@ main (int argc __unused,
int i;
size_t files_counter = 0;
jrt_set_mem_limits (MEM_HEAP_AREA_SIZE + CONFIG_MEM_DATA_LIMIT_MINUS_HEAP_SIZE,
CONFIG_MEM_STACK_LIMIT);
for (i = 1; i < argc; i++)
{
if (!__strcmp ("-v", argv[i]))