Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Jan 1997 19:46:59 +73600 (PST)
From:      Tony Sterrett <tony@nlanr.net>
To:        hackers@freebsd.org
Subject:   MAXMEM question
Message-ID:  <199702010346.TAA01593@nlanr.net>

next in thread | raw e-mail | index | archive | help
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




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