c4milo / fusejs

Low level fuse bindings for nodejs
http://c4milo.github.io/fusejs
112 stars 72 forks source link

Replying large files #34

Closed skerit closed 8 years ago

skerit commented 8 years ago

I see you need to reply to read methods with a buffer containing all the data, won't that fail for files that are over 1.7GiB?

EricTheMagician commented 8 years ago

No it won't fail because the kernel never requests to read files that large at once. The kernel will only request a small piece of that file to be read. Once that chunk of file is read, the kernel will request another chunk. At somepoint, the v8 garbage collector will kick in and clear out the unused buffers.

So, there shouldn't be a problem with this. If there is, it's most likely at the user implementation level.

skerit commented 8 years ago

Oh, that's great. Had no idea that's how it worked, but it makes sense of course. Thanks for the response.