Re: Reasons for a buffer or RAM
pensul wrote:
> So my question is: if the kernel already knows the
> size of the file, why can't it pass this information on to the program, so
> that it can set its memory requirements?
There is a Linux API call you can make to determine the file size.
You can also use memory-mapped files and, effectively, load the whole
file into RAM at one time (with the memory automatically being managed,
so you don't have to worry about allocating sufficient space for the
file you load).
Cheers,
Randy Hyde
.
Relevant Pages
- Re: [opensuse] unable to access website after 10.2 install [CLUE!]
... Its not the native kernel for that hardware. ... And the 64bit address registers, ... etc also load in the same number of clocks as the 32 bit ... everything places on the memory subsystem. ... (SuSE) - Re: RFC: x86: relocatable kernel changes (revised spec)
... This field indicates the amount of linear contiguous memory starting ... kernel needs before it is capable of examining its memory map. ... select a safe load address for the kernel. ... (Linux-Kernel) - Re: Device Drivers and Kernel Modules
... got confused in my memory. ... between the drivers in the kernel opposed to loaded kernel modules. ... > drivers through compiling them into the kernel or to load them at boot ... > I have also heard that loading modules through the loader.conf saves on ... (freebsd-questions) - Re: Device Drivers and Kernel Modules
... drivers through compiling them into the kernel or to load them at boot ... wuld not require a rebuild of the kernel. ... From memory it stated modules such ... Loading a module really does load it into memory. ... (freebsd-questions) - Re: ICH9 & Core2 Duo - kernel crash
... I am trying LKML to get some help on one linux kernel related problem. ... No kernel crashes no problems, ... I have seen unusual memory behavior under heavy load, ... The problem with memtest, unless I underestimate it, is that it doesn't use all core and siblings, so it doesn't quite load the memory system the way regular usage would. ... (Linux-Kernel) |
|