sdk
sdk copied to clipboard
Add ForeignByteBuffer which exposes the foreign memory
Most of our SDK relies on the getForeign method of the implementation class of ByteBuffer, so we have to type variables with 'var' to avoid warnings.
We should all a class ForeignByteBuffer that extends the interface of ByteBuffer with the getForeign method.
Please did not forget about that the Dart VM has a limitations in the list length. Eg. in 32-bit mode maximum length of list is a maximum SMI value (32 bit - 1 bit = 31 bit). This means that it can not cover the entire address space (only the half of all possible address space).
CC @DmitryOlshansky-google