Memory
This page documents the Memory CDP domain supported by Lynx DevTool.
Experimental reference
This generated reference is still being completed.
- CDP events are not included yet.
- Some Lynx extensions are listed but do not yet have detailed documentation.
- Method descriptions are not automatically verified against the implementation and may be incomplete or inaccurate.
Verify behavior against the implementation and the linked upstream CDP reference before relying on it.
Overview
- Scope:
global-and-instance - CDP domain: Memory
Lynx Extensions
Memory.getAllMemoryUsage
Queries global Lynx-attributed memory usage across live registered Lynx instances.
- Origin:
lynx-extension - Source:
devtool/lynx_devtool/agent/domain_agent/inspector_memory_agent.cc
Parameters
Returns
Notes
- Send this method to the global DevTool handler with session ID -1.
- The mediator validates params.timeoutMs before dispatch. Non-object params, non-integer timeoutMs, negative timeoutMs, and timeoutMs values greater than 300000 return CDP errors.
- The platform bridge returns only the result object as JSON. The mediator parses that object and wraps it in the CDP response envelope with the original request id.
- Runtimes without a platform memory bridge return a CDP error instead of a partial memory result.
- This method differs from Runtime.getHeapUsage, which reports JavaScript heap usage for one target runtime.
Examples
Use the platform default timeout
Request:
Use an explicit timeout
Request:
Memory.startTracing
Starts platform memory tracing for Lynx memory diagnostics.
- Origin:
lynx-extension - Source:
devtool/lynx_devtool/agent/domain_agent/inspector_memory_agent.cc
Parameters
No parameters.
Returns
Notes
- Use the global DevTool handler with session ID -1 when controlling app-wide memory tracing.
- Dispatches through LynxGlobalDevToolMediator to GlobalDevToolPlatformFacade.StartMemoryTracing.
- Android and Darwin register the DevTool memory controller as a platform memory reporter.
- The generic embedder implementation is a no-op until the embedder supplies a memory bridge.
Examples
Start memory tracing
Request:
Response:
Memory.stopTracing
Stops platform memory tracing for Lynx memory diagnostics.
- Origin:
lynx-extension - Source:
devtool/lynx_devtool/agent/domain_agent/inspector_memory_agent.cc
Parameters
No parameters.
Returns
Notes
- Use the global DevTool handler with session ID -1 when controlling app-wide memory tracing.
- Dispatches through LynxGlobalDevToolMediator to GlobalDevToolPlatformFacade.StopMemoryTracing.
- Android and Darwin unregister the DevTool memory controller from platform memory reporting.
- The generic embedder implementation is a no-op until the embedder supplies a memory bridge.
Examples
Stop memory tracing
Request:
Response: