From owner-freebsd-hackers Sun Apr 16 2:31:10 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from happy.checkpoint.com (happy.checkpoint.com [199.203.156.41]) by hub.freebsd.org (Postfix) with ESMTP id 74CDF37B850 for ; Sun, 16 Apr 2000 02:31:00 -0700 (PDT) (envelope-from mellon@pobox.com) Received: (from mellon@localhost) by happy.checkpoint.com (8.9.3/8.9.3) id MAA24903 for hackers@freebsd.org; Sun, 16 Apr 2000 12:30:38 GMT (envelope-from mellon@pobox.com) Date: Sun, 16 Apr 2000 12:30:38 +0000 From: Anatoly Vorobey To: hackers@freebsd.org Subject: memory in the kernel Message-ID: <20000416123037.A24869@happy.checkpoint.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I have to malloc a lot of memory in the kernel, hence a few questions: 1. The data must be absolutely present at all times, no page faults or locking mechanisms, etc. Does that mean I should use kmem_alloc_wired() or am I misunderstanding its purpose? Does it make sense to alloc less than a pageful or is the rest simply going to be wasted? 2. Unfortunately, I need to realloc a lot as data is dynamic and I don't know sizes beforehand. How do I do that? Do I malloc a new region, copy manually and release the old one? Thanks a lot in advance, Anatoly. -- Anatoly Vorobey, mellon@pobox.com http://pobox.com/~mellon/ "Angels can fly because they take themselves lightly" - G.K.Chesterton To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message