{
MultiFDPages_t *pages = g_new0(MultiFDPages_t, 1);
- pages->allocated = n;
pages->offset = g_new0(ram_addr_t, n);
return pages;
static void multifd_pages_clear(MultiFDPages_t *pages)
{
multifd_pages_reset(pages);
- pages->allocated = 0;
g_free(pages->offset);
pages->offset = NULL;
g_free(pages);
int i;
packet->flags = cpu_to_be32(p->flags);
- packet->pages_alloc = cpu_to_be32(pages->allocated);
+ packet->pages_alloc = cpu_to_be32(multifd_ram_page_count());
packet->normal_pages = cpu_to_be32(pages->normal_num);
packet->zero_pages = cpu_to_be32(zero_num);
packet->next_packet_size = cpu_to_be32(p->next_packet_size);
static inline bool multifd_queue_full(MultiFDPages_t *pages)
{
- return pages->num == pages->allocated;
+ return pages->num == multifd_ram_page_count();
}
static inline void multifd_enqueue(MultiFDPages_t *pages, ram_addr_t offset)