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

Add support for event loop and basic network listeners, and a general-purpose memory allocator #791

Closed
wants to merge 4 commits into from

Conversation

bscheinman
Copy link
Contributor

No description provided.

@andrewrk
Copy link
Member

In your general purpose allocator, the part where it actually needs to do the syscall to allocate memory is unimplemented.

I have a suggested solution! This allocator can accept another allocator upon initialization, which it uses to make the underlying raw_alloc allocations.

Then the user of this API can pass in a DirectAllocator, which always calls the system API to allocate/free directly.

You can see this pattern in std/special/build_runner.zig.

@andrewrk
Copy link
Member

andrewrk commented Mar 2, 2018

This is quite a lot of exciting stuff. Can you break this into a series of smaller, independently unit-tested, easier-to-review pull requests?

@bscheinman
Copy link
Contributor Author

Closing this PR, and I will reopen a number of smaller independent ones as suggested.

@bscheinman bscheinman closed this Mar 4, 2018
@kristate
Copy link
Contributor

kristate commented Jun 5, 2018

@bscheinman @andrewrk What is the latest on this?
Can we get a PR/Issue open to start working on networking?

@andrewrk
Copy link
Member

andrewrk commented Jun 5, 2018

Here's something
https://gist.github.com/andrewrk/d48c8c9ca0fb67bf6d7c0bed744d82ce

I've got some work in a branch too. More work planned after Pointer Reform (see #770) is done.

@kristate
Copy link
Contributor

kristate commented Jun 5, 2018

@andrewrk cool -- there is a lot of work that has been put into this PR.

Would it be better to directly hack on std or build-out a module and then integrate later?

Is there a google hang-out or something that we can join to work on hacking together?

Sorry to ask here! Thanks!

@andrewrk
Copy link
Member

andrewrk commented Jun 5, 2018

there is a lot of work that has been put into this PR.

Everything this PR does exists in std.event using coroutines. I have yet to document that language feature though. The general purpose allocator in this PR was never finished.

Would it be better to directly hack on std or build-out a module and then integrate later?

I know @tiehuis likes to build out separate repositories before submitting a pull request to zig. You're welcome to make pull requests directly against std. I would recommend first filing an issue with a proposal explaining the use case that you're trying to solve and how you propose going about solving it - that way if it's something already planned or related to something already planned we can figure out the best way to go about it.

Is there a google hang-out or something that we can join to work on hacking together?

The #zig channel on freenode is a good place to collaborate with the zig community.

Sorry to ask here! Thanks!

No worries. Hope to see you around

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.

None yet

3 participants