mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Clemens Kolbitsch <clemens.kol@gmx.at>
To: linux-kernel@vger.kernel.org
Subject: Forbid deletion of memory mappings
Date: Thu, 30 Aug 2007 18:44:10 +0200	[thread overview]
Message-ID: <200708301844.10532.clemens.kol@gmx.at> (raw)

Hi everyone!
I have a strange problem where I don't even know if there is a solution to it 
at the moment:

I'm working on a new way of doing memory-management and currently I allocate 
memory mappings (at non-fixed locations) in user-memory (i.e. < TASK_SIZE) in 
addition to the regular pages mapped for the apps (e.g. heap memory, etc.)

It all works perfectly well (creating & deleting the additional mappings), 
however, when the kernel feels like it needs to allocate a mapping in 
user-space it sometimes deletes my mapping and overwrites it with the new 
one, although there is plenty of free memory at some other location.

typically my mappings are (automatically chosen) located somewhere around 
0xb7xxxxxx although there's plenty free space around 0xayyyyyyy. (i know that 
this is a bad location because of stack, etc.) but i need the kernel to 
choose a good location for me...

is there a way to make sure my mappings are not removed from memory?? or is 
there a location where i can put my mappings that they will not be removed 
(i.e. by using MAP_FIXED)?
Note that i need a big amount of memory so the range will have to be fairly 
big (to be precise: i need a lot of 0x1000byte mappings - they are always 
page-sized, not bigger, not smaller, but A LOT of them :-/ )

hope someone can help me with this!
thanks & greets,
  Clemens

             reply	other threads:[~2007-08-30 16:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-30 16:44 Clemens Kolbitsch [this message]
2007-08-30 17:07 ` Jiri Kosina
2007-08-30 17:09   ` Clemens Kolbitsch
2007-08-30 21:32   ` Clemens Kolbitsch
2007-08-30 21:34     ` Jiri Kosina
2007-08-30 21:41       ` Clemens Kolbitsch
2007-08-30 21:50         ` Valdis.Kletnieks
2007-08-30 22:05           ` Clemens Kolbitsch
2007-09-04 10:17             ` Helge Hafting
2007-09-04 10:29               ` Clemens Kolbitsch
2007-09-04 14:53             ` linux-os (Dick Johnson)
2007-08-30 21:55         ` Jiri Kosina

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=200708301844.10532.clemens.kol@gmx.at \
    --to=clemens.kol@gmx.at \
    --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

all inboxes | Powered by JetHome®