git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v5 03/15] index-helper: new daemon for caching index and related stuff

From
Duy Nguyen <pclouds@gmail.com>
Date
Apr 20, 2016, 00:31 UTC
Message-ID
<CACsJy8D_4KFjz6HefvzmWw-6Qqg0uguq8MXL6kLY0oMyVhPS0w@mail.gmail.com>
On Wed, Apr 20, 2016 at 6:27 AM, David Turner <dturner@twopensource.com> wrote:
> Shared memory is done by storing files in a per-repository temporary
> directory.  This is more portable than shm (which requires
> posix-realtime and has various quirks on OS X).  It might even work on
> Windows, although this has not been tested.

There's another option, but I'm not sure if it's too clever/tricky to do. Anyway, on *nix we can send file descriptors over unix socket [2], then mmap them back to access content. On Windows, it looks like DuplicateHandle [1] can do nearly the same thing. This keeps everything in memory and we don't have to worry about cleaning up shm-* files.

[1] http://lackingrhoticity.blogspot.com/2015/05/passing-fds-handles-between-processes.html [2] http://www.normalesup.org/~george/comp/libancillary/

-- 
Duy
Next: David Turner
Message 1 of 3 in “Re: [PATCH v5 03/15] index-helper: new daemon for caching index and related stuff”
  1. Duy NguyenApr 20, 2016
  2. David TurnerApr 20, 2016
  3. Johannes SchindelinApr 20, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.