mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
daemon: use safer memory growth macros
* daemon/libvirtd.h (qemud_server): Change types of members tracking array sizes, and add allocation trackers. * daemon/event.c (virEventLoop): Likewise. (virEventAddHandleImpl, virEventAddTimeoutImpl) (virEventCleanupTimeouts, virEventCleanupHandles): Use VIR_RESIZE_N instead of VIR_REALLOC_N. Tweak debug messages to match type changes. * daemon/libvirtd.c (qemudDispatchServer, qemudRunLoop): Likewise.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* libvirtd.h: daemon data structure definitions
|
||||
*
|
||||
* Copyright (C) 2006-2009 Red Hat, Inc.
|
||||
* Copyright (C) 2006-2010 Red Hat, Inc.
|
||||
* Copyright (C) 2006 Daniel P. Berrange
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
@@ -283,12 +283,13 @@ struct qemud_server {
|
||||
|
||||
int privileged;
|
||||
|
||||
int nworkers;
|
||||
int nactiveworkers;
|
||||
size_t nworkers;
|
||||
size_t nactiveworkers;
|
||||
struct qemud_worker *workers;
|
||||
int nsockets;
|
||||
size_t nsockets;
|
||||
struct qemud_socket *sockets;
|
||||
int nclients;
|
||||
size_t nclients;
|
||||
size_t nclients_max;
|
||||
struct qemud_client **clients;
|
||||
|
||||
int sigread;
|
||||
|
||||
Reference in New Issue
Block a user