mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-09-18 03:54:50 -04:00
add real mallinfo implementation for Android
Android Q uses the mallinfo implementation in the ART GC:c220f98180
1575267302
This commit is contained in:
parent
7acebaa837
commit
350d0e5fd2
5 changed files with 96 additions and 4 deletions
6
Makefile
6
Makefile
|
@ -15,7 +15,8 @@ CONFIG_REGION_QUARANTINE_QUEUE_LENGTH := 1024
|
|||
CONFIG_REGION_QUARANTINE_SKIP_THRESHOLD := 33554432 # 32MiB
|
||||
CONFIG_FREE_SLABS_QUARANTINE_RANDOM_LENGTH := 32
|
||||
CONFIG_CLASS_REGION_SIZE := 137438953472 # 128GiB
|
||||
CONFIG_N_ARENA = 1
|
||||
CONFIG_N_ARENA := 1
|
||||
CONFIG_STATS := false
|
||||
|
||||
define safe_flag
|
||||
$(shell $(CC) -E $1 - </dev/null >/dev/null 2>&1 && echo $1 || echo $2)
|
||||
|
@ -81,7 +82,8 @@ CPPFLAGS += \
|
|||
-DREGION_QUARANTINE_SKIP_THRESHOLD=$(CONFIG_REGION_QUARANTINE_SKIP_THRESHOLD) \
|
||||
-DFREE_SLABS_QUARANTINE_RANDOM_LENGTH=$(CONFIG_FREE_SLABS_QUARANTINE_RANDOM_LENGTH) \
|
||||
-DCONFIG_CLASS_REGION_SIZE=$(CONFIG_CLASS_REGION_SIZE) \
|
||||
-DN_ARENA=$(CONFIG_N_ARENA)
|
||||
-DN_ARENA=$(CONFIG_N_ARENA) \
|
||||
-DSTATS=$(CONFIG_STATS)
|
||||
|
||||
libhardened_malloc.so: $(OBJECTS)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -shared $^ $(LDLIBS) -o $@
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue