From owner-freebsd-hackers Thu Jun 28 11: 3:42 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from revolt.poohsticks.org (revolt.poohsticks.org [63.227.60.74]) by hub.freebsd.org (Postfix) with ESMTP id B9F6037B407 for ; Thu, 28 Jun 2001 11:03:39 -0700 (PDT) (envelope-from drew@revolt.poohsticks.org) Received: from revolt.poohsticks.org (localhost [127.0.0.1]) by revolt.poohsticks.org (8.11.3/8.11.3) with ESMTP id f5SI33T05601; Thu, 28 Jun 2001 12:03:03 -0600 (MDT) (envelope-from drew@revolt.poohsticks.org) Message-Id: <200106281803.f5SI33T05601@revolt.poohsticks.org> To: "Eugene L. Vorokov" Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: allocating user space memory from kernel mode In-reply-to: Your message of "Thu, 28 Jun 2001 19:57:55 +0400." <200106281557.f5SFvue68254@bugz.infotecs.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <5598.993751383.1@revolt.poohsticks.org> Date: Thu, 28 Jun 2001 12:03:03 -0600 From: Drew Eckhardt 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 In message <200106281557.f5SFvue68254@bugz.infotecs.ru>, vel@bugz.infotecs.ru w rites: >Hello, > >is it possible to allocate and then maybe free memory in user space >from kernel mode, if I have struct proc of the process that memory should >belong to ? Yes. >What is the easiest and safest method of doing this ? Probably vm_mmap with the MAP_ANON flag and without MAP_FIXED. >I have seen some example that uses obreak(), but that seems very tricky >and suspicious ... I don't really understand what obreak() really does >and how to use it ... I wouldn't want to confuse the user land memory allocators by changing heap size. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message