Re: "Move memory" in no time
- From: Johannes Singler <singler@xxxxxxxxxx>
- Date: Fri, 24 Mar 2006 11:59:53 +0100
Jan Panteltje wrote:
For API compatibility, I need to move a large block of data to another
place in memory. I really need to only _move_ it, I don't need the
original data any more. So far I call memcpy and free up the original
space afterwards. Now I was wondering if there is a kernel call that
achieves this by just changing some page table entries. In this case, no
transfer would be necessary and the move should be much faster.
Is this possible? Can we maybe abuse some mmap-related calls for that?
I do not get it, say you have allocated that space with malloc, now you
have a pointer to it.
When you want to 'move' it means something else should get in the place of
the space used by that pointer.
Then leave that space and let the 'something else' use a different space?
But 'something else' assumes that the input data has been transformed
in-place, i. e. the output has to reside at that specific location in
memory. This is a fixed API postcondition which I cannot change.
Any ideas anyway?
Bye,
Johannes
.
- Follow-Ups:
- Re: "Move memory" in no time
- From: Alvin Beach
- Re: "Move memory" in no time
- References:
- "Move memory" in no time
- From: Johannes Singler
- Re: "Move memory" in no time
- From: Jan Panteltje
- "Move memory" in no time
- Prev by Date: Re: Posix semaphore in the Linux (RHEL4)
- Next by Date: Re: Development IDE
- Previous by thread: Re: "Move memory" in no time
- Next by thread: Re: "Move memory" in no time
- Index(es):
Relevant Pages
|