Re: [PATCH] overcommit symbolic constants

From: Alan Cox (alan_at_lxorguk.ukuu.org.uk)
Date: 09/30/04

  • Next message: Shailabh Nagar: "Re: [PATCH][1/1] Per-priority statistics for CFQ w/iopriorities 2.6.8.1"
    To: Andries Brouwer <Andries.Brouwer@cwi.nl>
    Date:	Thu, 30 Sep 2004 14:27:44 +0100
    
    

    > A few days ago I remarked that 2 is no good when there is no swap.
    > OK. So, more modest aim - tighten things only in case there is
    > plenty of swap. I like to return NULL for malloc(), that is
    > something a good program tests for. I hate to fail a stack grow.
    > So, must play a bit more, see whether I can find a mode much
    > stricter than 0 that is still suitable as a general working
    > environment for everybody.

    What might work (if you've not already tried it) is to make the initial
    stack something like 1 or 4Mbytes. Don't map the pages but install a vma
    of that size. That would pre-reserve address space and perhaps avoid
    this. I guess if that works then make it a /proc/sys tunable for
    guaranteed stack.

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Shailabh Nagar: "Re: [PATCH][1/1] Per-priority statistics for CFQ w/iopriorities 2.6.8.1"

    Relevant Pages

    • Re: [PATCH] overcommit symbolic constants
      ... Very few programs handle stack growth faults. ... expect to be killed by segfault because of stack shortage either. ... A few days ago I remarked that 2 is no good when there is no swap. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: "Sorting" assignment
      ... you think using memcpy a block at a time is not the best way to swap ... It was allocated on the stack. ... unsigned char *right = vright; ... memcpy(right, buf, BUF_LEN); ...
      (comp.programming)
    • Re: Define SWAP through DUP and arithmetics?
      ... Sometimes just OVER is used instead of SWAP. ... We call it programming with abandon making a little ... loop but save important stack items before the loop ... The inlined 4 opcode version only overwrites one ...
      (comp.lang.forth)
    • Re: String reversing problem
      ... If there is no automatic memory available, ... controling some public service of your country. ... not to change in a live system the stack structure. ... swap you need a local variable". ...
      (comp.lang.c)
    • Re: Orinoco card fails on resume with 2.6.2 (race condition?)
      ... strange timer state, but I dunno. ... the system goes into a swap ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)