
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
memory-allocator
Advanced tools
A simple ArrayBuffer memory allocator for JS. It can be found on NPM as memory-allocator or @warriors-life/memory-allocator, or on GitHub Packages as latter.
Not to be confused with the memory-pool package, which removes the overhead of object creation by maintaining a pool of them and modifying their properties (see also PrimitivePool).
MIT.
Feel free to open an issue or make a pull request! You can find contributing guidelines here and as a start you can work on any issue labelled "good first issue".
The package exports MemoryAllocator class as the default and also exports MemoryRef class.
The main class.
bufferSize parameters controls minimal size of the new array buffers created by MemoryAllocator when it is impossible to allocate data in old buffers.
Manually add a buffer of the specified size.
Allocate a slice of memory of the specified size. The resulting memory ref is returned.
Reference to a slice of memory. Note that underlying slice may be relocated during a manual defragmentation.
Mark the reference as freed. It can no longer be used after that and the underlying memory may be redistributed.
Returns a DataView of the underlying memory, which can be read and written to.
Returns a typed array mapped to the underlying memory, which can be read and written to.
FAQs
Simple ArrayBuffer memory allocator
We found that memory-allocator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.