top | item 47218483

(no title)

jklowden | 1 day ago

It’s a terribly useful idea. FTFY.

The program you used to leave your comment, and the libraries it used, were loaded into memory via mmap(2) prior to execution. To use protobuf or whatever, you use mmap.

The only reason mmap isn’t more generally useful is the dearth of general-use binary on-disk formats such as ELF. We could build more memory-mapped applications if we had better library support for them. But we don’t, which I suppose was the point of TFA.

discuss

order

amluto|1 day ago

Entire libraries are a weird sort of exception. They fundamentally target a specific architecture, and all the nonportable or version dependent data structures are self describing in the sense that the code that accesses them are shipped along with the data.

And if you load library A that references library B’s data and you change B’s data format but forget to update A, you crash horribly. Similarly, if you modify a shared library while it’s in use (your OS and/or your linker may try to avoid this), you can easily crash any process that has it mapped.

zephen|18 hours ago

> Entire libraries are a weird sort of exception.

Not really. The entire point of the article is that there are a lot of problem domains where data stays on a single machine, or at least a single type of machine.