VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/vboxvideo/HGSMIMemAlloc.h@ 69474

最後變更 在這個檔案從69474是 69346,由 vboxsync 提交於 7 年 前

vboxvideo: scm updates (mit license formatting, 'this file is based on' instead of 'this code is based on').

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 2.0 KB
 
1/* $Id: HGSMIMemAlloc.h 69346 2017-10-26 13:36:28Z vboxsync $ */
2/*
3 * Copyright (C) 2017 Oracle Corporation
4 *
5 * Permission is hereby granted, free of charge, to any person
6 * obtaining a copy of this software and associated documentation
7 * files (the "Software"), to deal in the Software without
8 * restriction, including without limitation the rights to use,
9 * copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following
12 * conditions:
13 *
14 * The above copyright notice and this permission notice shall be
15 * included in all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24 * OTHER DEALINGS IN THE SOFTWARE.
25 */
26
27
28/* In builds inside of the VirtualBox source tree we override the default
29 * HGSMIMemAlloc.h using -include, therefore this define must match the one
30 * there. */
31#ifndef ___VBox_Graphics_HGSMIMemAlloc_h
32#define ___VBox_Graphics_HGSMIMemAlloc_h
33
34#include "HGSMIDefs.h"
35#include "VBoxVideoIPRT.h"
36
37#define HGSMI_MA_DESC_ORDER_BASE UINT32_C(5)
38
39#define HGSMI_MA_BLOCK_SIZE_MIN (UINT32_C(1) << (HGSMI_MA_DESC_ORDER_BASE + 0))
40
41typedef struct HGSMIMADATA
42{
43 HGSMIAREA area;
44 bool fAllocated;
45} HGSMIMADATA;
46
47RT_C_DECLS_BEGIN
48
49int HGSMIMAInit(HGSMIMADATA *pMA, const HGSMIAREA *pArea,
50 HGSMIOFFSET *paDescriptors, uint32_t cDescriptors, HGSMISIZE cbMaxBlock,
51 const HGSMIENV *pEnv);
52void HGSMIMAUninit(HGSMIMADATA *pMA);
53
54void *HGSMIMAAlloc(HGSMIMADATA *pMA, HGSMISIZE cb);
55void HGSMIMAFree(HGSMIMADATA *pMA, void *pv);
56
57RT_C_DECLS_END
58
59#endif /* !___VBox_Graphics_HGSMIMemAlloc_h */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette