Lines Matching defs:new_block

3117     RAMBlock *new_block, *block;
3120 new_block = qemu_mallocz(sizeof(*new_block));
3125 snprintf(new_block->idstr, sizeof(new_block->idstr), "%s/", id);
3129 pstrcat(new_block->idstr, sizeof(new_block->idstr), name);
3132 if (!strcmp(block->idstr, new_block->idstr)) {
3134 new_block->idstr);
3139 new_block->host = host;
3141 new_block->offset = find_ram_offset(size);
3142 new_block->length = size;
3144 QLIST_INSERT_HEAD(&ram_list.blocks, new_block, next);
3148 memset(ram_list.phys_dirty + (new_block->offset >> TARGET_PAGE_BITS),
3152 kvm_setup_guest_memory(new_block->host, size);
3154 return new_block->offset;
3159 RAMBlock *new_block, *block;
3162 new_block = qemu_mallocz(sizeof(*new_block));
3167 snprintf(new_block->idstr, sizeof(new_block->idstr), "%s/", id);
3171 pstrcat(new_block->idstr, sizeof(new_block->idstr), name);
3174 if (!strcmp(block->idstr, new_block->idstr)) {
3176 new_block->idstr);
3183 new_block->host = file_ram_alloc(new_block, size, mem_path);
3184 if (!new_block->host) {
3185 new_block->host = qemu_vmalloc(size);
3187 madvise(new_block->host, size, MADV_MERGEABLE);
3197 new_block->host = mmap((void*)0x1000000, size,
3201 new_block->host = qemu_vmalloc(size);
3204 madvise(new_block->host, size, MADV_MERGEABLE);
3207 new_block->offset = find_ram_offset(size);
3208 new_block->length = size;
3210 QLIST_INSERT_HEAD(&ram_list.blocks, new_block, next);
3214 memset(ram_list.phys_dirty + (new_block->offset >> TARGET_PAGE_BITS),
3218 kvm_setup_guest_memory(new_block->host, size);
3220 return new_block->offset;