1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Add mmap() wrapper.

This commit is contained in:
Bartosz Taudul
2020-02-12 19:22:46 +01:00
parent fa1747bdb2
commit cc805b7b74
10 changed files with 101 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
#ifndef __TRACYMMAP_HPP__
#define __TRACYMMAP_HPP__
#if !defined _MSC_VER && !defined __MINGW32__ && !defined __CYGWIN__
# include <sys/mman.h>
#else
# include <string.h>
# include <sys/types.h>
# define PROT_READ 1
# define PROT_WRITE 2
# define MAP_SHARED 0
void* mmap( void* addr, size_t length, int prot, int flags, int fd, off_t offset );
int munmap( void* addr, size_t length );
#endif
#endif