/***********************************************************************1* *2* This software is part of the ast package *3* Copyright (c) 1999-2011 AT&T Intellectual Property *4* and is licensed under the *5* Eclipse Public License, Version 1.0 *6* by AT&T Intellectual Property *7* *8* A copy of the License is available at *9* http://www.eclipse.org/org/documents/epl-v10.html *10* (with md5 checksum b35adb5213ca9657e911e9befb180842) *11* *12* Information and Software Systems Research *13* AT&T Research *14* Florham Park NJ *15* *16* Glenn Fowler <[email protected]> *17* *18***********************************************************************/19#include "vmtest.h"2021tmain()22{23Void_t *addr[10];24Vmalloc_t *vm, *tv;25int i;2627Vmdcheap->round = 127;28if(!(vm = vmopen(Vmdcheap,Vmbest,0)) )29terror("Can't open a region");3031for(i = 0; i < 10; i += 2)32{ addr[i] = vmalloc(vm,88);33if((((Vmulong_t)addr[i])%ALIGN) != 0)34terror("Unaligned addr");3536addr[i+1] = vmalloc(Vmheap,128);37if((((Vmulong_t)addr[i+1])%ALIGN) != 0)38terror("Unaligned addr");39}4041for(i = 0; i < 10; i += 2)42{ if((tv = vmregion(addr[i])) != vm)43terror("Wrong region");44if((tv = vmregion(addr[i+1])) != Vmheap)45terror("Wrong region");46}4748vmclose(vm);4950texit(0);51}525354