help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] Re: problems with 1.8.4.... I got it


From: Jack LENZ
Subject: [Help-smalltalk] Re: problems with 1.8.4.... I got it
Date: Tue, 5 Dec 2000 14:01:53 +0100

So to start with the result: it is a problem in the memory management.
but not due to mmap.....

Well, now lets start at the beginning.
1. At some point in the initialization you call memInit. In detail the call
chain
looks like:
main -> initSmalltalk  -> InitMem -> heap_create ->_heap_reserve (macro!!!)

2. a little later you create another heap and the stack looks like
main -> initSmalltalk -> initOOPTable -> heap_create -> _heap_reserve

3. the macro _heap_reserve does 3 things:
- it sets hdp->base to baseaddr
- it increments baseaddr by size (*****)
- it returns 1

4. when you first invoke heap_create you do it with MAX_OBJECT_DATA_SIZE
which happens to be 256MB on a Solaris.

5. here is the content of hdp after the first 4 calls to heap_sbrk_internal
called from InitMem

heap_sbrk_internal with size=16
{areasize = 268435456, base = 0xdf770000 "", breakval = 0xdf770010 "",
     top = 0xdf772000 <Address 0xdf772000 out of bounds>}

heap_sbrk_internal with size=1179648
{areasize = 268435456, base = 0xdf770000 "\020", breakval = 0xdf890010 "",
     top = 0xdf892000 <Address 0xdf892000 out of bounds>}

called from initOOPTable ( which creates a new heap on his own)
heap_sbrk_internal with size=16
{areasize = 67108864, base = 0xef770000 "", breakval = 0xef770010 "",
     top = 0xef772000 <Address 0xef772000 out of bounds>}

heap_sbrk_internal with size=1050624
{areasize = 67108864, base = 0xef770000 "\004", breakval = 0xef870810 "",
     top = 0xef872000 <Address 0xef872000 out of bounds>}

Now look at the last item in the list. It's base is 0xef770000, it's top is
0xef872000.

6. look at the code I sent you in my last mail: to do the multiplication .umul
was called
who called some code in the _PROCEDURE_LINKAGE_TABLE who tried to call a
function
at address 0xef7c2f7c. Unfortunately this call falls in the region which you
mapped on /dev/zero!!!!

7. I tried to reduce MAX_OBJECT_DATA_SIZE (letting it vary between 64MB and
128MB
and MMAP_BASE (changing it from 0xdf770000 to 0xcf770000) but I run into
SEGMENTATION
violations all the time......

Well up to you to find a better fix. Please let me know how things evolve and if
 I still can help you!

Jack








reply via email to

[Prev in Thread] Current Thread [Next in Thread]