Skip to content

Commit

Permalink
baselibc: Add option to enable extra debugging for malloc/free
Browse files Browse the repository at this point in the history
  • Loading branch information
andrzej-kaczmarek committed Oct 16, 2024
1 parent 08847c3 commit e43465a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libc/baselibc/pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,8 @@ pkg.init.BASELIBC_THREAD_SAFE_HEAP_ALLOCATION:
pkg.cflags:
- -fno-builtin-malloc

pkg.cflags.BASELIBC_DEBUG_MALLOC:
- -DDEBUG_MALLOC

pkg.lflags:
- -umain
6 changes: 6 additions & 0 deletions libc/baselibc/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,9 @@ syscfg.defs:
description: >
Set to 1 if project requires malloc/calloc/free to be thread safe.
value: 0

BASELIBC_DEBUG_MALLOC:
description: >
Set to 1 to enable extra debugging for malloc/free calls.
This will e.g. assert on double-free.
value: 0

0 comments on commit e43465a

Please sign in to comment.