Florian Krohm 463aa75635 In functions VG_(am_relocate_nooverlap_client) and VG_(am_extend_map_client)
need to allow SkShmC segments, too.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15221
2015-05-12 21:52:08 +00:00

24 lines
491 B
C

#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include <sys/mman.h>
int main()
{
int shmid = shmget(IPC_PRIVATE, 100 * 4096,
IPC_CREAT | IPC_EXCL | S_IRUSR | S_IWUSR);
assert(shmid != -1);
void *addr = shmat(shmid, NULL, 0);
assert(addr != (void *)-1);
addr = mremap(addr, 100 * 4096, 400 * 4096, MREMAP_MAYMOVE);
assert(addr != (void *)-1);
return 0;
}