-
Notifications
You must be signed in to change notification settings - Fork 171
Arena Allocator #3231
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
base: main
Are you sure you want to change the base?
Arena Allocator #3231
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good. The arena implementation seems fine, I left a few minor commit suggestions but I don't see any actual problems.
@jhawthorn do you mind taking a look at this (if you have time)? Otherwise I'm going to merge it.
* #endif | ||
* ``` | ||
*/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
case PM_TOKEN_QUESTION_MARK: { | ||
context_push(parser, PM_CONTEXT_TERNARY); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.warn_mismatched_indentation = true | ||
}; | ||
|
||
// TODO: find a better starting size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
4k is probably a fine starting size, maybe we can add some logging later and figure out a better start.
|
||
*stack = current->prev; | ||
xfree(current); | ||
// xfree(current); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we just delete this?
@tenderlove make sure you don't merge this before we get this working in ruby/ruby using the new API, otherwise this is going to break a bunch of stuff. I've been holding off on merging this because I want to make sure we can do some benchmarking on both speed and memory from within CRuby before we go this route, since it's a such an invasive change. |
I'll start testing this in ruby/ruby and see what changes are necessary. In the meantime I'm going to label this PR as "blocked" just to indicate that it should not be merged until it is fully tested over there. |
Rebased from #2913 into main