Lines Matching refs:size
34 // page_boundary - Given a file size, return the size to read integral pages.
41 const size_t threshold = (PageSize*3)/4; // 3/4 page size in Linux
78 size_t start = 0, size = 0, total_offset;
81 // adjust total_offset, start and size
84 if (total_offset > pHandler.size()) {
86 size = pSize;
89 else if (pHandler.size() > start)
90 size = pHandler.size() - start;
94 << pHandler.size()
95 << start << size;
99 size = pSize;
102 memory = (void*)malloc(size);
103 if (!pHandler.read(memory, start, size))
104 error(diag::err_cannot_read_file) << pHandler.path() << start << size;
109 // adjust total_offset, start and size
112 if (total_offset > pHandler.size()) {
114 size = page_boundary((pStart - start) + pSize);
117 else if (pHandler.size() > start)
118 size = pHandler.size() - start;
122 << pHandler.size()
123 << start << size;
127 size = page_boundary((pStart - start) + pSize);
130 if (!pHandler.mmap(memory, start, size))
131 error(diag::err_cannot_mmap_file) << pHandler.path() << start << size;
139 result = new Space(type, memory, size);
160 if (!pHandler.munmap(pSpace->memory(), pSpace->size()))
177 pSpace->size())) {
180 << pSpace->size();