remove Buf module, now that cstruct is mature#128
Closed
hannesm wants to merge 1 commit into
Closed
Conversation
dsheets
reviewed
Feb 12, 2017
| let marshal ?alloc q = | ||
| [q.Packet.id, Packet.marshal (Buf.create ?alloc 4096) q] | ||
| let marshal q = | ||
| [q.Packet.id, Packet.marshal (Cstruct.create 4096) q] |
Member
There was a problem hiding this comment.
What is ?alloc removed here? Is it no longer necessary for page-aligned allocations in Mirage on Xen?
Member
Author
There was a problem hiding this comment.
good remark. at the moment (see mirage/mirage-net-xen#17), Mirage on Xen (in mirage-net-xen) copies the frame anyways to (half-page) aligned memory. no need for page aligned on kvm afaik.
this allows us to remove the entire allocation magic from ocaml-dns, and use Cstruct.create instead. I partially started this (by removing ?alloc parameters), but didn't finish (will do so soon). no io-page will be harmed by this change ;)
Merged
Member
Author
|
superseeded by #132 |
RyanGibb
pushed a commit
to RyanGibb/ocaml-dns
that referenced
this pull request
Sep 26, 2022
As discussed in mirage#128, with the exception of bin_prot, camlzip, zlib-xen and dolog.
RyanGibb
pushed a commit
to RyanGibb/ocaml-dns
that referenced
this pull request
Sep 26, 2022
[new release] ptime (1.0.0+dune)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@dsheets told me when
Bufwas written, cstruct was not yet in a mature state. There was no performance measurement of buf vs cstruct done.Since I like less code more, this seemed to be a good excuse to read through ocaml-dns ;)
any opinions /cc @avsm @djs55 @dsheets @yomimono