Skip to content
This repository has been archived by the owner on Jul 3, 2020. It is now read-only.

mmap support? #141

Open
piranna opened this issue Jan 17, 2017 · 7 comments
Open

mmap support? #141

piranna opened this issue Jan 17, 2017 · 7 comments

Comments

@piranna
Copy link

piranna commented Jan 17, 2017

Does runtime.js support mmap? I know we don't have support for devices, but having so, we could have all the storage space mmap'ed and use it as main memory. This way, we could have an instant-on system working the ram just as a (big) disk cache, and also we could deprecate the concept of files hierarchy and just use raw objects as storage, as it was commented in other threads. Performance would not degrade but in fact it could be increased by not needing to copy the data twice (disk -> disk cache -> process memory). It could be a problem when working with "pure" variables that are not supposed to be stored, but they could be flagged some way to don't be backed (first candidates I can think are let and const defined ones). What do you think?

@RossComputerGuy
Copy link

I can add this into my multiarchitecture port of Runtime, I include i386/x86 as an architecture.

@piranna
Copy link
Author

piranna commented May 7, 2017

This is not an easy task, probably the first thing that would be needed to have is virtual memory, so later there would be some mapping from the virtual addresses to the file itself...

@RossComputerGuy
Copy link

I'm able to do that

@austinfrey
Copy link
Contributor

I'm interested in this also, more specifically I'm interested to know if data can be saved to disk without a file system. for instance can an array, buffer, or object be saved directly to disk without a file system and then accessed just by it's location on disk instead. is this currently possible?

@piranna
Copy link
Author

piranna commented Jun 26, 2017

then accessed just by it's location on disk instead

That's just what filesystems does under the hood... :-D

@austinfrey
Copy link
Contributor

@piranna to your point though, are you looking to get rid of the FS construct though? and use more JS constructs(objects)?

@piranna
Copy link
Author

piranna commented Jun 26, 2017

@piranna to your point though, are you looking to get rid of the FS construct though? and use more JS constructs(objects)?

Yes, sort of.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants