Lines Matching refs:size
36 // page_boundary - Given a file size, return the size to read integral pages.
46 const size_t threshold = (PageSize*3)/4; // 3/4 page size in Linux
83 size_t start = 0, size = 0, total_offset = 0;
86 // adjust total_offset, start and size
89 if (total_offset > pHandler.size()) {
91 size = pSize;
94 else if (pHandler.size() > start) {
95 // not writable -> shrink the size
96 size = pHandler.size() - start;
101 << pHandler.size()
102 << start << size;
107 size = pSize;
111 memory = (void*)malloc(size);
112 if (!pHandler.read(memory, start, size))
113 error(diag::err_cannot_read_file) << pHandler.path() << start << size;
118 // adjust total_offset, start and size
121 if (total_offset > pHandler.size()) {
123 size = page_boundary((pStart - start) + pSize);
126 else if (pHandler.size() > start)
127 size = pHandler.size() - start;
131 << pHandler.size()
132 << start << size;
136 size = page_boundary((pStart - start) + pSize);
139 if (!pHandler.mmap(memory, start, size))
140 error(diag::err_cannot_mmap_file) << pHandler.path() << start << size;
148 result = new Space(type, memory, size);
169 if (!pHandler.munmap(pSpace->memory(), pSpace->size()))
186 pSpace->size())) {
189 << pSpace->size();