<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Er, the large allocation does come from the gc itself.<BR>
 <BR>
Tony, is there is an assumption that the heap is contiguous?<BR>That calls to RTOS.GetMemory return adjacent addresses?<BR>
 <BR>
This code allocates a large array:<BR>
 <BR>
    IF desc = NIL OR newSideSpan # NUMBER(desc^) THEN<BR>      WITH newDesc = NEW(UNTRACED REF ARRAY OF Desc, newSideSpan) DO<BR><BR>
I'll know more shortly.<BR>
 <BR>
I guess..it looks like the heap can be discontiguous, but<BR>
we do record keeping for what it all spans.<BR>
 <BR>
The comments say:<BR>
(* The array desc and the global variables p0, and p1 describe the pages<BR>   that are part of the traced heap.  Either p0 and p1 are equal to Nil and<BR>   no pages are allocated; or both are valid pages and page p is allocated<BR>   iff<BR>
|          p0 <= p < p1<BR>|      AND desc[p - p0] != Unallocated<BR><BR>
 <BR>
Hm..<BR>
 <BR>
Grow (0x44000) => 0x2b1e45256000   total: 1.5M<BR>
GetUntracedOpenArray(0x1a80)<BR>   span: 6.6M   density: 24%<BR>stubgen: Processing RemoteView.T<BR>GetUntracedOpenArray(0x3f0)<BR>t1:0xc<BR>t2:0xa<BR>t3:0x1<BR>Grow (0x52000) => 0x2aaaaaaab000   total: 1.8M<BR>
GetUntracedOpenArray(0x1ce69fc8)<BR>
 <BR>
I have GetUntracedOpenArray<STRONG> </STRONG>printing how many bytes it is asked for.<BR>
t1,t2,t3 are just the lengths of the strings being concatented.<BR>
Grow(x)=>y means Grow allocated x bytes at address y.<BR>
 <BR>
So now, these two addresses 0x2aaaaaaab000 and 0x2b1e45256000  are very far apart, like 400gig.<BR>
And it seems the heap allocator wants to allocate an array to describe the pages.<BR>
 <BR>
Hm. Page size is no longer tied to the underlying system -- no longer vm-tied gc.<BR>
Perhaps perhaps blowing it up, to say, 1meg, will address this?<BR>
 <BR>
But really, an array to describe pages spanning the results of separate memory allocations, seems wrong.<BR>
A sparser data structure would be good, that could describe arbitrary sized runs of pages as being in the same state.<BR>
 <BR>
 - Jay<BR><BR><BR>

<HR id=stopSpelling>
<BR>
From: jay.krell@cornell.edu<BR>To: m3devel@elegosoft.com<BR>Date: Sun, 16 Nov 2008 15:31:25 +0000<BR>Subject: [M3devel] duplicated code?<BR><BR>
<STYLE>
.ExternalClass .EC_hmmessage P
{padding:0px;}
.ExternalClass body.EC_hmmessage
{font-size:10pt;font-family:Verdana;}
</STYLE>
Anyone want to clean up this duplicity?<BR> <BR> <BR>D:\dev2\cm3.2>dir /s/b asttotype.m3  StubCode.m3<BR>D:\dev2\cm3.2\m3-comm\sharedobjgen\src\AstToType.m3<BR>D:\dev2\cm3.2\m3-comm\stubgen\src\AstToType.m3<BR>D:\dev2\cm3.2\m3-db\stablegen\src\AstToType.m3<BR>D:\dev2\cm3.2\m3-comm\sharedobjgen\src\StubCode.m3<BR>D:\dev2\cm3.2\m3-comm\stubgen\src\StubCode.m3<BR><BR> <BR>somewhere in there, AMD64_LINUX tries to allocate a lot of memory, and fails<BR>either there or soon thereafter.<BR>The garbage collector is working.<BR> <BR> - Jay<BR><BR><BR><BR><BR><BR><BR></body>
</html>