// Copyright 2021 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Next MinVersion: 4 module arc.mojom; // Describes the type of memory reclaim should be performed on the guest. enum ReclaimType { // Only anonymous memory will be reclaimed. ANON, // All memory will be reclaimed. ALL }; // Describes a request from host to guest to reclaim memory. struct ReclaimRequest { ReclaimType type; }; // Describes a response from guest after trying to reclaim memory. struct ReclaimResult { // Number of processes that were reclaimed successfully. uint32 reclaimed; // Number of processes that were reclaimed unsuccessfully. uint32 unreclaimed; }; // Deprecated method IDs: 1, 2 // Next method ID: 4 interface MemoryInstance { // Drops the guest kernel's page caches. Returns true on success. DropCaches@0() => (bool result); // Reclaims memory from all guest processes. [MinVersion=3] Reclaim@3(ReclaimRequest request) => (ReclaimResult result); };