Skip to content

Streams are challenging to implement because they return pointers #8

Closed
@brendandburns

Description

@brendandburns

As I look to implement streams, it seems like it is excessively challenging to return a pointer from the stream read function.

Typically in stream reading (e.g. fread in C or InputStream.read in Java) the pattern is to pass a buffer into the stream read, rather than have the stream return an array of bytes.

I think that we should change streams to take a buffer from the guest to write data into, that will make the ownership semantics clearer (#7) and will also make it easier to implement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions