Lines Matching full:bytes
130 typedef Bool (*FixupFunc) (PrivatePtr *privates, int offset, unsigned bytes);
135 dixReallocPrivates(PrivatePtr *privates, int old_offset, unsigned bytes) in dixReallocPrivates() argument
139 new_privates = realloc(*privates, old_offset + bytes); in dixReallocPrivates()
142 memset((char *) new_privates + old_offset, '\0', bytes); in dixReallocPrivates()
148 dixMovePrivates(PrivatePtr *privates, int new_offset, unsigned bytes) in dixMovePrivates() argument
150 memmove((char *) *privates + bytes, *privates, new_offset - bytes); in dixMovePrivates()
151 memset(*privates, '\0', bytes); in dixMovePrivates()
156 fixupOneScreen(ScreenPtr pScreen, FixupFunc fixup, unsigned bytes) in fixupOneScreen() argument
167 if (!fixup (&pScreen->devPrivates, size, bytes)) in fixupOneScreen()
179 /* Moving means everyone shifts up in the privates by 'bytes' amount, in fixupOneScreen()
183 new += bytes; in fixupOneScreen()
216 fixupScreens(FixupFunc fixup, unsigned bytes) in fixupScreens() argument
221 if (!fixupOneScreen (screenInfo.screens[s], fixup, bytes)) in fixupScreens()
225 if (!fixupOneScreen (screenInfo.gpuscreens[s], fixup, bytes)) in fixupScreens()
231 fixupServerClient(FixupFunc fixup, unsigned bytes) in fixupServerClient() argument
235 bytes); in fixupServerClient()
240 fixupExtensions(FixupFunc fixup, unsigned bytes) in fixupExtensions() argument
248 (&extension->devPrivates, global_keys[PRIVATE_EXTENSION].offset, bytes)) in fixupExtensions()
254 fixupDefaultColormaps(FixupFunc fixup, unsigned bytes) in fixupDefaultColormaps() argument
265 …&cmap->devPrivates, screenInfo.screens[s]->screenSpecificPrivates[PRIVATE_COLORMAP].offset, bytes)) in fixupDefaultColormaps()
272 fixupDeviceList(DeviceIntPtr device, FixupFunc fixup, unsigned bytes) in fixupDeviceList() argument
275 if (!fixup(&device->devPrivates, global_keys[PRIVATE_DEVICE].offset, bytes)) in fixupDeviceList()
283 fixupDevices(FixupFunc fixup, unsigned bytes) in fixupDevices() argument
285 return (fixupDeviceList(inputInfo.devices, fixup, bytes) && in fixupDevices()
286 fixupDeviceList(inputInfo.off_devices, fixup, bytes)); in fixupDevices()
298 grow_private_set(DevPrivateSetPtr set, unsigned bytes) in grow_private_set() argument
303 k->offset += bytes; in grow_private_set()
304 set->offset += bytes; in grow_private_set()
308 grow_screen_specific_set(DevPrivateType type, unsigned bytes) in grow_screen_specific_set() argument
316 grow_private_set(&pScreen->screenSpecificPrivates[type], bytes); in grow_screen_specific_set()
321 grow_private_set(&pScreen->screenSpecificPrivates[type], bytes); in grow_screen_specific_set()
338 unsigned bytes; in dixRegisterPrivateKey() local
346 bytes = size; in dixRegisterPrivateKey()
348 bytes = sizeof(void *); in dixRegisterPrivateKey()
351 bytes = (bytes + sizeof(void *) - 1) & ~(sizeof(void *) - 1); in dixRegisterPrivateKey()
362 else if (!allocated_early[t] (dixReallocPrivates, bytes)) in dixRegisterPrivateKey()
371 grow_private_set(&global_keys[t], bytes); in dixRegisterPrivateKey()
372 grow_screen_specific_set(t, bytes); in dixRegisterPrivateKey()
374 allocated_early[t] (dixMovePrivates, bytes); in dixRegisterPrivateKey()
385 else if (!allocated_early[type] (dixReallocPrivates, bytes)) in dixRegisterPrivateKey()
388 global_keys[type].offset += bytes; in dixRegisterPrivateKey()
389 grow_screen_specific_set(type, bytes); in dixRegisterPrivateKey()
602 unsigned bytes; in dixRegisterScreenSpecificPrivateKey() local
614 bytes = size; in dixRegisterScreenSpecificPrivateKey()
616 bytes = sizeof(void *); in dixRegisterScreenSpecificPrivateKey()
619 bytes = (bytes + sizeof(void *) - 1) & ~(sizeof(void *) - 1); in dixRegisterScreenSpecificPrivateKey()
624 pScreen->screenSpecificPrivates[type].offset += bytes; in dixRegisterScreenSpecificPrivateKey()
737 int bytes = 0; in dixPrivateUsage() local
744 ("%s: %d objects of %d bytes = %d total bytes %d private allocs\n", in dixPrivateUsage()
747 bytes += global_keys[t].created * global_keys[t].offset; in dixPrivateUsage()
752 ErrorF("TOTAL: %d objects, %d bytes, %d allocs\n", objects, bytes, alloc); in dixPrivateUsage()