Cgroup memroy limit

Seems 'next' branch on github wasn't merged to master before it's deleted, so some code lost.
I have to send this PR again although it has been merged to next.