Click here to Skip to main content
15,860,972 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everybody, I am trying to make a simple container for a group of processes using the Linux's kernel feature: CGroups. I managed to create a group and properly set the memory.limit_in_bytes and memory.memsw.limit_in_bytes parameters to a given limit.
My dummy program just allocates memory in an infite loop and checks if it succeeded or not (the memory is not freed). I've tuned the control group to disable the OOM, and when the process reaches the memory limit it just freezes (thats is ok), but I want to change the memory limit dynamically so the process can resume and continue working with more available memory.
When the memory limit is reached, I can not change the limit values for the memory subsystem just echoing a new value and the only "solution" I can think of is creating a new group with the new limits and move the processes to this new group and delete the old group. If anybody knows how can I accomplish this please tell me :P. Thanks in advance and sorry for my bad English.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900