VirtualBox

source: vbox/trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-shutdown.c@ 58812

最後變更 在這個檔案從58812是 58812,由 vboxsync 提交於 9 年 前

bs3kit: Started on the switcher code.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 1.4 KB
 
1
2#include "bs3kit.h"
3#include <iprt/assert.h>
4
5AssertCompileSize(uint16_t, 2);
6AssertCompileSize(uint32_t, 4);
7AssertCompileSize(uint64_t, 8);
8
9
10/* Just a sample. */
11BS3_DECL(void) Main_pe16(void)
12{
13 void BS3_FAR *pvTmp1;
14 void BS3_FAR *pvTmp2;
15 void BS3_FAR *pvTmp3;
16 void BS3_FAR *pvTmp4;
17
18 Bs3TestInit("bs3-shutdown");
19
20Bs3PrintStr("Bs3PrintX32:");
21Bs3PrintX32(UINT32_C(0xfdb97531));
22Bs3PrintStr("\r\n");
23
24Bs3Printf("Bs3Printf: RX32=%#'RX32 string='%s' d=%d p=%p\n", UINT32_C(0xfdb97531), "my string", 42, Main_pe16);
25
26pvTmp2 = Bs3MemAlloc(BS3MEMKIND_REAL, _4K);
27Bs3PrintStr("pvTmp2=");
28Bs3PrintX32((uintptr_t)pvTmp2);
29Bs3PrintStr("\r\n");
30
31pvTmp3 = Bs3MemAlloc(BS3MEMKIND_REAL, _4K);
32Bs3PrintStr("pvTmp3=");
33Bs3PrintX32((uintptr_t)pvTmp3);
34Bs3PrintStr("\r\n");
35Bs3MemFree(pvTmp2, _4K);
36
37pvTmp4 = Bs3MemAlloc(BS3MEMKIND_REAL, _4K);
38Bs3PrintStr("pvTmp4=");
39Bs3PrintX32((uintptr_t)pvTmp4);
40Bs3PrintStr("\r\n");
41Bs3PrintStr("\r\n");
42
43pvTmp1 = Bs3MemAlloc(BS3MEMKIND_REAL, 31);
44Bs3PrintStr("pvTmp1=");
45Bs3PrintX32((uintptr_t)pvTmp1);
46Bs3PrintStr("\r\n");
47
48pvTmp2 = Bs3MemAlloc(BS3MEMKIND_REAL, 17);
49Bs3PrintStr("pvTmp2=");
50Bs3PrintX32((uintptr_t)pvTmp2);
51Bs3PrintStr("\r\n");
52
53Bs3MemFree(pvTmp1, 31);
54pvTmp3 = Bs3MemAlloc(BS3MEMKIND_REAL, 17);
55Bs3PrintStr("pvTmp3=");
56Bs3PrintX32((uintptr_t)pvTmp3);
57Bs3PrintStr("\r\n");
58
59
60Bs3Panic();
61 Bs3Shutdown();
62 return;
63}
64
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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