1/* Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 * Use of this source code is governed by a BSD-style license that can be 3 * found in the LICENSE file. 4 */ 5 6/** 7 * This file defines the <code>PPB_Memory interface</code> for functions 8 * related to memory management. 9 */ 10 11label Chrome { 12 M14 = 0.1 13}; 14 15/** 16 * The PPB_Memory_Dev interface contains pointers to functions related to memory 17 * management. 18 * 19 */ 20interface PPB_Memory_Dev { 21 /** 22 * MemAlloc is a pointer to a function that allocate memory. 23 * 24 * @param[in] num_bytes A number of bytes to allocate. 25 * @return A pointer to the memory if successful, NULL If the 26 * allocation fails. 27 */ 28 mem_t MemAlloc([in] uint32_t num_bytes); 29 30 /** 31 * MemFree is a pointer to a function that deallocates memory. 32 * 33 * @param[in] ptr A pointer to the memory to deallocate. It is safe to 34 * pass NULL to this function. 35 */ 36 void MemFree([inout] mem_t ptr); 37}; 38