Lines Matching defs:mm
81 Mmvm_t* mm; /* mmap data */
85 static int mmvminit(char* file, Void_t* addr, size_t round, Mmvm_t* mm)
87 static int mmvminit(file, addr, round, mm)
91 Mmvm_t* mm; /* to return some mapped info */
109 if(read(fd, mm, sizeof(Mmvm_t)) != sizeof(Mmvm_t))
111 if(mm->magic != MM_MAGIC || !mm->base ||
112 (off_t)mm->size != size || mm->busy > mm->size )
114 base = (Void_t*)mmap(mm->base, mm->size, PROT_READ|PROT_WRITE,
143 memcpy(mm, hdr, sizeof(Mmvm_t));
171 if(mmdc->fd < 0 || !mmdc->mm)
175 if(caddr && caddr != MMADDR(mmdc->mm->base) )
180 if(nsize > mmdc->mm->size-MM_START)
182 caddr = mmdc->mm->base;
193 (void)munmap(caddr, mmdc->mm->size);
199 mmdc->mm->size = csize;
203 mmdc->mm = NIL(Mmvm_t*);
208 mmdc->mm->busy = nsize+MM_START;
209 return (Void_t*)(((Vmuchar_t*)mmdc->mm->base) + MM_START);
227 { if(mmdc->mm->busy > MM_START)
228 { base = ((Vmuchar_t*)mmdc->mm->base) + MM_START;
235 { (void)munmap(mmdc->mm->base, mmdc->mm->size);
255 Mmvm_t mm;
267 if((fd = mmvminit(file, base, round, &mm)) < 0)
277 mmdc->disc.round = mm.round;
279 mmdc->mm = (Mmvm_t*)mm.base;
301 Mmvm_t *mmvm = ((Mmvmdisc_t*)vm->disc)->mm;