RPCMEM API functions
Initialize the RPCMEM Library. Only call this function once before using the RPCMEM Library. This API is mandatory on pre-Lahaina targets IF the client has linked to the rpcmem.a static library. If the client has only linked libadsprpc.so, libcdsprpc.so, or libsdsprpc.so, then the rpcmem_init call is not required on any target and other rpcmem APIs such as rpcmem_alloc can be called directly. NOTE: This function is not thread safe.
Deinitialize the RPCMEM Library. Only call this function once when the RPCMEM Library is no longer required. This API is mandatory on pre-Lahaina targets IF the client has linked to the rpcmem.a static library. If the client has only linked libadsprpc.so, libcdsprpc.so, or libsdsprpc.so, then the rpcmem_deinit call is not required on any target. NOTE: This function is not thread safe.
Allocate a zero-copy buffer for size upto 2 GB with the FastRPC framework. Default memory attributes, 2 KB rpcmem_alloc(RPCMEM_HEAP_ID_SYSTEM,RPCMEM_DEFAULT_FLAGS,2048); Or rpcmem_alloc_def(2048); Heap 22, uncached, 1 KB rpcmem_alloc(22,0,1024); Or rpcmem_alloc(22,RPCMEM_FLAG_UNCACHED,1024); Heap 21, cached, 2 KB rpcmem_alloc(21,RPCMEM_FLAG_CACHED,2048); Or #include<ion.h> rpcmem_alloc(21,ION_FLAG_CACHED,2048); Default memory attributes but from heap 18, 4 KB rpcmem_alloc(18,RPCMEM_DEFAULT_FLAGS,4096);
Allocate a zero-copy buffer with the FastRPC framework. The usage examples are same as rpcmem_alloc.
Allocate a buffer with default settings.
Free a buffer and ignore invalid buffers.
Return an associated file descriptor.
Was this page helpful?

