This patch addresses a warning encountered during the build process:
warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a
region of size between 0 and 544 [-Wformat-truncation=]
snprintf(path, MAXPATHSIZE, "%s/%s/cache", node_dir, dir->d_name);
^~
note: ‘snprintf’ output between 8 and 807 bytes into a destination of size 545
snprintf(path, MAXPATHSIZE, "%s/%s/cache", node_dir, dir->d_name);
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Horatio Zhang <Hongkun.Zhang@amd.com>
Reviewed-by: Aaron Liu <aaron.liu@amd.com>
Part-of: <http://10.67.69.192/wsl/libhsakmt/-/merge_requests/38>
This change removes the check for sufficient free memory before allocation.
The previous check could cause performance degradation. Reserving a portion
of system memory helps prevent system hangs due to insufficient memory.
However, if free memory is still insufficient, memory allocation may still
lead to system hangs.
Signed-off-by: lyndonli <Lyndon.Li@amd.com>
Reviewed-by: Flora Cui <flora.cui@amd.com>
Part-of: <http://10.67.69.192/wsl/libhsakmt/-/merge_requests/10>