Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Mar 2001 11:39:53 +0200
From:      Oscar-Ivan Lepe-Aldama <oscar@ac.upc.es>
To:        questions@freebsd.org
Subject:   How to define a large data heap inside the kernel?
Message-ID:  <3AC302E9.EE4742B5@ac.upc.es>

next in thread | raw e-mail | index | archive | help
Hi!
I'm gathering some performance data of some 4.1.1 kernel routines by
means of rtsc() calls. For storing the performance data, I have defined
an array of u_int64_t. For reading its content, I have exported this
array to user space as a sysctl(8) OPAQUE object. The machine I'm using
has 128MB. However, when the defined array has more than 2.8MB (more or
less) the kernel panics. The array is define statically in some .c file
as

u_int64_t myarray[MYARRAYSIZE];
SYSCTL_NODE(, CTL_MYCTL, myoid, CTLFLAG_RW, 0,"");
SYSCTL_OPAQUE(_myoid, OID_AUTO, myarray, CTLFLAG_RD, &myarray,
sizeof(myarray), "", "");

Is there a way to circunvent this problem?
What system parameter is limiting the size of this array?

Thanks,

-- 
========================================================================
 0 0 0  Oscar-Ivan Lepe-Aldama     |     UPC-Campus Nord, DAC
 0 0 0  e-mail: oscar@ac.upc.es    |     Modul D6, despatx 116
 0 0 0  phone:  +34 93 401 7187    |     Jordi Girona, 1-3
 U P C  fax:    +34 93 401 7055    |     08034 Barcelona - SPAIN
        WWW:    http://www.ac.upc.es/homes/oscar/
========================================================================

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3AC302E9.EE4742B5>