search for: initramfs_load_fil

Displaying 5 results from an estimated 5 matches for "initramfs_load_fil".

Did you mean: initramfs_load_file
2016 Nov 10
3
[PATCH 0/2] improve Lua API for files and initramfs objects
...tually not using it in our scripts. > All in all, I can't see the need for new bindings for this task, but > maybe I miss something. At the same time, file:data() might > occasionally come useful. initramfs:load_file() is basically a memory optimization over your solution. It calls initramfs_load_file() directly, this loads the file exactly once into memory. Going through a Lua string loads the file, then copies it into a (interned) Lua string, then copies this string again in initramfs:add_file(). This doubles the peak memory usage (might even triple it if you are not freeing the file before...
2016 Nov 10
0
[PATCH 0/2] improve Lua API for files and initramfs objects
Paul Emmerich <P.Emmerich at first-colo.net> writes: > initramfs:load_file() is basically a memory optimization over your > solution. It calls initramfs_load_file() directly, this loads the > file exactly once into memory. True. > Going through a Lua string loads the file, then copies it into a > (interned) Lua string, then copies this string again in > initramfs:add_file(). This doubles the peak memory usage (might even > triple it if you...
2016 Nov 04
4
[PATCH 0/2] improve Lua API for files and initramfs objects
From: Paul Emmerich <p.emmerich at first-colo.net> Hi, the new API for initramfs and files in master lacked the ability to build initramfs objects from files loaded via HTTP/TFTP in Lua. The documentation indicated that it should be possible (and I believe I did that in an older version). I implemented a few new functions to handle files/initramfs objects better. Changes: * NEW:
2016 Nov 20
2
[PATCH 0/2] improve Lua API for files and initramfs objects
hpa at zytor.com writes: > On November 19, 2016 6:06:43 AM PST, wferi at niif.hu wrote: > >>"H. Peter Anvin" <hpa at zytor.com> writes: >> >>> On 11/10/16 04:38, Paul Emmerich via Syslinux wrote: >>> >>>> Ferenc W?gner <wferi at niif.hu>: >>>> >>>>> for reading configuration files from disk. Does it
2016 Nov 29
0
[PATCH 0/2] improve Lua API for files and initramfs objects
...nd just pointing into the Lua memory representation makes a lot more sense. [f]loadfile() is "smart" in the sense that if, and only if, the size of the file is known ahead of time it allocates the buffer in one shot, rather than using realloc(). Do note that [f]loadfile() (as opposed to initramfs_load_file()) just loads data into a memory buffer. If there is a way to represent a memory buffer allocated by C as a Lua string that would pretty much take care of the same thing. floadfile() even allows a chunk of data to be prepended to the buffer, which could be useful in the case of a Lua string need...