Lines Matching refs:size
33 // page_boundary - Given a file size, return the size to read integral pages.
40 const size_t threshold = (PageSize*3)/4; // 3/4 page size in Linux
71 size_t start, size = 0, total_offset;
74 // adjust total_offset, start and size
77 if (total_offset > pHandler.size()) {
79 size = pSize;
82 else if (pHandler.size() > start)
83 size = pHandler.size() - start;
87 << pHandler.size()
88 << start << size;
92 size = pSize;
95 memory = (void*)malloc(size);
96 if (!pHandler.read(memory, start, size))
97 error(diag::err_cannot_read_file) << pHandler.path() << start << size;
102 // adjust total_offset, start and size
105 if (total_offset > pHandler.size()) {
107 size = page_boundary((pStart - start) + pSize);
110 else if (pHandler.size() > start)
111 size = pHandler.size() - start;
115 << pHandler.size()
116 << start << size;
120 size = page_boundary((pStart - start) + pSize);
123 if (!pHandler.mmap(memory, start, size))
124 error(diag::err_cannot_mmap_file) << pHandler.path() << start << size;
132 result = new Space(type, memory, size);
147 if (!pHandler.munmap(pSpace->memory(), pSpace->size()))
164 pSpace->size())) {
167 << pSpace->size();