Lines Matching refs:mmdc
169 Mmvmdisc_t *mmdc = (Mmvmdisc_t*)disc;
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;
188 if(lseek(mmdc->fd, (off_t)(csize-1), 0) != (off_t)(csize-1) ||
189 write(mmdc->fd, "", 1) != 1 )
193 (void)munmap(caddr, mmdc->mm->size);
195 MAP_FIXED|MAP_SHARED, mmdc->fd, (off_t)0 );
199 mmdc->mm->size = csize;
201 { close(mmdc->fd);
202 mmdc->fd = -1;
203 mmdc->mm = NIL(Mmvm_t*);
208 mmdc->mm->busy = nsize+MM_START;
209 return (Void_t*)(((Vmuchar_t*)mmdc->mm->base) + MM_START);
223 Mmvmdisc_t *mmdc = (Mmvmdisc_t*)disc;
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);
236 (void)close(mmdc->fd);
237 vmfree(Vmheap, mmdc);
254 Mmvmdisc_t *mmdc;
270 if(!(mmdc = (Mmvmdisc_t*)vmalloc(Vmheap, sizeof(Mmvmdisc_t))) )
275 mmdc->disc.memoryf = mmvmmemory;
276 mmdc->disc.exceptf = mmvmexcept;
277 mmdc->disc.round = mm.round;
278 mmdc->fd = fd;
279 mmdc->mm = (Mmvm_t*)mm.base;
281 if(!(vm = vmopen(&mmdc->disc, Vmbest, VM_TRUST)) )
282 { mmvmexcept(NIL(Vmalloc_t*), VM_CLOSE, NIL(Void_t*), &mmdc->disc);