# * Statically sized (the program can infer the size of standard input.)
# * Statically sized (the program can infer the size of standard input.)
# * The standard input file/buffer pipe size is large enough to pre-allocate enough splicing space to use up the rest of your physical RAM.
# * The standard input file/buffer pipe size is large enough to pre-allocate enough splicing space to use up the rest of your physical RAM.
# (This will very likely not happen unless you're specifically trying to make it happen, however.)
# (This will very likely not happen unless you're specifically trying to make it happen, however.)
memfile=["bitflags","lazy_static", "stackalloc"]
memfile=["bitflags","lazy_static"]
# `memfile`: When unable to determine the size of the input, preallocate the buffer to a multiple of the system page-size before writing to it. This can save extra `ftruncate()` calls, but will also result in the buffer needing to be truncated to the correct size at the end if the sizes as not matched.
# `memfile`: When unable to determine the size of the input, preallocate the buffer to a multiple of the system page-size before writing to it. This can save extra `ftruncate()` calls, but will also result in the buffer needing to be truncated to the correct size at the end if the sizes as not matched.
staticrefDEFAULT_NAME: String=format!(concat!("<memfile@",file!(),"->","{}",":",line!(),"-",column!(),">"),function!());//TODO: If it turns out memfd_create() requires an `&'static str`; remove the use of stackalloc, and have this variable be a nul-terminated CString instead.
if_trace!(trace!("created nul-terminated buffer for name `{:?}': ({})",std::str::from_utf8(bname),bname.len()));
stackalloc::alloca_zeroed(rname.len()+1,move|bname|{//XXX: Isn't the whole point of making `name` `&'static` that I don't know if `memfd_create()` requires static-lifetime name strings? TODO: Check this