Women in Technology

Hear us Roar



Article:
  When Linux Runs Out of Memory
Subject:   Try testing your facts before posting an article
Date:   2007-07-20 09:28:12
From:   docbillnet
Neither ulimit -v or ulimit -m have any effect with the 2.6 Linux kernels. Processes can still use unlimited amounts of memory.
Main Topics Oldest First

Showing messages 1 through 1 of 1.

  • Re: Try testing your facts before posting an article
    2007-07-20 22:59:22  mulyadi_santosa [View]

    Hi Bill...

    Thanks for the critism. As soon as you mentioned this, I re-check the fact on my FC5 installation (2.6.15.x kernel). I re-ran loop-calloc.c, but first I change my uid (using su) to non root user (let's say abc). I did:
    ulimit -v 51200
    to limit the available virtual memory to uid abc up to 50 MB. loop-calloc gives me these:
    .....
    Currently allocating 47 MB
    Currently allocating 48 MB

    So malloc stops when it allocates 48 MB of VM. The rest is, of course, consumed by code and data section of the code (and the loader, shared lib, etc). pay attention that this limit is per session: applied immediately after you type it in shell session. Once you exit from this session, it's no longer true.

    perhaps you get different result?

    regards,

    Mulyadi