Skip to content

feat(libs): report Http2, Ssl and Net memory pool statistics - #1119

Merged
oneandonlydean merged 2 commits into
boykopovar:mainfrom
TideOPL:feat/net-memory-pool-stats
Oct 9, 2026
Merged

oneandonlydean merged 2 commits into
boykopovar:mainfrom
TideOPL:feat/net-memory-pool-stats

Conversation

@TideOPL

@TideOPL TideOPL commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

What

sceHttp2GetMemoryPoolStats, sceSslGetMemoryPoolStats and sceNetGetMemoryPoolStats threw. PPSA16064 (Minecraft Dungeons II, Unreal Engine) queries all three while its HTTP module starts.

  • Each library records the pool size given at sceHttp2Init, sceSslInit or sceNetPoolCreate, reports it, and reports a peak and current use of 0. The offline Http2/Ssl models and the host-socket Net library never allocate from these pools.
  • The layouts follow the PS4 SDK's *MemoryPoolStats structures (pool size, peak, current, plus a 32-bit reserved field for Http2 and Ssl). They're not confirmed for the PS5; TechnicalDebt records that.
  • Net returns EBADF for an unknown pool and EINVAL for a null output, like its other pool calls. Http2 and Ssl throw for both, since their error codes are unknown. Terminating a context or destroying a pool forgets its size.
  • sceHttp2SetResolveRetry (int id, int32_t retry), which the title calls next, accepts and ignores its value like the other Http2 settings.
  • The four Http2 WebSocket exports the title imports are added as unimplemented.

Tested

  • Windows 11, NVIDIA GeForce RTX 5070, MinGW-w64 GCC 15.2.0 (WinLibs UCRT r7). Full ctest: 393/393.
  • guest_http2, guest_ssl, guest_sce_net: the reported sizes; guest_sce_net also checks the null-output and unknown-pool errors.
  • PPSA16064: the title gets past its HTTP module start-up.

Asking for ideas

If anyone has the PS5 layouts or error codes for these (e.g. from a title that checks them), I'll match them.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes

sceHttp2GetMemoryPoolStats, sceSslGetMemoryPoolStats and
sceNetGetMemoryPoolStats threw. PPSA16064 (Minecraft Dungeons II,
Unreal Engine) queries all three while its HTTP module starts, and
aborted there.

Each library now records the pool size given at sceHttp2Init,
sceSslInit or sceNetPoolCreate and reports it with a peak and current
use of 0: the offline Http2 and Ssl models and the host-socket Net
library allocate nothing from these pools. The layouts follow the PS4
SDK's *MemoryPoolStats structures. Net returns EBADF for an unknown
pool and EINVAL for a null output, like its other pool calls; Http2 and
Ssl throw for both, as their error codes are unknown. Terminating a
context or destroying a pool forgets its size.

sceHttp2SetResolveRetry, which the title calls next, accepts and
ignores its value like the other Http2 settings. The four Http2
WebSocket exports the title imports are added as unimplemented.

guest_http2, guest_ssl and guest_sce_net check the reported sizes;
guest_sce_net also checks the null-output and unknown-pool errors.
@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#1092 core/libs/prx/libSceHttp2/Export.cpp L4-5, L10

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Progress report (73ac9ef → d1627cb)

📉 System libraries: 85.39% (-0.01%, +4 implemented, +4 declared functions)

✅ 4 implemented
Library Name
libSceHttp2 sceHttp2GetMemoryPoolStats
libSceHttp2 sceHttp2SetResolveRetry
libSceNet sceNetGetMemoryPoolStats
libSceSsl sceSslGetMemoryPoolStats
🆕 4 declared as stubs
Library Name
libSceHttp2 sceHttp2WebSocketCloseAsync
libSceHttp2 sceHttp2WebSocketCreateRequest
libSceHttp2 sceHttp2WebSocketSendDataMessageAsync
libSceHttp2 sceHttp2WebSocketSendTextMessageAsync

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 8, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

#1092 just landed and touches the same spots in libSceHttp2/Export.cpp (includes and the statics above the exports), so this needs a rebase onto main. Keep both: the completion queue from #1092 and your pool map.

# Conflicts:
#	core/libs/prx/libSceHttp2/Export.cpp
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 8, 2026
@oneandonlydean
oneandonlydean merged commit 881fb01 into boykopovar:main Oct 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants