View previous topic :: View next topic |
Author |
Message |
Keruskerfuerst Advocate
Joined: 01 Feb 2006 Posts: 2289 Location: near Augsburg, Germany
|
Posted: Sat Apr 19, 2008 6:19 pm Post subject: Memory managment of kernel [solved] |
|
|
Does the kernel a preallocation of memory, when data is transfered into RAM?
Last edited by Keruskerfuerst on Tue Apr 22, 2008 3:23 am; edited 1 time in total |
|
Back to top |
|
|
jcat Veteran
Joined: 26 May 2006 Posts: 1337
|
|
Back to top |
|
|
Keruskerfuerst Advocate
Joined: 01 Feb 2006 Posts: 2289 Location: near Augsburg, Germany
|
Posted: Sat Apr 19, 2008 7:15 pm Post subject: |
|
|
The FAQ and the thread does not answer my question at all. |
|
Back to top |
|
|
kernelOfTruth Watchman
Joined: 20 Dec 2005 Posts: 6111 Location: Vienna, Austria; Germany; hello world :)
|
|
Back to top |
|
|
jcat Veteran
Joined: 26 May 2006 Posts: 1337
|
Posted: Sat Apr 19, 2008 7:58 pm Post subject: |
|
|
Keruskerfuerst wrote: | The FAQ and the thread does not answer my question at all. |
Ok, I obviously misunderstood, from you first post I assumed you were after something more general. Apologies..
Cheers,
jcat |
|
Back to top |
|
|
DarKRaveR Guru
Joined: 11 Oct 2003 Posts: 500 Location: Old Europe/G-Many
|
Posted: Sat Apr 19, 2008 10:09 pm Post subject: |
|
|
AFAIK Linux uses copy on write in many places.
Could you be a bit more specific as to what exatly you mean by transferring data and in what way the transfer is issued? |
|
Back to top |
|
|
Keruskerfuerst Advocate
Joined: 01 Feb 2006 Posts: 2289 Location: near Augsburg, Germany
|
Posted: Sun Apr 20, 2008 11:12 am Post subject: |
|
|
Memory pre allocation:
e.g.: data transfer from HDD to RAM.
pre allocation of RAM (size= size of file) to transfer data into RAM. |
|
Back to top |
|
|
DarKRaveR Guru
Joined: 11 Oct 2003 Posts: 500 Location: Old Europe/G-Many
|
Posted: Sun Apr 20, 2008 9:13 pm Post subject: |
|
|
Keruskerfuerst wrote: | Memory pre allocation:
e.g.: data transfer from HDD to RAM.
pre allocation of RAM (size= size of file) to transfer data into RAM. |
And how is this case (filedata to ram) related to the mem management itself? This strongly depends on what the application programmer does.
But let's see, assuming DMA is used, the DMA Buffer is obviously preallocated.
Now, the question is: Do we just mmap() the file? then the single pages are paged in as needed ...
Many of these things strongly depend on what the programm does, doesn't it? If I process a stream just using a ringbuffer, then most certainly the memory won't be 'preallocated' exept for the buffer size.
If a programmer allocates memory, it will depend on the way he does it. |
|
Back to top |
|
|
|