Skip to content

photoproc: replace fopen(), fread(), fgets() with mmap()#360

Open
GermanAizek wants to merge 1 commit intoAtoptool:masterfrom
GermanAizek:mmap
Open

photoproc: replace fopen(), fread(), fgets() with mmap()#360
GermanAizek wants to merge 1 commit intoAtoptool:masterfrom
GermanAizek:mmap

Conversation

@GermanAizek
Copy link
Contributor

@GermanAizek GermanAizek commented Jan 31, 2026

Use mmap() for Zero-copy and Demand Paging

Affected functions:

  • procstat
  • procstatus
  • procio
  • proccmd
  • procwchan
  • procsmaps
  • procschedstat

References:

@natoscott
Copy link
Contributor

@GermanAizek do you have any performance measurements that show the benefits of this change?

The linked articles talk about saving buffer copies when reading from disk-backed filesystems, but procfs is not that - its all memory copying only so I'm curious whether this is actually a measurable difference for memory mapping procfs files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants