Re: malloc problem to allocate very large blocks

From: Alan Cox (alan_at_lxorguk.ukuu.org.uk)
Date: 07/29/03

  • Next message: Kathy Frazier: "RE: DMA not supported with Intel ICH4 I/O controller?"
    To: nagendra_tomar@adaptec.com
    Date:	29 Jul 2003 12:52:51 +0100
    
    

    On Maw, 2003-07-29 at 05:58, Nagendra Singh Tomar wrote:
    > AFAIK malloc will not return you memory more than the total virtual memory
    > (RAM+swap) in the system. So if you want more than 2GB allocations from
    > malloc, make sure you have at least 2GB virtual mem, keeping aside some
    > space for the kernel.

    On the default memory settings it may do. However a request for 2Gb of
    memory requires there is a free 2Gb of address space to map it into -
    which may not be true because of things like shared libraries.

    The actual total allocatable limit for x86 is a bit under 3Gb, but you
    won't get that as one linear allocation. (1Gb is kernel mappings)

    -
    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: Kathy Frazier: "RE: DMA not supported with Intel ICH4 I/O controller?"

    Relevant Pages

    • Re: [dapper] Memory and CPU usage
      ... memory figures (working set size vs total virtual memory used). ... Try using the top command in a shell. ...
      (Ubuntu)
    • Re: [dapper] Memory and CPU usage
      ... >> I haven't used either of these tools, but they may be reporting different ... >> memory figures (working set size vs total virtual memory used). ... 0% CPU for a process is common. ...
      (Ubuntu)
    • Advice sought re memory
      ... I suspected a shortage of memory. ... Available physical memory = 15.32MB (which is a WHOLE LOT LESS than I ... Total virtual memory = 441.98MB ... Available virtual memory = 157.45MB ...
      (microsoft.public.windowsxp.help_and_support)
    • Virtual Memory Message ...Whats it mean ?
      ... Physical memory 512 MB ... Available Physical Memory 309.33 MB ... Total Virtual Memory 2 GB ... the time .I then installed a graphics card ..I made no other changes ...
      (microsoft.public.windowsxp.help_and_support)
    • Re: 2.4.23aa2 (bugfixes and important VM improvements for the high end)
      ... > triggering the zone-normal shortage in 32G, ... Also bear in mind that as memory gets tight, ... Without shared pagetables, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)