Skip to content

Add ability to trasnsfer TypedData to ffi #60170

Closed
@MohiuddinM

Description

@MohiuddinM

Right now, we have to allocate a buffer using malloc, and then copy TypedData to the buffer element by element. This adds a lot of overhead, and makes the ffi calls slow for larger buffers. So it will be great if we can get a pointer to TypedData, and use that in ffi calls.

We can have a version of malloc that takes a TypedData, instead of size, and then allocates the TypedData buffer in native memory. Then we can add a method to TypedData called .toNative() on top of that.

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-ffitriagedIssue has been triaged by sub teamtype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions