Paul Gofman (@gofman) commented about server/mapping.c:
+static void make_memfd_name( const char *prefix, ULONG sec_flags, char *dest ) +{
- /* memfd names are restricted to 250 bytes including \0, but are only meant for debugging, with
* duplicate names not causing any side-effects. */
- if (prefix != NULL)
- {
snprintf( dest, 250, "map-%s-%lx-%lld", prefix, sec_flags, current_time);
- }
- else
- {
snprintf( dest, 250, "map-%lx-%lld", sec_flags, current_time );
- }
+}
+static int create_memfd( ULONG file_access, ULONG sec_flags, file_pos_t size )
What is the motivation under introducing Linux specific memfd, is there any clear indication of how that is beneficial? Maybe there is something, but backing any file with memory fd doesn't seem obviously beneficial: it can probably provoke OOMs which otherwise would be avoided with file backed memory. Huge file backed mappings may be accessed very sparsely and not impose much RAM pressure.