BenPager is a benOS Utility For Accessing Memory Through Buffers.
- Background
- Installation
- Usage
- API
- Related Projects
- Why Decentralized Internet
- Bench On The dWeb
- License
- Copyright
BenPager is a benOS utility for accessing memory through buffers.
npm install benpager
yarn add global benpager
var benPager = require('benpager')
var benPages = benPager(1024) // allows only 1kb for each page
var benPage = benPages.get(7) //retreive the 7th page
console.log(benPage.offset) // 10240 (From 2nd line)
console.log(benPage.buffer) // a 1kb buffer that spits out blank.
Create a new page. benPageSize
defaults to 1024
(KB).
Get a page. The benPage
you are pulling will get alloc
(Allocated), immediately.
Optionally you can set the noAllocate
flag which will make the
method return undefined if a benPage
has not been allocated already.
A benPage
looks like this:
{
offset: byteOffset,
buffer: bufferWithPageSize
}
Explicitly set the buffer for a benPage
.
Mark a benPage
as updated.
Get the last benPage
that was updated.
Concat all allocated benPages
into one buffer.
- benOS - benOS Decentralized Operating System
- benny - benOS Native Container Builder
- bennyfile - Build File Library For Benny Containers
- thinbit - BitField Library For Benny
Today, the internet is more censored than ever and it's only getting worse. Our mission with the dWeb Protocol was to create a truly powerful P2P protocol, around benOS, dBrowser and many of benOS' underlying libraries to bring the most powerful P2P products to life. In the last few months, by rebuilding P2P technologies that have existed since the early 2000s, we have built a powerful suite of decentralized libraries for benOS and the Bench Network, that will only improve over time. But we also brought new ideas to life, like:
- dDrive
- dExplorer
- dDatabase
- dSites
- dPack
- benFS
- DCDN
- Rocketainer
- RocketOS
- dNames
- P2PDNS
- dWebFS
- dWebDB
- MeteorIDE
- Kepler
- Neutron
- Designate
- Nova
and more! These were the protocols and libraries that we needed to create a completely decentralized operating system, where everything was distributed, protected and people were once again in control of their data. benOS is made up of over 1100+ different libraries that we are releasing on a day-by-day basis as we move them to a stable/production state. While financial support is great for this open source project, we need developers who want to be some of the first to build the dApps
and dSites
of the future. We have to take back what our forefathers originally designed for freedom, by making our code the law, instead of releasing weak and highly centralized applications where law cannot be applied because the code lacks the foundation to implement a legal framework for itself. Join us for a truly historic journey on the BenchLabs Telegram. See you there.
dweb://bench.dnames.io // dNames Short Link dweb://3EDAE09848B77401445B7739CAFCE442DDE1752AED63025A1F94E6A86D7E9F04 // dWeb Key Link
In order to make the links above clickable or to view these links period, you will need dBrowser (Available for Mac OSX, Linux, Windows and soon to be available on iOS/Android)
Copyright (c) 2018 Bench Open Systems. All rights reserved.