From owner-freebsd-hackers Fri Jan 31 19:47:01 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id TAA02102 for hackers-outgoing; Fri, 31 Jan 1997 19:47:01 -0800 (PST) Received: from nlanr.net (oceana.sdsc.edu [132.249.40.200]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id TAA02094 for ; Fri, 31 Jan 1997 19:46:59 -0800 (PST) Received: (from tony@localhost) by nlanr.net (8.7.3/8.7.3) id TAA01593 for hackers@freebsd.org; Fri, 31 Jan 1997 19:46:59 -0800 (PST) From: Tony Sterrett Message-Id: <199702010346.TAA01593@nlanr.net> Subject: MAXMEM question To: hackers@freebsd.org Date: Fri, 31 Jan 1997 19:46:59 +73600 (PST) X-Mailer: ELM [version 2.4 PL24 PGP3 *ALPHA*] Content-Type: text Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi all: I am trying to allocate 1Mb bytes of memory for a special custom device. I will need to allocate about 16Mb and they must occurs in 1Mb contigous blocks. I have three approaches and I'd like know your (all of you) opinon(s): 1. I reduce that amount of memory bsd thinks I have by changing the value in vm_init.c vm_set_page_size(); virtual_avail = vm_page_startup(avail_start, avail_end, virtual_avail); and reducing the avail_end and then somehow mapping this space into user space. 2. using vm_page_alloc_contig(size, low, high, alignment) to get the memory. I've been trying to use this function to get the memory but I've had no luck doing it, maybe I'm parameters I'm addr = (void *) vm_page_alloc_contig (1048576,25165872, 0x1fffffe, 4096) ; is how I did it. 3. Some change change to locore.s to set aside. So what do you dudes Cheers, Tony