Re: using more physical memory?

From: Chris Kantarjiev (cak+news_at_dimebank.com)
Date: 06/21/05


Date: Tue, 21 Jun 2005 11:11:32 -0700

tedu wrote:
> for the long answer, grep MAXDSIZ in the kernel. basically, it sets
> the size of the heap, which can't be used for other things like mmap().
> when this came up two weeks ago, the guy tried it and later told me
> "yeah, it didn't work too well". your experience may be different, but
> you're on your own.
> http://marc.theaimsgroup.com/?t=111731093400001&r=1&w=2
>

OK, I'll take that as an answer, thanks.

I took a different tack. Cursory reading of malloc.c led me to believe that it
uses mmap to allocate its pages if they're pagesize or more. I wrote a simple
program and found that wasn't actually true - despite the fact that there's an
internal function called "map_pages", it uses brk() to get those pages.

Perhaps a future edition of malloc() could take an option use mmap() to those
pages...

Thanks,
chris



Relevant Pages

  • Re: changing MAXDSIZ/using more physical memory?
    ... grep MAXDSIZ in the kernel. ... the size of the heap, which can't be used for other things like mmap(). ...
    (comp.unix.bsd.openbsd.misc)
  • RE: Using remap_pfn_range causes system hang on app close in 2.6.15 & up
    ... What I did not mention in my original post is that my driver performed a sort of custom protocol when mmap() is called. ... I don't believe there should be an issue with calling remap_pfn_range outside of the driver's mmaproutine, but I am not a kernel developer, so I could be wrong in my assumption. ... Buffer Allocation Code ...
    (Linux-Kernel)
  • Re: Accessing file mapped data inside the kernel
    ... > Just try to understand the kernel filesystem. ... > looking at mmap supplied by the filesystem, ... when the user tries to access the memory, does a page fault occur (because ... address belonging to the same page) are direct memory accesses. ...
    (Linux-Kernel)
  • Re: [malware-list] [RFC 0/5] [TALPA] Intro to alinuxinterfaceforon access scanning
    ... reliable virus scanning. ... ...or do you have a reasonable solution for mmap? ... Your scanner runs with privilege and passes ... (with the appropriate kernel support) ...
    (Linux-Kernel)
  • RE: 2.6.28.4 regression: mmap fails if mlockall used
    ... Thanks to Sami for mentioning ntpd failures, as I was going nuts trying to ... Subject: 2.6.28.4 regression: mmap fails if mlockall used ... I run x86_64 SMP kernel. ... If it's really a bug, in kernel or gcc, then it will help to know ...
    (Linux-Kernel)