Special system calls, or requests to the UNIX kernel, allocate and free the memory and set permissions; common read and write operations put and get data from the region.
用特殊的系统调用(即对UNIX内核的请求)分配和释放内存并设置权限;通过一般的读写操作读写内存段中的数据。
Having found out how many items the PPE needs copied, the SPE program can allocate local storage, read the items in (using the same code as before), and then perform its algorithm, reviewed above.
由于已经找到PPE需要拷贝多少项数据,SPE程序现在可以分配本地存储空间,将项目读入这段存储空间(使用与前面相同的代码),然后执行算法(如上所示)。
Once we have a particular attribute name we wish to get the associated value for, we allocate a ByteBuffer of the right size for the value and then call the view's read (String, ByteBuffer) method.
一旦我们拥有了想得到相关值的特定属性名,就为该值分配一个大小合适的ByteBuffer,然后调用视图的read (String, ByteBuffer)方法。
Once we have a particular attribute name we wish to get the associated value for, we allocate a ByteBuffer of the right size for the value and then call the view's read (String, ByteBuffer) method.
一旦我们拥有了想得到相关值的特定属性名,就为该值分配一个大小合适的ByteBuffer,然后调用视图的read (String, ByteBuffer)方法。
应用推荐