Skip to content

Reduce cdfs ram #715

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 10, 2025
Merged

Reduce cdfs ram #715

merged 2 commits into from
Jan 10, 2025

Conversation

fjtrujy
Copy link
Member

@fjtrujy fjtrujy commented Jan 10, 2025

Reducing the number of max folders and max files that can be opened at the same time in the CDFS driver.
This drastically reduces the amount of RAM wasted on this driver.

I plan to do a further refactor in the following PRs, but this is a a quick win for now.

Before:

================== RAM ====================
Symbol                   Size        %
===========================================
?                        613.1 KiB   100.00
  fod_table              584.2 KiB    95.28
  local_buffer.1          18.0 KiB     2.94
  dvdvBuffer               2.0 KiB     0.33
  cdVolDesc                2.0 KiB     0.33
  localVolDesc.1           2.0 KiB     0.33
  cacheInfoDir             1.0 KiB     0.17
  pathcopy.3               1.0 KiB     0.16
  pathname.5               1.0 KiB     0.16
  dirname.2                1.0 KiB     0.16
  fd_table               256.0 B       0.04
  tocEntry.0             146.0 B       0.02
  ext_list.0             129.0 B       0.02
  filename.4             129.0 B       0.02
  fio_ops                 68.0 B       0.01
  fod_used                64.0 B       0.01
  fd_used                 64.0 B       0.01
  fio_driver              20.0 B       0.00
  cdvdChangedMagicLast     8.0 B       0.00
  _irx_id                  8.0 B       0.00
  lastsector               4.0 B       0.00
  last_bk                  4.0 B       0.00
  cdReadMode               4.0 B       0.00
  cdvdChangedMagic         4.0 B       0.00
===========================================
Symbols total            613.1 KiB
===========================================

After:

================== RAM ====================
Symbol                   Size        %
===========================================
?                        174.6 KiB   100.00
  fod_table              146.0 KiB    83.66
  local_buffer.1          18.0 KiB    10.31
  dvdvBuffer               2.0 KiB     1.15
  cdVolDesc                2.0 KiB     1.15
  localVolDesc.0           2.0 KiB     1.15
  cacheInfoDir             1.0 KiB     0.59
  pathcopy.2               1.0 KiB     0.57
  pathname.4               1.0 KiB     0.57
  dirname.1                1.0 KiB     0.57
  tocEntry.0             146.0 B       0.08
  filename.3             129.0 B       0.07
  fio_ops                 68.0 B       0.04
  fd_table                64.0 B       0.04
  fio_driver              20.0 B       0.01
  fod_used                16.0 B       0.01
  fd_used                 16.0 B       0.01
  cdvdChangedMagicLast     8.0 B       0.00
  _irx_id                  8.0 B       0.00
  lastsector               4.0 B       0.00
  last_bk                  4.0 B       0.00
  cdReadMode               4.0 B       0.00
  cdvdChangedMagic         4.0 B       0.00
===========================================
Symbols total            174.6 KiB
===========================================

Cheers

@rickgaiser rickgaiser merged commit e12e8e3 into ps2dev:master Jan 10, 2025
3 checks passed
@israpps
Copy link
Contributor

israpps commented Jan 10, 2025

Thanks. Will test with wLaunchELF 4.43_isr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants