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

Commit 9e527e03 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 am: baa9fd65

am: fdd86163

Change-Id: Ia09af5a450688c5562bc0f95163ff3d6aff83ec7
parents f3271ba7 fdd86163
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -94,7 +94,8 @@ size_t ASharedMemory_getSize(int fd) __INTRODUCED_IN(26);
 *     int fd = ASharedMemory_create("memory", 128);
 *     int fd = ASharedMemory_create("memory", 128);
 *
 *
 *     // By default it has PROT_READ | PROT_WRITE | PROT_EXEC.
 *     // 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
 *     strcpy(buffer, "This is an example."); // trivially initialize content
 *
 *