(int fd, long address, long previousSize, long newSize, long offset, int flags, int oldMemoryTag, int memoryTag)
| 308 | } |
| 309 | |
| 310 | private static long mremap0(int fd, long address, long previousSize, long newSize, long offset, int flags, int oldMemoryTag, int memoryTag) { |
| 311 | address = Files.mremap0(fd, address, previousSize, newSize, offset, flags); |
| 312 | if (address != -1) { |
| 313 | if (oldMemoryTag == memoryTag) { |
| 314 | Unsafe.recordMemAlloc(newSize - previousSize, memoryTag); |
| 315 | } else { |
| 316 | Unsafe.recordMemAlloc(newSize, memoryTag); |
| 317 | Unsafe.recordMemAlloc(-previousSize, oldMemoryTag); |
| 318 | } |
| 319 | } |
| 320 | return address; |
| 321 | } |
| 322 | |
| 323 | private static void munmapTaskConsumer(MunmapTask task) { |
| 324 | int result = Files.munmap0(task.address, task.size); |
no test coverage detected