diff options
| author | Richard Brooksby | 2013-05-03 17:20:35 +0100 |
|---|---|---|
| committer | Richard Brooksby | 2013-05-03 17:20:35 +0100 |
| commit | c0a8608bf7010734c5b60847ae2dcc68275fe77c (patch) | |
| tree | 22bcf3e7f1c86d41addc3fa45baf9a90883024ce /mps/code | |
| parent | ac2e186e65fc5014ed971b382dfd32aa99ab6e9b (diff) | |
| download | emacs-c0a8608bf7010734c5b60847ae2dcc68275fe77c.tar.gz emacs-c0a8608bf7010734c5b60847ae2dcc68275fe77c.zip | |
Basically working keyword arguments, though vmparam is unsatisfactory.
Copied from Perforce
Change: 181545
ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code')
| -rw-r--r-- | mps/code/arena.c | 3 | ||||
| -rw-r--r-- | mps/code/arenacl.c | 3 | ||||
| -rw-r--r-- | mps/code/arenacv.c | 38 | ||||
| -rw-r--r-- | mps/code/arenavm.c | 20 | ||||
| -rw-r--r-- | mps/code/arg.c | 18 | ||||
| -rw-r--r-- | mps/code/config.h | 2 | ||||
| -rw-r--r-- | mps/code/mpm.h | 4 | ||||
| -rw-r--r-- | mps/code/mpmst.h | 10 | ||||
| -rw-r--r-- | mps/code/poolmfs.c | 2 | ||||
| -rw-r--r-- | mps/code/poolncv.c | 13 | ||||
| -rw-r--r-- | mps/code/vmix.c | 14 |
11 files changed, 83 insertions, 44 deletions
diff --git a/mps/code/arena.c b/mps/code/arena.c index 904ed0701ac..e36aa03cea4 100644 --- a/mps/code/arena.c +++ b/mps/code/arena.c | |||
| @@ -207,6 +207,9 @@ failGlobalsInit: | |||
| 207 | 207 | ||
| 208 | /* ArenaCreate -- create the arena and call initializers */ | 208 | /* ArenaCreate -- create the arena and call initializers */ |
| 209 | 209 | ||
| 210 | /* FIXME: SizeCheck? On x64 it can't be more than 43 bits etc. etc. */ | ||
| 211 | const KeyStruct _mps_key_arena_size = {KeySig, "ARENA_SIZE", ArgCheckCant}; | ||
| 212 | |||
| 210 | Res ArenaCreate(Arena *arenaReturn, ArenaClass class, ArgList args) | 213 | Res ArenaCreate(Arena *arenaReturn, ArenaClass class, ArgList args) |
| 211 | { | 214 | { |
| 212 | Arena arena; | 215 | Arena arena; |
diff --git a/mps/code/arenacl.c b/mps/code/arenacl.c index bfe640bfc05..4a0824a7abe 100644 --- a/mps/code/arenacl.c +++ b/mps/code/arenacl.c | |||
| @@ -186,6 +186,9 @@ static void ClientChunkFinish(Chunk chunk) | |||
| 186 | * .arena.init: Once the arena has been allocated, we call ArenaInit | 186 | * .arena.init: Once the arena has been allocated, we call ArenaInit |
| 187 | * to do the generic part of init. | 187 | * to do the generic part of init. |
| 188 | */ | 188 | */ |
| 189 | |||
| 190 | const KeyStruct _mps_key_arena_cl_addr = {KeySig, "ARENA_CL_ADDR", ArgCheckCant}; | ||
| 191 | |||
| 189 | static Res ClientArenaInit(Arena *arenaReturn, ArenaClass class, ArgList args) | 192 | static Res ClientArenaInit(Arena *arenaReturn, ArenaClass class, ArgList args) |
| 190 | { | 193 | { |
| 191 | Arena arena; | 194 | Arena arena; |
diff --git a/mps/code/arenacv.c b/mps/code/arenacv.c index 7228ea80ee7..60f482b2a93 100644 --- a/mps/code/arenacv.c +++ b/mps/code/arenacv.c | |||
| @@ -332,16 +332,19 @@ static void testAllocAndIterate(Arena arena, Pool pool, | |||
| 332 | } | 332 | } |
| 333 | 333 | ||
| 334 | 334 | ||
| 335 | static void testPageTable(ArenaClass class, ...) | 335 | static void testPageTable(ArenaClass class, Size size, Addr addr) |
| 336 | { | 336 | { |
| 337 | Arena arena; Pool pool; | 337 | Arena arena; Pool pool; |
| 338 | Size pageSize; | 338 | Size pageSize; |
| 339 | Count tractsPerPage; | 339 | Count tractsPerPage; |
| 340 | va_list args; | 340 | ArgStruct args[3]; |
| 341 | 341 | ||
| 342 | va_start(args, class); | 342 | args[0].key = MPS_KEY_ARENA_SIZE; |
| 343 | args[0].val.size = size; | ||
| 344 | args[1].key = MPS_KEY_ARENA_CL_ADDR; | ||
| 345 | args[1].val.addr = addr; | ||
| 346 | args[2].key = MPS_KEY_ARGS_END; | ||
| 343 | die(ArenaCreate(&arena, class, args), "ArenaCreate"); | 347 | die(ArenaCreate(&arena, class, args), "ArenaCreate"); |
| 344 | va_end(args); | ||
| 345 | 348 | ||
| 346 | die(PoolCreate(&pool, arena, PoolClassMV(), | 349 | die(PoolCreate(&pool, arena, PoolClassMV(), |
| 347 | (Size)65536, (Size)32, (Size)65536), | 350 | (Size)65536, (Size)32, (Size)65536), |
| @@ -364,18 +367,6 @@ static void testPageTable(ArenaClass class, ...) | |||
| 364 | } | 367 | } |
| 365 | 368 | ||
| 366 | 369 | ||
| 367 | static Res makeArena(Arena *arenaOut, ArenaClass class, ...) | ||
| 368 | { | ||
| 369 | va_list args; | ||
| 370 | Res res; | ||
| 371 | |||
| 372 | va_start(args, class); | ||
| 373 | res = ArenaCreateV(arenaOut, class, args); | ||
| 374 | va_end(args); | ||
| 375 | return res; | ||
| 376 | } | ||
| 377 | |||
| 378 | |||
| 379 | /* testSize -- test arena size overflow | 370 | /* testSize -- test arena size overflow |
| 380 | * | 371 | * |
| 381 | * Just try allocating larger arenas, doubling the size each time, until | 372 | * Just try allocating larger arenas, doubling the size each time, until |
| @@ -389,7 +380,11 @@ static void testSize(Size size) | |||
| 389 | Res res; | 380 | Res res; |
| 390 | 381 | ||
| 391 | do { | 382 | do { |
| 392 | res = makeArena(&arena, class, size); | 383 | ArgStruct args[2]; |
| 384 | args[0].key = MPS_KEY_ARENA_SIZE; | ||
| 385 | args[0].val.size = size; | ||
| 386 | args[1].key = MPS_KEY_ARGS_END; | ||
| 387 | res = ArenaCreate(&arena, class, args); | ||
| 393 | if (res == ResOK) | 388 | if (res == ResOK) |
| 394 | ArenaDestroy(arena); | 389 | ArenaDestroy(arena); |
| 395 | else | 390 | else |
| @@ -407,13 +402,12 @@ int main(int argc, char *argv[]) | |||
| 407 | void *block; | 402 | void *block; |
| 408 | testlib_unused(argc); | 403 | testlib_unused(argc); |
| 409 | 404 | ||
| 410 | testPageTable((ArenaClass)mps_arena_class_vm(), TEST_ARENA_SIZE); | 405 | testPageTable((ArenaClass)mps_arena_class_vm(), TEST_ARENA_SIZE, 0); |
| 411 | testPageTable((ArenaClass)mps_arena_class_vmnz(), TEST_ARENA_SIZE); | 406 | testPageTable((ArenaClass)mps_arena_class_vmnz(), TEST_ARENA_SIZE, 0); |
| 412 | 407 | ||
| 413 | block = malloc(TEST_ARENA_SIZE); | 408 | block = malloc(TEST_ARENA_SIZE); |
| 414 | cdie(block != NULL, "malloc"); | 409 | cdie(block != NULL, "malloc"); |
| 415 | testPageTable((ArenaClass)mps_arena_class_cl(), TEST_ARENA_SIZE, | 410 | testPageTable((ArenaClass)mps_arena_class_cl(), TEST_ARENA_SIZE, block); |
| 416 | (Addr)block); | ||
| 417 | 411 | ||
| 418 | testSize(TEST_ARENA_SIZE); | 412 | testSize(TEST_ARENA_SIZE); |
| 419 | 413 | ||
diff --git a/mps/code/arenavm.c b/mps/code/arenavm.c index b0c2d732dc1..614876cfe4e 100644 --- a/mps/code/arenavm.c +++ b/mps/code/arenavm.c | |||
| @@ -73,6 +73,7 @@ typedef struct VMArenaStruct *VMArena; | |||
| 73 | typedef struct VMArenaStruct { /* VM arena structure */ | 73 | typedef struct VMArenaStruct { /* VM arena structure */ |
| 74 | ArenaStruct arenaStruct; | 74 | ArenaStruct arenaStruct; |
| 75 | VM vm; /* VM where the arena itself is stored */ | 75 | VM vm; /* VM where the arena itself is stored */ |
| 76 | char vmParams[VMParamSize]; /* VM parameter block */ | ||
| 76 | Size spareSize; /* total size of spare pages */ | 77 | Size spareSize; /* total size of spare pages */ |
| 77 | ZoneSet blacklist; /* zones to use last */ | 78 | ZoneSet blacklist; /* zones to use last */ |
| 78 | ZoneSet genZoneSet[VMArenaGenCount]; /* .gencount.const */ | 79 | ZoneSet genZoneSet[VMArenaGenCount]; /* .gencount.const */ |
| @@ -190,6 +191,9 @@ static Bool VMArenaCheck(VMArena vmArena) | |||
| 190 | /* count of committed, but we don't have all day. */ | 191 | /* count of committed, but we don't have all day. */ |
| 191 | CHECKL(VMMapped(primary->vm) <= arena->committed); | 192 | CHECKL(VMMapped(primary->vm) <= arena->committed); |
| 192 | } | 193 | } |
| 194 | |||
| 195 | /* FIXME: Can't check VMParams */ | ||
| 196 | |||
| 193 | return TRUE; | 197 | return TRUE; |
| 194 | } | 198 | } |
| 195 | 199 | ||
| @@ -311,7 +315,7 @@ static Res VMChunkCreate(Chunk *chunkReturn, VMArena vmArena, Size size) | |||
| 311 | AVERT(VMArena, vmArena); | 315 | AVERT(VMArena, vmArena); |
| 312 | AVER(size > 0); | 316 | AVER(size > 0); |
| 313 | 317 | ||
| 314 | res = VMCreate(&vm, size); | 318 | res = VMCreate(&vm, size, vmArena->vmParams); |
| 315 | if (res != ResOK) | 319 | if (res != ResOK) |
| 316 | goto failVMCreate; | 320 | goto failVMCreate; |
| 317 | 321 | ||
| @@ -457,6 +461,7 @@ static Res VMArenaInit(Arena *arenaReturn, ArenaClass class, ArgList args) | |||
| 457 | VM arenaVM; | 461 | VM arenaVM; |
| 458 | Chunk chunk; | 462 | Chunk chunk; |
| 459 | mps_arg_s arg; | 463 | mps_arg_s arg; |
| 464 | char vmParams[VMParamSize]; | ||
| 460 | 465 | ||
| 461 | AVER(arenaReturn != NULL); | 466 | AVER(arenaReturn != NULL); |
| 462 | AVER(class == VMArenaClassGet() || class == VMNZArenaClassGet()); | 467 | AVER(class == VMArenaClassGet() || class == VMNZArenaClassGet()); |
| @@ -472,10 +477,17 @@ static Res VMArenaInit(Arena *arenaReturn, ArenaClass class, ArgList args) | |||
| 472 | } | 477 | } |
| 473 | 478 | ||
| 474 | AVER(userSize > 0); | 479 | AVER(userSize > 0); |
| 480 | |||
| 481 | /* Parse the arguments into VM parameters, if any. We must do this into | ||
| 482 | some stack-allocated memory for the moment, since we don't have anywhere | ||
| 483 | else to put it. It gets copied later. */ | ||
| 484 | res = VMParamFromArgs(vmParams, sizeof(vmParams), args); | ||
| 485 | if (res != ResOK) | ||
| 486 | goto failVMCreate; | ||
| 475 | 487 | ||
| 476 | /* Create a VM to hold the arena and map it. */ | 488 | /* Create a VM to hold the arena and map it. */ |
| 477 | vmArenaSize = SizeAlignUp(sizeof(VMArenaStruct), MPS_PF_ALIGN); | 489 | vmArenaSize = SizeAlignUp(sizeof(VMArenaStruct), MPS_PF_ALIGN); |
| 478 | res = VMCreate(&arenaVM, vmArenaSize, args); | 490 | res = VMCreate(&arenaVM, vmArenaSize, vmParams); |
| 479 | if (res != ResOK) | 491 | if (res != ResOK) |
| 480 | goto failVMCreate; | 492 | goto failVMCreate; |
| 481 | res = VMMap(arenaVM, VMBase(arenaVM), VMLimit(arenaVM)); | 493 | res = VMMap(arenaVM, VMBase(arenaVM), VMLimit(arenaVM)); |
| @@ -493,6 +505,10 @@ static Res VMArenaInit(Arena *arenaReturn, ArenaClass class, ArgList args) | |||
| 493 | vmArena->vm = arenaVM; | 505 | vmArena->vm = arenaVM; |
| 494 | vmArena->spareSize = 0; | 506 | vmArena->spareSize = 0; |
| 495 | 507 | ||
| 508 | /* Copy the stack-allocated VM parmeters into their home in the VMArena. */ | ||
| 509 | AVER(sizeof(vmArena->vmParams) == sizeof(vmParams)); | ||
| 510 | memcpy(vmArena->vmParams, vmParams, sizeof(vmArena->vmParams)); | ||
| 511 | |||
| 496 | /* .blacklist: We blacklist the zones that could be referenced by small | 512 | /* .blacklist: We blacklist the zones that could be referenced by small |
| 497 | integers misinterpreted as references. This isn't a perfect simulation, | 513 | integers misinterpreted as references. This isn't a perfect simulation, |
| 498 | but it should catch the common cases. */ | 514 | but it should catch the common cases. */ |
diff --git a/mps/code/arg.c b/mps/code/arg.c index 425bbf6c496..3528dcce136 100644 --- a/mps/code/arg.c +++ b/mps/code/arg.c | |||
| @@ -10,19 +10,19 @@ | |||
| 10 | 10 | ||
| 11 | SRCID(arg, "$Id$"); | 11 | SRCID(arg, "$Id$"); |
| 12 | 12 | ||
| 13 | #define KeySig ((Sig)0x519CE333) /* SIGnature KEYyy */ | ||
| 14 | typedef struct mps_key_s { | ||
| 15 | Sig sig; | ||
| 16 | const char *name; | ||
| 17 | Bool (*check)(Arg arg); | ||
| 18 | } KeyStruct; | ||
| 19 | 13 | ||
| 14 | /* ArgCheckCant -- default argument checker | ||
| 15 | * | ||
| 16 | * This is a default value for the KeyStruct check field for keywords | ||
| 17 | * that don't have any meaningful checking they can do. | ||
| 18 | */ | ||
| 20 | 19 | ||
| 21 | static Bool ArgCheckCant(Arg arg) { | 20 | Bool ArgCheckCant(Arg arg) { |
| 22 | UNUSED(arg); | 21 | UNUSED(arg); |
| 23 | return TRUE; | 22 | return TRUE; |
| 24 | } | 23 | } |
| 25 | 24 | ||
| 25 | |||
| 26 | const KeyStruct _mps_key_varargs = {KeySig, "VARARGS", ArgCheckCant}; | 26 | const KeyStruct _mps_key_varargs = {KeySig, "VARARGS", ArgCheckCant}; |
| 27 | 27 | ||
| 28 | 28 | ||
| @@ -59,11 +59,11 @@ Bool ArgListCheck(ArgList args) | |||
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | 61 | ||
| 62 | Bool ArgPick(mps_arg_s *argOut, mps_arg_s args[], Key key) { | 62 | Bool ArgPick(ArgStruct *argOut, ArgList args, Key key) { |
| 63 | Index i; | 63 | Index i; |
| 64 | 64 | ||
| 65 | AVER(argOut != NULL); | 65 | AVER(argOut != NULL); |
| 66 | AVERT(Arg, args); | 66 | AVER(ArgListCheck(args)); |
| 67 | AVERT(Key, key); | 67 | AVERT(Key, key); |
| 68 | 68 | ||
| 69 | for (i = 0; args[i].key != MPS_KEY_ARGS_END; ++i) | 69 | for (i = 0; args[i].key != MPS_KEY_ARGS_END; ++i) |
diff --git a/mps/code/config.h b/mps/code/config.h index 5eb8ee50e13..33ce96951ec 100644 --- a/mps/code/config.h +++ b/mps/code/config.h | |||
| @@ -294,6 +294,8 @@ | |||
| 294 | 294 | ||
| 295 | #define VMANPageALIGNMENT ((Align)4096) | 295 | #define VMANPageALIGNMENT ((Align)4096) |
| 296 | #define VMJunkBYTE ((unsigned char)0xA9) | 296 | #define VMJunkBYTE ((unsigned char)0xA9) |
| 297 | #define VMParamSize (sizeof(Word)) | ||
| 298 | |||
| 297 | 299 | ||
| 298 | /* Protection Configuration see <code/prot*.c> | 300 | /* Protection Configuration see <code/prot*.c> |
| 299 | 301 | ||
diff --git a/mps/code/mpm.h b/mps/code/mpm.h index 98e35b54189..db4e2415045 100644 --- a/mps/code/mpm.h +++ b/mps/code/mpm.h | |||
| @@ -136,6 +136,7 @@ extern Bool KeyCheck(Key key); | |||
| 136 | extern Bool ArgCheck(Arg arg); | 136 | extern Bool ArgCheck(Arg arg); |
| 137 | extern Bool ArgListCheck(ArgList args); | 137 | extern Bool ArgListCheck(ArgList args); |
| 138 | extern Bool ArgPick(ArgStruct *argOut, ArgList args, Key key); | 138 | extern Bool ArgPick(ArgStruct *argOut, ArgList args, Key key); |
| 139 | extern Bool ArgCheckCant(Arg arg); | ||
| 139 | 140 | ||
| 140 | 141 | ||
| 141 | /* Logs and Powers | 142 | /* Logs and Powers |
| @@ -974,7 +975,8 @@ extern Res RootsIterate(Globals arena, RootIterateFn f, void *p); | |||
| 974 | 975 | ||
| 975 | extern Align VMAlign(VM vm); | 976 | extern Align VMAlign(VM vm); |
| 976 | extern Bool VMCheck(VM vm); | 977 | extern Bool VMCheck(VM vm); |
| 977 | extern Res VMCreate(VM *VMReturn, Size size, mps_arg_s args[]); | 978 | extern Res VMParamFromArgs(void *params, size_t paramSize, ArgList args); |
| 979 | extern Res VMCreate(VM *VMReturn, Size size, void *params); | ||
| 978 | extern void VMDestroy(VM vm); | 980 | extern void VMDestroy(VM vm); |
| 979 | extern Addr VMBase(VM vm); | 981 | extern Addr VMBase(VM vm); |
| 980 | extern Addr VMLimit(VM vm); | 982 | extern Addr VMLimit(VM vm); |
diff --git a/mps/code/mpmst.h b/mps/code/mpmst.h index d67d6a54ffd..5c5ca542074 100644 --- a/mps/code/mpmst.h +++ b/mps/code/mpmst.h | |||
| @@ -698,6 +698,16 @@ typedef struct AllocPatternStruct { | |||
| 698 | } AllocPatternStruct; | 698 | } AllocPatternStruct; |
| 699 | 699 | ||
| 700 | 700 | ||
| 701 | /* KeyStruct -- keyword argument structure */ | ||
| 702 | |||
| 703 | #define KeySig ((Sig)0x519CE333) /* SIGnature KEYyy */ | ||
| 704 | typedef struct mps_key_s { | ||
| 705 | Sig sig; | ||
| 706 | const char *name; | ||
| 707 | Bool (*check)(Arg arg); | ||
| 708 | } KeyStruct; | ||
| 709 | |||
| 710 | |||
| 701 | #endif /* mpmst_h */ | 711 | #endif /* mpmst_h */ |
| 702 | 712 | ||
| 703 | 713 | ||
diff --git a/mps/code/poolmfs.c b/mps/code/poolmfs.c index ad4140a4479..b39b283fbe9 100644 --- a/mps/code/poolmfs.c +++ b/mps/code/poolmfs.c | |||
| @@ -31,8 +31,8 @@ | |||
| 31 | * is a shame. | 31 | * is a shame. |
| 32 | */ | 32 | */ |
| 33 | 33 | ||
| 34 | |||
| 35 | #include "mpscmfs.h" | 34 | #include "mpscmfs.h" |
| 35 | #include "dbgpool.h" | ||
| 36 | #include "poolmfs.h" | 36 | #include "poolmfs.h" |
| 37 | #include "mpm.h" | 37 | #include "mpm.h" |
| 38 | 38 | ||
diff --git a/mps/code/poolncv.c b/mps/code/poolncv.c index 2f4be79d562..cbbda34d78b 100644 --- a/mps/code/poolncv.c +++ b/mps/code/poolncv.c | |||
| @@ -10,17 +10,14 @@ | |||
| 10 | #include "testlib.h" | 10 | #include "testlib.h" |
| 11 | 11 | ||
| 12 | 12 | ||
| 13 | static void testit(ArenaClass class, ...) | 13 | static void testit(ArenaClass class, ArgList args) |
| 14 | { | 14 | { |
| 15 | Arena arena; | 15 | Arena arena; |
| 16 | Pool pool; | 16 | Pool pool; |
| 17 | Res res; | 17 | Res res; |
| 18 | Addr p; | 18 | Addr p; |
| 19 | va_list args; | ||
| 20 | 19 | ||
| 21 | va_start(args, class); | 20 | die(ArenaCreate(&arena, class, args), "ArenaCreate"); |
| 22 | die(ArenaCreateV(&arena, class, args), "ArenaCreate"); | ||
| 23 | va_end(args); | ||
| 24 | 21 | ||
| 25 | die(PoolCreate(&pool, arena, PoolClassN()), "PoolNCreate"); | 22 | die(PoolCreate(&pool, arena, PoolClassN()), "PoolNCreate"); |
| 26 | res = PoolAlloc(&p, pool, 1, /* withReservoirPermit */ FALSE); | 23 | res = PoolAlloc(&p, pool, 1, /* withReservoirPermit */ FALSE); |
| @@ -35,8 +32,12 @@ static void testit(ArenaClass class, ...) | |||
| 35 | 32 | ||
| 36 | int main(int argc, char *argv[]) | 33 | int main(int argc, char *argv[]) |
| 37 | { | 34 | { |
| 35 | mps_arg_s args[2]; | ||
| 38 | testlib_unused(argc); | 36 | testlib_unused(argc); |
| 39 | testit((ArenaClass)mps_arena_class_vm(), (Size)600000); | 37 | args[0].key = MPS_KEY_ARENA_SIZE; |
| 38 | args[0].val.size = (Size)600000; | ||
| 39 | args[1].key = MPS_KEY_ARGS_END; | ||
| 40 | testit((ArenaClass)mps_arena_class_vm(), args); | ||
| 40 | printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); | 41 | printf("%s: Conclusion: Failed to find any defects.\n", argv[0]); |
| 41 | return 0; | 42 | return 0; |
| 42 | } | 43 | } |
diff --git a/mps/code/vmix.c b/mps/code/vmix.c index 30a2cc672fc..2b7afb514c2 100644 --- a/mps/code/vmix.c +++ b/mps/code/vmix.c | |||
| @@ -98,9 +98,18 @@ Bool VMCheck(VM vm) | |||
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | 100 | ||
| 101 | Res VMParamFromArgs(void *params, size_t paramSize, ArgList args) | ||
| 102 | { | ||
| 103 | AVER(params != NULL); | ||
| 104 | AVERT(ArgList, args); | ||
| 105 | UNUSED(paramSize); | ||
| 106 | return ResOK; | ||
| 107 | } | ||
| 108 | |||
| 109 | |||
| 101 | /* VMCreate -- reserve some virtual address space, and create a VM structure */ | 110 | /* VMCreate -- reserve some virtual address space, and create a VM structure */ |
| 102 | 111 | ||
| 103 | Res VMCreate(VM *vmReturn, Size size, mps_arg_s args[]) | 112 | Res VMCreate(VM *vmReturn, Size size, void *params) |
| 104 | { | 113 | { |
| 105 | Align align; | 114 | Align align; |
| 106 | VM vm; | 115 | VM vm; |
| @@ -109,8 +118,7 @@ Res VMCreate(VM *vmReturn, Size size, mps_arg_s args[]) | |||
| 109 | Res res; | 118 | Res res; |
| 110 | 119 | ||
| 111 | AVER(vmReturn != NULL); | 120 | AVER(vmReturn != NULL); |
| 112 | AVERT(Arg, args); | 121 | AVER(params != NULL); |
| 113 | UNUSED(args); | ||
| 114 | 122 | ||
| 115 | /* Find out the page size from the OS */ | 123 | /* Find out the page size from the OS */ |
| 116 | pagesize = getpagesize(); | 124 | pagesize = getpagesize(); |