You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "donghengqaz (via GitHub)" <gi...@apache.org> on 2023/04/06 06:43:19 UTC
[GitHub] [nuttx] donghengqaz commented on a diff in pull request #8974: xtensa/esp32: Make asprintf and lib_free corresponding
donghengqaz commented on code in PR #8974:
URL: https://github.com/apache/nuttx/pull/8974#discussion_r1159348244
##########
fs/vfs/fs_rename.c:
##########
@@ -244,7 +244,7 @@ static int pseudorename(FAR const char *oldpath, FAR struct inode *oldinode,
RELEASE_SEARCH(&newdesc);
if (subdir != NULL)
{
- kmm_free(subdir);
+ lib_free(subdir);
Review Comment:
If not define `__KERNEL__`, then `vasprintf` calls `lib_malloc` == `malloc`, but ESP32 added a new memory management mode `ESP32_SPIRAM_USER_HEAP`. In this mode, `malloc` only manages PSRAM space and `kmm_malloc` only manage SRAM space.
So we should modify all these "free" function calling.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org