test whole program
This commit is contained in:
@@ -180,6 +180,23 @@ size_t sizeUsed;
|
||||
|
||||
// }
|
||||
|
||||
static int
|
||||
pagesizes(size_t ps[MAXPAGESIZES])
|
||||
{
|
||||
int pscnt;
|
||||
|
||||
pscnt = getpagesizes(ps, MAXPAGESIZES);
|
||||
// ATF_REQUIRE_MSG(pscnt != -1, "getpagesizes failed; errno=%d", errno);
|
||||
// ATF_REQUIRE_MSG(ps[0] != 0, "psind 0 is %zu", ps[0]);
|
||||
// ATF_REQUIRE_MSG(pscnt <= MAXPAGESIZES, "invalid pscnt %d", pscnt);
|
||||
// if (pscnt == 1){
|
||||
// printf("pscnt is 1");
|
||||
// }
|
||||
|
||||
// atf_tc_skip("no large page support");
|
||||
return (pscnt);
|
||||
}
|
||||
|
||||
|
||||
INITREGULARALLOC(void) {
|
||||
size_t sz;
|
||||
@@ -236,7 +253,7 @@ INITREGULARALLOC(void) {
|
||||
|
||||
MallocCounter = (int)sz;
|
||||
}
|
||||
|
||||
|
||||
int notrun = 0;
|
||||
// Quick malloc implementation with mmap
|
||||
void* malloc(size_t sz)
|
||||
@@ -275,23 +292,6 @@ void free(void *ptr) {
|
||||
|
||||
munmap(ptr, len);
|
||||
}
|
||||
|
||||
static int
|
||||
pagesizes(size_t ps[MAXPAGESIZES])
|
||||
{
|
||||
int pscnt;
|
||||
|
||||
pscnt = getpagesizes(ps, MAXPAGESIZES);
|
||||
// ATF_REQUIRE_MSG(pscnt != -1, "getpagesizes failed; errno=%d", errno);
|
||||
// ATF_REQUIRE_MSG(ps[0] != 0, "psind 0 is %zu", ps[0]);
|
||||
// ATF_REQUIRE_MSG(pscnt <= MAXPAGESIZES, "invalid pscnt %d", pscnt);
|
||||
// if (pscnt == 1){
|
||||
// printf("pscnt is 1");
|
||||
// }
|
||||
|
||||
// atf_tc_skip("no large page support");
|
||||
return (pscnt);
|
||||
}
|
||||
// Standard Alloc
|
||||
// void* MALLOCREGULAR(size_t sz) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user