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

[DDMD] Use an alloc function for Token freelist instead of operator new. #3808

Merged
merged 1 commit into from Jul 25, 2014

Conversation

yebblies
Copy link
Member

This allows both C++ and D to both use the custom freelist.

Lexer::freelist = t->next;
t->next = NULL;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should probably either assign from a default constructed object or use placement new because it's not obvious that this should be kept in sync with the default constructor.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alloc doesn't have to initialize the memory properly. I just wanted to drop it out of the freelist completely.

@WalterBright
Copy link
Member

Auto-merge toggled on

WalterBright added a commit that referenced this pull request Jul 25, 2014
[DDMD] Use an alloc function for Token freelist instead of operator new.
@WalterBright WalterBright merged commit b09c870 into dlang:master Jul 25, 2014
@yebblies yebblies deleted the tokalloc branch July 25, 2014 06:34
9rnsr pushed a commit to 9rnsr/dmd that referenced this pull request Jul 28, 2014
[DDMD] Use an alloc function for Token freelist instead of operator new.
@yebblies yebblies added the DDMD label Jul 28, 2014
ibuclaw pushed a commit to ibuclaw/dmd that referenced this pull request Jul 10, 2022
add clarifying examples of SIMD usage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants