mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-05-23 16:31:20 -04:00
return errors from memory_set_name too
This commit is contained in:
parent
29ffcdf810
commit
1d15d34c7e
2 changed files with 5 additions and 3 deletions
6
memory.c
6
memory.c
|
@ -94,8 +94,10 @@ bool memory_purge(void *ptr, size_t size) {
|
|||
return ret;
|
||||
}
|
||||
|
||||
void memory_set_name(UNUSED void *ptr, UNUSED size_t size, UNUSED const char *name) {
|
||||
bool memory_set_name(UNUSED void *ptr, UNUSED size_t size, UNUSED const char *name) {
|
||||
#ifdef LABEL_MEMORY
|
||||
prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, ptr, size, name);
|
||||
return prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, ptr, size, name);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue