Skip to main content
POST
Collapse envd's own anonymous heap into 2 MiB transparent hugepages before pause, so on resume envd touches fewer distinct guest-physical frames (each a cold fault). Best-effort.

Authorizations

X-Access-Token
string
header
required

Sandbox access token (envdAccessToken) for authenticating requests to a running sandbox. Returned by: POST /sandboxes (on create), POST /sandboxes/{sandboxID}/connect (on connect), POST /sandboxes/{sandboxID}/resume (on resume), and GET /sandboxes/{sandboxID} (for running or paused sandboxes).

Headers

E2b-Sandbox-Id
string
required

Identifier of the target sandbox. Routes the request to that sandbox's envd over the shared sandbox host.

E2b-Sandbox-Port
integer
default:49983
required

Port envd listens on inside the sandbox (default 49983).

Response

Heap collapsed

Per-call statistics from a heap collapse

regions
integer

Anonymous read-write regions scanned

chunks
integer

2 MiB chunks attempted

collapsed
integer

Chunks whose base pages were actually migrated into a new hugepage (real work)

alreadyHuge
integer

Chunks MADV_COLLAPSE accepted but were already hugepages (no work)

skipped
integer

Chunks that could not be collapsed (empty or ineligible)

elapsedMs
integer<int64>

Wall-clock time spent collapsing, in milliseconds