mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-17 12:41:32 +00:00
fs: fat: Reduce default max clustersize 64KiB from malloc pool
Release cluster block immediately when no longer use would help to reduce 64KiB memory allocated to the memory pool. Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
This commit is contained in:
parent
8537874a65
commit
e48485f5e4
1 changed files with 9 additions and 1 deletions
10
fs/fat/fat.c
10
fs/fat/fat.c
|
@ -1148,7 +1148,15 @@ int file_fat_read_at(const char *filename, loff_t pos, void *buffer,
|
|||
goto out_free_both;
|
||||
|
||||
debug("reading %s at pos %llu\n", filename, pos);
|
||||
ret = get_contents(&fsdata, itr->dent, pos, buffer, maxsize, actread);
|
||||
|
||||
/* For saving default max clustersize memory allocated to malloc pool */
|
||||
dir_entry *dentptr = itr->dent;
|
||||
|
||||
free(itr);
|
||||
|
||||
itr = NULL;
|
||||
|
||||
ret = get_contents(&fsdata, dentptr, pos, buffer, maxsize, actread);
|
||||
|
||||
out_free_both:
|
||||
free(fsdata.fatbuf);
|
||||
|
|
Loading…
Add table
Reference in a new issue