pellsson / pheap Goto Github PK
View Code? Open in Web Editor NEWPrivate heap and/or malloc replacement
Private heap and/or malloc replacement
Bare minimum option: Free a memory block if no bytes are in use after a free()
Better option (?): Use reserve + commit (assuming the system support it).
Topic.
Add test checkpoints in all corner-case branches and validate/force that the tests have exhausted all of them.
Currently we never release memory.
Either:
a) go all out with some reserved-memory and a bitmap of committed sections
b) just release memory blocks when they have no references.
Currently it always reallocates to the new size, instead of resizing the existing block if possible.
If you free the last element, and the end-pointer is just att the end of the memory-block, the code still touches ->extra and crashes.
The prev
pointer does not have to be a pointer. It could just be a 32-bit integer to save 4 bytes on 64-bit systems.
If this is attacked, try to make the allocated state consume 8 bytes?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.