Ishwar Rattan | 15 Sep 2009 22:17

Re: heap allocation?

I am computing Fibonacci numbers the hard way :-)
After 1000000th number, I get out of memory
message. Maybe I have hit the max resource allocation
limit..

-ishwar

On Tue, 15 Sep 2009, roger peppe wrote:

> almost all allocation is heap allocation in inferno.
> e.g.
>
> x := array[1024] of byte;
>
> allocates x on the heap.
>
> but perhaps that's not what you mean?
>
>
> 2009/9/15 Ishwar Rattan <ishwar@...>:
>>
>> Is there a way to do this in Inferno?
>>
>> -ishwar
>>
>>
>

Masha Rabinovich | 15 Sep 2009 23:36
Picon

Re: heap allocation?

Hi
It could have something to do with heap fragmentation.
Do you use infinite precision integers ?
Then the size of allocation block grows with each iteration.
So you always deallocate smaller blocks than allocate and it quickly gets to very fragmented heap.
Note that Inferno's GC does not compact the heap.


On Tue, Sep 15, 2009 at 9:17 PM, Ishwar Rattan <ishwar-uRTsXvq/cgn1GAl8QSHYmA@public.gmane.orgmich.edu> wrote:
I am computing Fibonacci numbers the hard way :-)
After 1000000th number, I get out of memory
message. Maybe I have hit the max resource allocation
limit..

-ishwar



On Tue, 15 Sep 2009, roger peppe wrote:

almost all allocation is heap allocation in inferno.
e.g.

x := array[1024] of byte;

allocates x on the heap.

but perhaps that's not what you mean?


2009/9/15 Ishwar Rattan <ishwar-uRTsXvq/cgkk8ThiirIwSje48wsgrGvP@public.gmane.org>:

Is there a way to do this in Inferno?

-ishwar




- - | 20 Sep 2009 23:09
Picon
Favicon

plan9 - windows lan file transfer

bx pIII мб. last plan9. rtl8139 lan

i need to transfer files between plan9 and windows(or wyn hosted inferno) through lan.

I do

bind -a '#I0' /net
echo bind ether /net/ether0 > /net/ipifc/clone
echo -n 'add 192.168.1.3 255.255.255.0' > /net/ipifc/0/ctl
echo -n 'add 0.0.0.0 0.0.0.0 192.168.1.2' > /net/iproute

aquarela -u1 &

on windows i try to mount \\192.168.1.3\glenda as drive. it thinks for a long time, then an error. aquarela on plan - errors too.

what am i doing wrong? how to do it correctly?

Josh Wood | 21 Sep 2009 06:56
Favicon
Gravatar

Re: plan9 - windows lan file transfer

If you're already running inferno on the windows host, I would
probably do the file service with 9p/styx:

On plan 9, something like:

	% aux/listen1 -t tcp!*!styx /bin/exportfs -r /usr/glenda

Then from inferno, from windows:

	% mount -A tcp!192.168.1.3!6666 /n/plan9

>
> aquarela -u1 &
>
> on windows i try to mount \\192.168.1.3\glenda as drive. it thinks  
> for a long time, then an error. aquarela on plan - errors too.

When you're using aquarela, it will do `9fs glenda` when receiving
that request.  In other words, it will try to attach & serve /n/glenda
from its name space.  You must arrange some kind of service there.

A few common 9fs names are `boot', `dump', and `sources,', all of
which aquarela can re-serve:

 From plan 9:

	% aquarela -u1	# As you did previously.

 From windows:

	; net use P: \\192.168.1.3\boot
	; net use D: \\192.168.1.3\dump
	...

HTH,

-Josh

Robert Ball | 15 Sep 2009 22:55
Favicon

Re: heap allocation?

man emu

you can specify a maximum pool size in bytes when starting emu:

	emu -r inferno -pheap=104857600

cheers,

r

> I am computing Fibonacci numbers the hard way :-)
> After 1000000th number, I get out of memory
> message. Maybe I have hit the max resource allocation
> limit..
>
> -ishwar
>
>
> On Tue, 15 Sep 2009, roger peppe wrote:
>
>> almost all allocation is heap allocation in inferno.
>> e.g.
>>
>> x := array[1024] of byte;
>>
>> allocates x on the heap.
>>
>> but perhaps that's not what you mean?
>>
>>
>> 2009/9/15 Ishwar Rattan <ishwar@...>:
>>>
>>> Is there a way to do this in Inferno?
>>>
>>> -ishwar

Tharaneedharan Vilwanathan | 15 Sep 2009 22:50
Picon

Re: heap allocation?

you may know this already but you can specify heap memory size as a
parameter. Here is an example:

C:\inf\386\bin\emu.exe -g1800x1100 "-rC:\Inf2007May10"
-pheap=1024000000 -pimage=128000000 -pmain=128000000

dharani

On Tue, Sep 15, 2009 at 1:17 PM, Ishwar Rattan
<ishwar@...> wrote:
> I am computing Fibonacci numbers the hard way :-)
> After 1000000th number, I get out of memory
> message. Maybe I have hit the max resource allocation
> limit..
>
> -ishwar
>
>
> On Tue, 15 Sep 2009, roger peppe wrote:
>
>> almost all allocation is heap allocation in inferno.
>> e.g.
>>
>> x := array[1024] of byte;
>>
>> allocates x on the heap.
>>
>> but perhaps that's not what you mean?
>>
>>
>> 2009/9/15 Ishwar Rattan <ishwar@...>:
>>>
>>> Is there a way to do this in Inferno?
>>>
>>> -ishwar
>>>
>>>
>>
>

Noah Evans | 15 Sep 2009 22:45
Picon

Re: heap allocation?

Do you know how to set your heap size with -pheap=<size> when you invoke emu?

On Tue, Sep 15, 2009 at 10:17 PM, Ishwar Rattan
<ishwar@...> wrote:
> I am computing Fibonacci numbers the hard way :-)
> After 1000000th number, I get out of memory
> message. Maybe I have hit the max resource allocation
> limit..
>
> -ishwar
>
>
> On Tue, 15 Sep 2009, roger peppe wrote:
>
>> almost all allocation is heap allocation in inferno.
>> e.g.
>>
>> x := array[1024] of byte;
>>
>> allocates x on the heap.
>>
>> but perhaps that's not what you mean?
>>
>>
>> 2009/9/15 Ishwar Rattan <ishwar@...>:
>>>
>>> Is there a way to do this in Inferno?
>>>
>>> -ishwar
>>>
>>>
>>
>


Gmane