Skip to content

Instantly share code, notes, and snippets.

@mtottenh
Created October 27, 2015 16:00
Show Gist options
  • Save mtottenh/4a4daed09efb88d632e2 to your computer and use it in GitHub Desktop.
Save mtottenh/4a4daed09efb88d632e2 to your computer and use it in GitHub Desktop.
# undef mmap
extern "C" {
void* mmap64(void *start, size_t length, int prot, int flags,
int fd, __off64_t offset ) __THROW
ATTRIBUTE_SECTION(malloc_hook);
void* mmap(void *start, size_t length,int prot, int flags,
int fd, off_t offset) __THROW
ATTRIBUTE_SECTION(malloc_hook);
int munmap(void* start, size_t length) __THROW
ATTRIBUTE_SECTION(malloc_hook);
void* mremap(void* old_addr, size_t old_size, size_t new_size,
int flags, ...) __THROW
ATTRIBUTE_SECTION(malloc_hook);
void* sbrk(ptrdiff_t increment) __THROW
ATTRIBUTE_SECTION(malloc_hook);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment