mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-04 05:15:46 +00:00
test: allocate numa cells separately from driver
GObject has an arbitrary limit on the object struct size of 0xffff bytes. It is expected that any large fields be separately allocated. Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
0d1840729f
commit
2bd7ed78a7
@ -102,7 +102,7 @@ struct _testDriver {
|
|||||||
virStoragePoolObjListPtr pools;
|
virStoragePoolObjListPtr pools;
|
||||||
virNodeDeviceObjListPtr devs;
|
virNodeDeviceObjListPtr devs;
|
||||||
int numCells;
|
int numCells;
|
||||||
testCell cells[MAX_CELLS];
|
testCell *cells;
|
||||||
size_t numAuths;
|
size_t numAuths;
|
||||||
testAuthPtr auths;
|
testAuthPtr auths;
|
||||||
|
|
||||||
@ -171,6 +171,7 @@ testDriverDispose(void *obj)
|
|||||||
g_free(driver->auths[i].username);
|
g_free(driver->auths[i].username);
|
||||||
g_free(driver->auths[i].password);
|
g_free(driver->auths[i].password);
|
||||||
}
|
}
|
||||||
|
g_free(driver->cells);
|
||||||
g_free(driver->auths);
|
g_free(driver->auths);
|
||||||
|
|
||||||
testDriverDisposed = true;
|
testDriverDisposed = true;
|
||||||
@ -1353,6 +1354,7 @@ testOpenDefault(virConnectPtr conn)
|
|||||||
|
|
||||||
/* Numa setup */
|
/* Numa setup */
|
||||||
privconn->numCells = 2;
|
privconn->numCells = 2;
|
||||||
|
privconn->cells = g_new0(testCell, privconn->numCells);
|
||||||
for (i = 0; i < privconn->numCells; i++) {
|
for (i = 0; i < privconn->numCells; i++) {
|
||||||
privconn->cells[i].numCpus = 8;
|
privconn->cells[i].numCpus = 8;
|
||||||
privconn->cells[i].mem = (i + 1) * 2048 * 1024;
|
privconn->cells[i].mem = (i + 1) * 2048 * 1024;
|
||||||
|
Loading…
Reference in New Issue
Block a user