libc: fix assert "Free memory from the wrong heap" with flat mode and user separated heap enabled mode

In flat mode:
kernel code, like net driver...
strdup    -> nx_strdup -> kmm_malloc
lib_free  -> kmm_free

app code, like stdlib...
strdup -> malloc
free   -> free

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2025-07-25 11:50:50 +08:00 committed by Alan C. Assis
parent 4a90c179f8
commit 1bfe705226

View file

@ -45,7 +45,7 @@
* then only the first mode is supported.
*/
#if !defined(CONFIG_BUILD_FLAT) && defined(__KERNEL__)
#if defined(__KERNEL__)
/* Domain-specific allocations */