Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zmalloc update #185

Merged
merged 1 commit into from
Oct 4, 2024
Merged

zmalloc update #185

merged 1 commit into from
Oct 4, 2024

Conversation

ivop
Copy link
Contributor

@ivop ivop commented Oct 3, 2024

I noticed I constantly added and subtracted the size of the size field, so including it in its own definition reduces the amount of additions and subtractions. It's now only added at the beginning (added to the requested size).

The "unsafe" pointer usage actually worked on Linux (64-bit) but llvm-mos generates 500 bytes of assembly that does not work for <10 lines of C code that's only a few loads and stores, so for now I removed it. It's not really a big deal, as DS always increases/decreases in steps large enough to not matter anyway.

Binary shrunk ~600 bytes.

traversing free list, remove unsafe pointer usage.
@ivop ivop closed this Oct 3, 2024
@ivop ivop reopened this Oct 3, 2024
@ivop
Copy link
Contributor Author

ivop commented Oct 3, 2024

Closed/reopened to force running CI again (getting ROMs failed the first time).

@davidgiven
Copy link
Owner

Thanks!

@davidgiven davidgiven merged commit c047c1e into davidgiven:master Oct 4, 2024
1 of 2 checks passed
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