From owner-freebsd-hackers Thu Nov 15 13:22: 7 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.sitaranetworks.com (apollo.sitaranetworks.com [199.103.141.105]) by hub.freebsd.org (Postfix) with ESMTP id 6DF1337B418 for ; Thu, 15 Nov 2001 13:22:04 -0800 (PST) Received: from rios.sitaranetworks.com (rios.sitaranetworks.com [199.103.141.78]) by apollo.sitaranetworks.com (8.10.2+Sun/8.9.3) with ESMTP id fAFLLd513035 for ; Thu, 15 Nov 2001 16:21:39 -0500 (EST) Received: by rios.sitaranetworks.com with Internet Mail Service (5.5.2653.19) id ; Thu, 15 Nov 2001 16:21:55 -0500 Message-ID: <31269226357BD211979E00A0C9866DAB02BB9745@rios.sitaranetworks.com> From: Chris Ptacek To: "'freebsd-hackers@freebsd.org'" Subject: kernel malloc questions... Date: Thu, 15 Nov 2001 16:21:51 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hey all, I have a couple questions about kernel mallocs. I am trying to malloc a large amount of memory for a KLD during load and the malloc keeps failing. I am trying to malloc 64-128MB for a memory pool for a project I am working on. My system has 196MB of memory and the KLD is loaded at startup so I am relativly sure that I have enough memory to satisfy the request. I guess the questions are: Is there a limit to the amount of memory the kernel (including modules) can malloc? If there is how do I change this amount? I am currently using M_NOWAIT, would using M_WAITOK be better? Would this end up hanging my system in this case? Would I be better off mallocing many smaller buffers into a memory pool (64 1MB buffers)? I don't have access to the mailing lists at the moment and would appreciate it if you could CC me with any replies. Thanks, Chris cptacek@sitaranetworks.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message