From jin@adv-pc-1.lbl.gov  Wed Jul  9 11:35:34 1997
Received: from adv-pc-1.lbl.gov (adv-pc-1.lbl.gov [128.3.196.189])
          by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id LAA29832
          for <FreeBSD-gnats-submit@freebsd.org>; Wed, 9 Jul 1997 11:35:32 -0700 (PDT)
Received: (from jin@localhost)
	by adv-pc-1.lbl.gov (8.8.5/8.8.5) id LAA00345;
	Wed, 9 Jul 1997 11:35:32 -0700 (PDT)
Message-Id: <199707091835.LAA00345@adv-pc-1.lbl.gov>
Date: Wed, 9 Jul 1997 11:35:32 -0700 (PDT)
From: "Jin Guojun[ITG]" <jin@adv-pc-1.lbl.gov>
Reply-To: jin@adv-pc-1.lbl.gov
To: FreeBSD-gnats-submit@freebsd.org
Subject: cannot access over 64MB memory
X-Send-Pr-Version: 3.2

>Number:         4070
>Category:       kern
>Synopsis:       cannot access over 64MB memory
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul  9 11:40:06 PDT 1997
>Closed-Date:    Wed Jul 9 14:58:21 PDT 1997
>Last-Modified:  Thu Jul 10 03:57:34 PDT 1997
>Originator:     Jin Guojun[ITG]
>Release:        FreeBSD 2.2-970618-RELENG i386
>Organization:
>Environment:

	2.2x to 3.0-SNAP releases

>Description:

	options	"MAXMEM=(256x1024)"
	supposes to enable more than 64 MB memory, but only 64MB memory
	can be accessed regardless how many memory detected by kernel.

# dmesg | grep mem
real memory  = 134217728 (131072K bytes)
Physical memory hole(s):
avail memory = 127311872 (124328K bytes)
chip0 <Intel 82437VX PCI cache memory controller> rev 2 on pci0:0:0

# mem-test -S 512 512 384
begin processing: Wed Jul  9 11:20:27 1997
mem-test [S20-1] : no enough core available for inbuf -> 1H x 6000000H = 100663296; Error<12> Cannot allocate memory

# mem-test -S 512 512 258
begin processing: Wed Jul  9 11:28:22 1997
mem-test [S20-1] : no enough core available for inbuf -> 1H x 4080000H = 67633152; Error<12> Cannot allocate memory

# mem-test -S 512 512 256
begin processing: Wed Jul  9 11:28:39 1997
end of allocating: at 1 seconds
device stdin not ready
Using CTRL-D to continue=>      end of reading: at 3 seconds
Reading image 0 cells, rest 67108864 are 0
512 frames, 512 rows, 256 columns => memory 67108864
(execute 12 columns for -r and -g options)
 -- in memory mode (Regular)
sequential access
finish: at 4 seconds

# limit
cputime         unlimited
filesize        unlimited
datasize        131072 kbytes
stacksize       65536 kbytes
coredumpsize    unlimited
memoryuse       unlimited
memorylocked    124248 kbytes
maxproc         179 
openfiles       360 


>How-To-Repeat:

	to malloc(1024*1024, N), and try N > 64.

>Fix:
	
	

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: davidg 
State-Changed-When: Wed Jul 9 14:58:21 PDT 1997 
State-Changed-Why:  

Operator error; see my email explaination. 

From: David Greenman <dg@root.com>
To: jin@adv-pc-1.lbl.gov
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: kern/4070: cannot access over 64MB memory 
Date: Wed, 09 Jul 1997 14:59:15 -0700

 >	options	"MAXMEM=(256x1024)"
 >	supposes to enable more than 64 MB memory, but only 64MB memory
 >	can be accessed regardless how many memory detected by kernel.
 >
 ># dmesg | grep mem
 >real memory  = 134217728 (131072K bytes)
 >Physical memory hole(s):
 >avail memory = 127311872 (124328K bytes)
 ...
 >mem-test [S20-1] : no enough core available for inbuf -> 1H x 6000000H = 100663296; Error<12> Cannot allocate memory
 
    The error is returned because you hit the process resource limit, not
 because the system didn't have enough memory.
 
 ># limit
 ...
 >datasize        131072 kbytes
 
    Malloc is kind of strange when it comes to allocating the virtual address
 space and will consume up to twice the amount requested. If you want to malloc
 more than 64MB, you'll need to further increase the data limit.
 
 -DG
 
 David Greenman
 Core-team/Principal Architect, The FreeBSD Project

From: "Jin Guojun[ITG]" <jin@george.lbl.gov>
To: dg@root.com
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: kern/4070: cannot access over 64MB memory
Date: Wed, 9 Jul 1997 15:36:45 -0700

 } ># limit
 } ...
 } >datasize        131072 kbytes
 } 
 }    Malloc is kind of strange when it comes to allocating the virtual address
 } space and will consume up to twice the amount requested. If you want to malloc
 } more than 64MB, you'll need to further increase the data limit.
 
 Would some one please update the section 7.6 in www.freebsd.com/FAQ/FAQ.html
 to add this information in?
 
 Thanks,
 
 -Jin
 
>Unformatted:
