bitkeeper revision 1.1108.14.6 (410649f9zyS54Re8bSXNwM_nPxqrOw)

Add support for setting and getting domain maxmem.
This commit is contained in:
mjw@wray-m-3.hpl.hp.com committed 2004-07-27 12:26:33 +00:00
1 parent ba2e13cf57
commit deb5f9442a
7 files changed
+54 -16

No files matched your search

+6 -5
View File
@@ -906,15 +906,15 @@ static PyObject *pyxc_domain_setmaxmem(PyObject *self,
XcObject *xc = (XcObject *)self;
u32 dom;
unsigned long max_memkb;
unsigned long maxmem_kb;
static char *kwd_list[] = { "dom", "max_memkb", NULL };
static char *kwd_list[] = { "dom", "maxmem_kb", NULL };
if ( !PyArg_ParseTupleAndKeywords(args, kwds, "ii", kwd_list,
&dom, &max_memkb) )
&dom, &maxmem_kb) )
return NULL;
if ( xc_domain_setmaxmem(xc->xc_handle, dom, max_memkb) != 0 )
if ( xc_domain_setmaxmem(xc->xc_handle, dom, maxmem_kb) != 0 )
return PyErr_SetFromErrno(xc_error);
Py_INCREF(zero);
@@ -980,6 +980,7 @@ static PyMethodDef pyxc_methods[] = {
" blocked [int]: Bool - is the domain blocked waiting for an event?\n"
" running [int]: Bool - is the domain currently running?\n"
" mem_kb [int]: Memory reservation, in kilobytes\n"
" maxmem_kb [int]: Maximum memory limit, in kilobytes\n"
" cpu_time [long]: CPU time consumed, in nanoseconds\n"
" name [str]: Identifying name\n"
" shutdown_reason [int]: Numeric code from guest OS, explaining "
@@ -1228,7 +1229,7 @@ static PyMethodDef pyxc_methods[] = {
METH_VARARGS | METH_KEYWORDS, "\n"
"Set a domain's memory limit\n"
" dom [int]: Identifier of domain.\n"
" max_memkb [long]: .\n"
" maxmem_kb [long]: .\n"
"Returns: [int] 0 on success; -1 on error.\n" },
{ NULL, NULL, 0, NULL }
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.