On Thu, 18.02.16 07:05, [email protected] ([email protected]) wrote: > Dell - Internal Use - Confidential
Really? You sent this to a public mailing list... > Hi All: > > I am trying to test Resource Control of system by setting > MemoryLimit on my Debian system. Unfortunately it won't work after > my testing. Maybe I am not configuring right. Please let me know how > to fix this. Linux has an overcommiting memory manager. MemoryLimit= operates on actual memory usage. With malloc() you only allocate address space however. It basically just gives you an address range and the promise that keep the memory around should you ever actually store something in it. In your test program you never do that however, hence it will never be backed by real memory. Consider invoking memset() on the memory you allocate, so that it is actually touched. Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/systemd-devel
