Lines Matching refs:size

53 static char* create_standard_memory(size_t size) {
56 char* mapAddress = os::reserve_memory(size);
63 if (!os::commit_memory(mapAddress, size, !ExecMem)) {
67 os::release_memory(mapAddress, size);
76 static void delete_standard_memory(char* addr, size_t size) {
91 static void save_memory_to_file(char* addr, size_t size) {
108 for (size_t remaining = size; remaining > 0;) {
243 // determine the max pwbuf size from sysconf, and hardcode
603 // This method creates the shared memory file with the given size
607 static int create_sharedmem_resources(const char* dirname, const char* filename, size_t size) {
629 // set the file size
630 RESTARTABLE(::ftruncate(fd, (off_t)size), result);
633 warning("could not set shared memory file size: %s\n", strerror(errno));
643 for (size_t seekpos = 0; seekpos < size; seekpos += os::vm_page_size()) {
703 static char* mmap_create_shared(size_t size) {
722 assert(((size > 0) && (size % os::vm_page_size() == 0)),
723 "unexpected PerfMemory region size");
725 fd = create_sharedmem_resources(dirname, filename, size);
735 mapAddress = (char*)::mmap((char*)0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
755 (void)::memset((void*) mapAddress, 0, size);
758 MemTracker::record_virtual_memory_reserve((address)mapAddress, size, mtInternal, CURRENT_PC);
771 static char* create_shared_memory(size_t size) {
774 return mmap_create_shared(size);
779 static void delete_shared_memory(char* addr, size_t size) {
797 // return the size of the file for the given file descriptor
798 // or 0 if it is not a valid size for a shared memory file
811 "Could not determine PerfMemory size");
817 "Invalid PerfMemory size");
830 size_t size;
900 size = sharedmem_filesize(fd, CHECK);
901 assert(size != 0, "unexpected size");
904 mapAddress = (char*)::mmap((char*)0, size, mmap_prot, MAP_SHARED, fd, 0);
920 MemTracker::record_virtual_memory_reserve((address)mapAddress, size, mtInternal, CURRENT_PC);
923 *sizep = size;
927 INTPTR_FORMAT "\n", size, vmid, (void*)mapAddress);
940 void PerfMemory::create_memory_region(size_t size) {
944 _start = create_standard_memory(size);
947 _start = create_shared_memory(size);
957 _start = create_standard_memory(size);
961 if (_start != NULL) _capacity = size;
968 // data for the JVM. The memory region indicated by the <address, size>
993 // This method returns an <address, size> tuple that points to
1020 // JVM, specified as an <address, size> tuple of a buffer
1023 // region specified by <address, size> will be inaccessible after