Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit baa9fd65 authored by Elliott Hughes's avatar Elliott Hughes Committed by android-build-merger
Browse files

Merge "ashmem: update example code of create shmem region"

am: 080dadba

Change-Id: I712870840d3f9ee5eec5b992662d506883cf21be
parents d896cab7 080dadba
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -94,7 +94,8 @@ size_t ASharedMemory_getSize(int fd) __INTRODUCED_IN(26);
 *     int fd = ASharedMemory_create("memory", 128);
 *
 *     // By default it has PROT_READ | PROT_WRITE | PROT_EXEC.
 *     char *buffer = (char *) mmap(NULL, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
 *     size_t memSize = ASharedMemory_getSize(fd);
 *     char *buffer = (char *) mmap(NULL, memSize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
 *
 *     strcpy(buffer, "This is an example."); // trivially initialize content
 *