Skip to content

foxhoundsk/cirbuf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Circular Buffer implementation with mmap(2)

This is a circular buffer implementation using mmap to ease the logic behind the caller which needs to know if the polled item crosses the maximum size of the underlying array.

For more information, please refer to my note at HackMD.

Internals

  1. mmap is used to mirror the buffer like the following: cirbuf_mmap

  2. the "mirrored" buffer is then placed beside the buffer. When the user polls the item it doesn't matter if the item crosses the buffer's boundary: cirbuf_mmap_portal

About

Circular Buffer implementation with mmap(2) *incomplete*

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 95.3%
  • Shell 3.6%
  • Makefile 1.1%