Lines Matching full:windows

51  * init_window_mem() - Divide the reserved memory region among the windows
63 * windows. The windows are placed one after the other in ascending in init_window_mem()
65 * shouldn't have allocated more windows than we have memory, but if we in init_window_mem()
68 for (i = 0; i < context->windows.num; i++) { in init_window_mem()
69 uint32_t size = context->windows.window[i].size; in init_window_mem()
72 context->windows.window[i].mem = mem_location; in init_window_mem()
76 MSG_ERR("Total size of windows exceeds reserved mem\n"); in init_window_mem()
77 MSG_ERR("Try smaller or fewer windows\n"); in init_window_mem()
96 if (!context->windows.default_size) { in init_windows()
97 /* Default to 1MB windows */ in init_windows()
98 context->windows.default_size = 1 << 20; in init_windows()
100 MSG_INFO("Window size: 0x%.8x\n", context->windows.default_size); in init_windows()
101 if (!context->windows.num) { in init_windows()
103 context->windows.num = context->mem_size / in init_windows()
104 context->windows.default_size; in init_windows()
106 MSG_INFO("Number of windows: %d\n", context->windows.num); in init_windows()
108 context->windows.window = calloc(context->windows.num, in init_windows()
109 sizeof(*context->windows.window)); in init_windows()
110 if (!context->windows.window) { in init_windows()
115 for (i = 0; i < context->windows.num; i++) { in init_windows()
116 init_window_state(&context->windows.window[i], in init_windows()
117 context->windows.default_size); in init_windows()
132 if (context->windows.window) { in free_windows()
133 for (i = 0; i < context->windows.num; i++) { in free_windows()
134 free(context->windows.window[i].dirty_bmap); in free_windows()
136 free(context->windows.window); in free_windows()
342 for (i = 0; i < context->windows.num; i++) { in alloc_window_dirty_bytemap()
343 cur = &context->windows.window[i]; in alloc_window_dirty_bytemap()
416 window->size = context->windows.default_size; in reset_window()
426 * reset_all_windows() - Reset all windows to a well defined default state
434 MSG_DBG("Resetting all windows\n"); in reset_all_windows()
439 for (i = 0; i < context->windows.num; i++) { in reset_all_windows()
440 reset_window(context, &context->windows.window[i]); in reset_all_windows()
443 context->windows.max_age = 0; in reset_all_windows()
455 uint32_t min_age = context->windows.max_age + 1; in find_oldest_window()
458 for (i = 0; i < context->windows.num; i++) { in find_oldest_window()
459 cur = &context->windows.window[i]; in find_oldest_window()
482 for (i = 0; i < context->windows.num; i++) { in find_largest_window()
483 cur = &context->windows.window[i]; in find_largest_window()
500 * This will search the cache of windows for one containing the requested
501 * offset. For V1 of the protocol windows must exactly map the offset since we
516 for (i = 0; i < context->windows.num; i++) { in search_windows()
517 cur = &context->windows.window[i]; in search_windows()
531 cur->age = ++(context->windows.max_age); in search_windows()
639 * Since for V1 windows aren't constrained to start at multiples of in create_map_window()
641 * Reset any windows which map this offset to avoid coherency problems. in create_map_window()
643 * of the window since all windows are the same size so another window in create_map_window()
669 cur->age = ++(context->windows.max_age); in create_map_window()