Merge "malloc_hooks README.md: fix example compilation failures"
This commit is contained in:
commit
5057c42012
1 changed files with 2 additions and 2 deletions
|
@ -74,11 +74,11 @@ Example Implementation
|
|||
======================
|
||||
Below is a simple implementation intercepting only malloc/calloc calls.
|
||||
|
||||
void* new_malloc_hook(size_t bytes, const char* arg) {
|
||||
void* new_malloc_hook(size_t bytes, const void* arg) {
|
||||
return orig_malloc_hook(bytes, arg);
|
||||
}
|
||||
|
||||
void orig_malloc_hook = __malloc_hook;
|
||||
auto orig_malloc_hook = __malloc_hook;
|
||||
__malloc_hook = new_malloc_hook;
|
||||
|
||||
Enabling Examples
|
||||
|
|
Loading…
Reference in a new issue