Skip to content

introduce new blazingly fast alloc#18

Open
Sharktheone wants to merge 7 commits into
buyukakyuz:mainfrom
Sharktheone:blazingly-fast-alloc
Open

introduce new blazingly fast alloc#18
Sharktheone wants to merge 7 commits into
buyukakyuz:mainfrom
Sharktheone:blazingly-fast-alloc

Conversation

@Sharktheone

Copy link
Copy Markdown

glibc malloc and free are waay, wayy to slow. They rely on syscalls. We obviously don't have time for such nonsense.

This PR introduces a malloc and free how it always should have been! The new malloc and free work by keeping track of all allocs in a global state. They are dellocated by getting the next state with the pointer as alpha.

Applications using this new malloc will have a guaranteed performance benefit of at least 420%!

@buyukakyuz

Copy link
Copy Markdown
Owner

Wait, would this compile? Isn't box a reserved keyword?

@Sharktheone

Copy link
Copy Markdown
Author

Oh, true... it is. Completely forgot about that one

@buyukakyuz

buyukakyuz commented Jan 3, 2026

Copy link
Copy Markdown
Owner

A few issues here. You named your module alloc, but the crate already has extern crate alloc for no_std support. Need to rename your module.

The crate is #![no_std]. Please replace std:: with core::or alloc::.

@Sharktheone

Copy link
Copy Markdown
Author

I'm not sure if you actually need to rename the module since modules are not conflicting with crates. It can come to some unconveniant situations inside the module itself when you want to want to use a crate with the same name as the module name, but I think it is manageable here.

@buyukakyuz

Copy link
Copy Markdown
Owner

It doesn't compile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants