public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Robert W. Fuller" <orangemagicbus@sbcglobal.net>
To: linux-kernel@vger.kernel.org
Subject: Re: address space reservation functionality?
Date: Tue, 11 Jan 2005 13:51:07 -0500	[thread overview]
Message-ID: <41E4201B.60606@sbcglobal.net> (raw)
In-Reply-To: <1105429362.3917.2.camel@laptopd505.fenrus.org>

Arjan van de Ven wrote:
> On Mon, 2005-01-10 at 15:52 -0500, Robert W. Fuller wrote:
> 
>>Hi,
>>
>>I was wondering if some functionality existed in Linux.  Specifically, 
>>in Solaris, you can mmap the null device in order to reserve part of the 
>>address space without otherwise consuming resources.  This is detailed 
>>in the Solaris manpage null(7D).  The same functionality is also 
>>available under Windows NT/XP/2K by calling the VirtualAlloc function 
>>with the MEM_RESERVE flag omitting the MEM_COMMIT flag.  Does Linux have 
>>a similar mechanism buried somewhere whereby I can reserve a part of the 
>>address space and not increase the "virtual size" of the process or the 
>>system's idea of the amount of memory in use?  I could not find one by 
>>using the source.
> 
> 
> malloc() already does this...
> what you describe is the default behavior of linux; only when you
> actually write to the memory does it get backed by ram.
> 
> 

Sorry about the top posting.  This is a resend without it.

This is not quite the same thing.  This still does a check for whether 
or not there is enough memory and includes this in the virtual size of 
the process.  I simply want to reserve a part of the address space so 
I'm guaranteed I can map something else over a contiguous portion of the 
address space.  I don't want it to check for available memory or 
increase the virtual size of the process because I will be using this 
region sparsely.  That is why Solaris and Windows have separate 
interfaces for this.

  parent reply	other threads:[~2005-01-11 18:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-10 20:52 address space reservation functionality? Robert W. Fuller
2005-01-11  7:42 ` Arjan van de Ven
2005-01-11 18:39   ` Robert W. Fuller
2005-01-11 18:51   ` Robert W. Fuller [this message]
2005-01-11 19:19     ` Arjan van de Ven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41E4201B.60606@sbcglobal.net \
    --to=orangemagicbus@sbcglobal.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox