lkml.org 
[lkml]   [1997]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Killing clones
Date
Followup to:  <Pine.LNX.3.95.970915132448.24625B-100000@penguin.transmeta.com>
By author: Linus Torvalds <torvalds@transmeta.com>
In newsgroup: linux.dev.kernel
> >
> > (and how does one grow/shrink a mmap'd region? That's one thing I still
> > haven't figured out... apparently growing/shrinking mmap'd files uses
> > 'ftruncate' but what about nonfile shared memory regions?)
>
> You can use "mremap()" to grow or shrink (or move) an existing memory map.
>
> I don't know if anybody uses it, though.
>

DOSEMU does, for DPMI_realloc(); and I think at least some version of
the mmap-based malloc()-implementation uses it for realloc(). This
actually makes realloc() usable even for a substantial-sized memory
region.

-hpa
--
PGP: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD 1E DF FE 69 EE 35 BD 74
See http://www.zytor.com/~hpa/ for web page and full PGP public key
Always looking for a few good BOsFH. ** Linux - the OS of global cooperation
I am Baha'i -- ask me about it or see http://www.bahai.org/

\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.079 / U:2.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site