Compare commits

..

No commits in common. "758017a8e76b4f68550d783dae05a701ab934714" and "cb5e40852540cf76e95290e49e76ea1972759737" have entirely different histories.

3 changed files with 5 additions and 13 deletions

View File

@ -148,7 +148,7 @@ uaddr_t loadElfProg(const char *prog, struct process *proc)
// Hack: Even if already allocated mark the adresse space as managed by a ressource
// So this address space is not used by another ressource.
uaddr = elf_phdrs[i].p_vaddr;
assert(zeroMmap(as, &uaddr, elf_phdrs[i].p_memsz, PAGING_MEM_USER | PAGING_MEM_WRITE | PAGING_MEM_READ, 0) == 0);
zeroMmap(as, &uaddr, elf_phdrs[i].p_memsz, PAGING_MEM_USER | PAGING_MEM_WRITE | PAGING_MEM_READ, 0);
}
processInitHeap(proc, lastUserAddr);

View File

@ -425,8 +425,7 @@ int vsnprintf(char *str, size_t size, const char *format, va_list ap)
case 'x': {
char val[sizeof(long long int) * 2];
unsigned int valIdx = 0;
unsigned long long int d =
va_arg(ap, unsigned long long int);
long long int d = va_arg(ap, long long int);
itoa(d, val, 16);
if (str) {
while (val[valIdx]) {
@ -454,7 +453,7 @@ int vsnprintf(char *str, size_t size, const char *format, va_list ap)
case 'x': {
char val[sizeof(int) * 2];
unsigned int valIdx = 0;
unsigned long int d = va_arg(ap, unsigned long int);
long int d = va_arg(ap, long int);
itoa(d, val, 16);
if (str) {
while (val[valIdx]) {

View File

@ -216,8 +216,7 @@ int uAddrSpaceUnmap(struct uAddrSpace *as, uaddr_t uaddr, size_t size)
reg->res->ops->unmap(reg, uaddr, size);
break;
// Only affect the end
} else if (uaddr > reg->addr && uaddr < reg->addr + size &&
uaddr + size > reg->addr + reg->size) {
} else if (uaddr > reg->addr && uaddr + size > reg->addr + reg->size) {
size_t unmapSize = reg->addr + reg->size - uaddr;
reg->size = uaddr - reg->addr;
@ -307,13 +306,7 @@ int uAddrSpaceHeapCheckNAlloc(struct uAddrSpace *as, vaddr_t addr)
newReg->size = PAGE_SIZE;
newReg->right = right;
// keep the AS list sorted
struct uAddrVirtualReg *prev = findVirtualRegionBeforeAddr(as, addrAlign);
if (prev)
list_insert_after_named(as->listVirtualReg, prev, newReg, prevInAddrSpace,
nextInAddrSpace);
else
list_add_tail_named(as->listVirtualReg, newReg, nextInAddrSpace, prevInAddrSpace);
list_add_tail_named(as->listVirtualReg, newReg, nextInAddrSpace, prevInAddrSpace);
unrefPhyPage(ppage);