Skip to content

[vm/ffi] Investigate copy-free Strings #39787

Open
@dcharkes

Description

@dcharkes

However, we might need something more performant (which avoids copying), if this is not performant enough.

Originally posted by @dcharkes in #35762 (comment)

Our null-terminated Utf8 and Utf16 string helpers in package:ffi require copying bytes from Dart to C.

We should investigate whether we can have pass strings from C to Dart without copying, and whether we can pass Utf16 strings from Dart to C without copying. The latter is unlikely though, as the Dart Garbage Collector might relocate the String.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.library-ffi

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions